OpenHistorian web interface


#1

I have an issue with web interface authentication, with Integrated windows authentication doesn’t work same for simple authentication with username/password.
Through username/password authentication database works, but web Interface seems doesn’t work, no PMU and Status.

Any idea ?

image

Regards
Pietro


#2

Hi Pietro,

  1. What happens when you attempt to use the openHistorian Console?
  2. Are you using MySQL? If so, what version of MySQL Connector/NET have you installed?
  3. Are there any errors in the error log?

Thanks,
Stephen


#3

Hi Stephen,

  1. What happens when you attempt to use the openHistorian Console?

image

  1. Are you using MySQL? If so, what version of MySQL Connector/NET have you installed?

image

  1. Are there any errors in the error log?
    [9/4/2018 12:43:53 AM] (Inner Exception)
    Date and Time:         9/4/2018 12:43:53 AM
    Machine Name:          WAMS02
    Machine IP:            ce80::a077:34d4:a8rc:147a%10
    Machine OS:            Microsoft Windows NT 6.2.9200.0

    Application Domain:    openHistorian.exe
    Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
    Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
    Assembly Version:      2.5.6.0
    Assembly Build Date:   6/1/2018 12:22:34 AM
    .Net Runtime Version:  4.0.30319.42000

    Exception Source:      System.ServiceModel
    Exception Type:        System.InvalidOperationException
    Exception Message:     A registration already exists for URI 'http://localhost:6156/historian'.
    Exception Target Site: RegisterUri

    ---- Stack Trace ----
       System.ServiceModel.Channels.UriPrefixTable`1.RegisterUri(uri As Uri, hostNameComparisonMode As HostNameComparisonMode, item As TItem)
           openHistorian.exe: N 00362
       System.ServiceModel.Channels.HttpTransportManager.Register(channelListener As TransportChannelListener)
           openHistorian.exe: N 00398
       System.ServiceModel.Channels.TransportManager.Open(channelListener As TransportChannelListener)
           openHistorian.exe: N 00173
       System.ServiceModel.Channels.TransportManagerContainer.Open(selectTransportManagerCallback As SelectTransportManagersCallback)
           openHistorian.exe: N 00151
       System.ServiceModel.Channels.TransportChannelListener.OnOpen(timeout As TimeSpan)
           openHistorian.exe: N 00092
       System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(timeout As TimeSpan)
           openHistorian.exe: N 00060
       System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
           openHistorian.exe: N 00290
       System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(timeout As TimeSpan)
           openHistorian.exe: N 00072


    (Outer Exception)
    Date and Time:         9/4/2018 12:43:53 AM
    Machine Name:          WAMS02
    Machine IP:            ce80::a077:34d4:a8rc:147a%10
    Machine OS:            Microsoft Windows NT 6.2.9200.0

    Application Domain:    openHistorian.exe
    Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
    Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
    Assembly Version:      2.5.6.0
    Assembly Build Date:   6/1/2018 12:22:34 AM
    .Net Runtime Version:  4.0.30319.42000

    Exception Source:      System.ServiceModel
    Exception Type:        System.InvalidOperationException
    Exception Message:     The ChannelDispatcher at 'http://localhost:6156/historian' with contract(s) '"ITimeSeriesDataService"' is unable to open its IChannelListener.
    Exception Target Site: OnOpen

    ---- Stack Trace ----
       System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(timeout As TimeSpan)
           openHistorian.exe: N 00145
       System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
           openHistorian.exe: N 00290
       System.ServiceModel.ServiceHostBase.OnOpen(timeout As TimeSpan)
           openHistorian.exe: N 00130
       System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
           openHistorian.exe: N 00290
       GSF.ServiceModel.SelfHostingService.InitializeServiceHost()
           openHistorian.exe: N 01935
       GSF.ServiceModel.SelfHostingService.Initialize()
           openHistorian.exe: N 00051
       GSF.Adapters.AdapterLoader`1.OnAdapterLoaded(adapter As T)
           openHistorian.exe: N 00042
       GSF.Adapters.AdapterLoader`1.Adapters_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
           openHistorian.exe: N 00194
       System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(e As NotifyCollectionChangedEventArgs)
           openHistorian.exe: N 00066
       System.Collections.ObjectModel.ObservableCollection`1.InsertItem(index As Int32, item As T)
           openHistorian.exe: N 00184
       GSF.Adapters.AdapterLoader`1.ProcessAdapter(adapterType As Type)
           openHistorian.exe: N 00424

    [9/6/2018 2:23:19 PM] (Inner Exception)
    Date and Time:         9/6/2018 2:23:19 PM
    Machine Name:          WAMS02
    Machine IP:            ce80::a077:34d4:a8rc:147a%10
    Machine OS:            Microsoft Windows NT 6.2.9200.0

    Application Domain:    openHistorian.exe
    Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
    Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
    Assembly Version:      2.5.6.0
    Assembly Build Date:   6/1/2018 12:22:34 AM
    .Net Runtime Version:  4.0.30319.42000

    Exception Source:      System
    Exception Type:        System.Security.Authentication.AuthenticationException
    Exception Message:     Authentication failed because the remote party has closed the transport stream.
    Exception Target Site: EndProcessAuthentication

    ---- Stack Trace ----
       System.Net.Security.NegoState.EndProcessAuthentication(result As IAsyncResult)
           openHistorian.exe: N 2334538
       GSF.Communication.TlsServer.ProcessIntegratedSecurityAuthentication(asyncResult As IAsyncResult)
           openHistorian.exe: N 00167


    (Outer Exception)
    Date and Time:         9/6/2018 2:23:19 PM
    Machine Name:          WAMS02
    Machine IP:            ce80::a077:34d4:a8rc:147a%10
    Machine OS:            Microsoft Windows NT 6.2.9200.0

    Application Domain:    openHistorian.exe
    Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
    Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
    Assembly Version:      2.5.6.0
    Assembly Build Date:   6/1/2018 12:22:34 AM
    .Net Runtime Version:  4.0.30319.42000

    Exception Source:      
    Exception Type:        System.Exception
    Exception Message:     Unable to authenticate connection to client [::1]: Authentication failed because the remote party has closed the transport stream.

    ---- Stack Trace ----

Thanks
Pietro


#4
  1. How long does it stay that way? Can you type in any commands?
  2. That’s the same version as mine so no problem there.
  3. The error you provided, Authentication failed because the remote party has closed the transport stream, indicates that the client (openHistorian Console or openHistorian Manager) closed the connection before the authentication process could be completed. Unfortunately, it doesn’t tell us much except that maybe the authentication process is taking a long time. There may be a mismatch between the SSL protocols used by the server and the client, or it could just be that you need to wait a bit longer before closing the console.
  4. Have you tried doing a hard refresh in your web browser (Ctrl+Refresh)?

Thanks,
Stephen


#5

Hi Stephen,

  1. How long does it stay that way? Can you type in any commands?

I cannot type any commands, below the screenshot.

image

  1. Have you tried doing a hard refresh in your web browser (Ctrl+Refresh)?

Yes but doesn’t works.

I can login as a mysql user but I don’t see any information

image

Thanks
Pietro


#6

I can’t tell if the problem with the console is related to the one with the website, but let’s just assume you have some sort of general authentication problem. Have you tried restarting the service to see if either of these issues resolve themselves? Keep checking the error log for new errors, especially during service startup. Also, if you can provide data from the StatusLog.txt file while the service is starting up, that might be helpful as well.


#7

Dear Stephen,
we found those error:

Application Domain:    openHistorian.exe
Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
Assembly Version:      2.5.6.0
Assembly Build Date:   6/1/2018 12:22:34 AM
.Net Runtime Version:  4.0.30319.42000

Exception Source:      System.ServiceModel
Exception Type:        System.InvalidOperationException
Exception Message:     The ChannelDispatcher at 'http://localhost:6152/historian' with contract(s) '"ITimeSeriesDataService"' is unable to open its IChannelListener.
Exception Target Site: OnOpen

---- Stack Trace ----
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(timeout As TimeSpan)
       openHistorian.exe: N 00145
   System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
       openHistorian.exe: N 00290
   System.ServiceModel.ServiceHostBase.OnOpen(timeout As TimeSpan)
       openHistorian.exe: N 00130
   System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
       openHistorian.exe: N 00290
   GSF.ServiceModel.SelfHostingService.InitializeServiceHost()
       openHistorian.exe: N 01935
   GSF.ServiceModel.SelfHostingService.Initialize()
       openHistorian.exe: N 00051
   GSF.Adapters.AdapterLoader`1.OnAdapterLoaded(adapter As T)
       openHistorian.exe: N 00042
   GSF.Adapters.AdapterLoader`1.Adapters_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
       openHistorian.exe: N 00194
   System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(e As NotifyCollectionChangedEventArgs)
       openHistorian.exe: N 00066
   System.Collections.ObjectModel.ObservableCollection`1.InsertItem(index As Int32, item As T)
       openHistorian.exe: N 00184
   GSF.Adapters.AdapterLoader`1.ProcessAdapter(adapterType As Type)
       openHistorian.exe: N 00424

Application Domain:    openHistorian.exe
Assembly Codebase:     C:/Program Files/openHistorian/openHistorian.exe
Assembly Full Name:    openHistorian, Version=2.5.6.0, Culture=neutral, PublicKeyToken=null
Assembly Version:      2.5.6.0
Assembly Build Date:   6/1/2018 12:22:34 AM
.Net Runtime Version:  4.0.30319.42000

Exception Source:      System.ServiceModel
Exception Type:        System.InvalidOperationException
Exception Message:     A registration already exists for URI 'http://localhost:6152/historian'.
Exception Target Site: RegisterUri

---- Stack Trace ----
   System.ServiceModel.Channels.UriPrefixTable`1.RegisterUri(uri As Uri, hostNameComparisonMode As HostNameComparisonMode, item As TItem)
       openHistorian.exe: N 00362
   System.ServiceModel.Channels.HttpTransportManager.Register(channelListener As TransportChannelListener)
       openHistorian.exe: N 00398
   System.ServiceModel.Channels.TransportManager.Open(channelListener As TransportChannelListener)
       openHistorian.exe: N 00173
   System.ServiceModel.Channels.TransportManagerContainer.Open(selectTransportManagerCallback As SelectTransportManagersCallback)
       openHistorian.exe: N 00151
   System.ServiceModel.Channels.TransportChannelListener.OnOpen(timeout As TimeSpan)
       openHistorian.exe: N 00092
   System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(timeout As TimeSpan)
       openHistorian.exe: N 00060
   System.ServiceModel.Channels.CommunicationObject.Open(timeout As TimeSpan)
       openHistorian.exe: N 00290
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(timeout As TimeSpan)
       openHistorian.exe: N 00072

'3840', 'GSF.Security', NULL, 'System.UnauthorizedAccessException: User role cache access failure: timeout while attempting to load user role cache. ---> System.TimeoutException: Timeout waiting to read data from C:\\Users\\wams\\AppData\\Roaming\\Grid Protection Alliance\\openHistorianManager\\UserRoleCache.bin
   at GSF.IO.InterprocessCache.WaitForLoad(Int32 millisecondsTimeout)
   at GSF.Security.UserRoleCache.WaitForDataReady()
   --- End of inner exception stack trace ---
   at GSF.Security.UserRoleCache.WaitForDataReady()
   at GSF.Security.UserRoleCache.get_UserRoles()
   at GSF.Security.UserRoleCache.MergeRight(UserRoleCache other)
   at GSF.Security.UserRoleCache.GetCurrentCache()
   at GSF.Security.AdoSecurityProvider.CacheLastUserRoles(Object state)', NULL, '2018-09-19 12:53:31'

Thanks
Pietro


#8

Try this:

  1. Stop the openHistorian service.
  2. Delete the file at C:\Users\wams\AppData\Roaming\Grid Protection Alliance\openHistorianManager\UserRoleCache.bin.
  3. Start the openHistorian service.

Thanks,
Stephen


#9

Hi Stephen,
we had followed your instructions, but it doesn’t work.

1

Question; openpdc and openhistorian they require Write/Read Domain Controllers roles ?

Thanks
Pietro


#10

As far as Active Directory is concerned, basic read permissions should be sufficient. The service account absolutely needs to be able to read the UserAccountControl property.

Roles are stored in the ApplicationRole table of the database. Users are stored in the UserAccount table. The UserAccount.Name field is actually the SID of the user for Windows authenticated accounts (type whoami /user into a command prompt to see your SID). Users are mapped to roles via the ApplicationRoleUserAccount table.

Possible issues that cause the “no assigned roles” error:

  • The user has no assigned roles (in other words, no records in the ApplicationRoleUserAccount table for that user).
  • The NodeID of the ApplicationRole records does not match the NodeID field in the openHistorian.exe.config file. Although, in the case of your screenshot, it would be the openPDCManager.exe.config file.
  • An incompatible version of MySQL Connector/NET has caused the service or manager to load an empty data set for the ApplicationRole table (not likely, you appear to have a compatible version).
  • An error has occurred within the service or manager that has caused the system to fail to load the correct ApplicationRoles or ApplicationRoleUserAccounts.

Thanks,
Stephen


#11

Dear Stephen,
My colleagues found a netlogon entry for openhistorian manager.exe
with a request for DC Writable (domain writable).

09/27 14:28:31 [CRITICAL] [9440] NetpDcGetNameIp: process.: site specific SRV records done.
09/27 14:28:31 [MISC] [9440] NetpDcGetName: NetpDcGetNameIp for process. returned 121
09/27 14:28:36 [MISC] [9440] DsGetDcName function returns 1355 (client PID=10192): Dom:process Acct:(null) Flags: DS WRITABLE RET_DNS
09/27 14:28:36 [MISC] [9440] DsGetDcName function called: client PID=10192, Dom:process Acct:(null) Flags: DS WRITABLE RET_DNS
09/27 14:28:36 [MISC] [9440] NetpDcInitializeContext: DSGETDC_VALID_FLAGS is c0fffff1
09/27 14:28:36 [MAILSLOT] [9440] NetpDcPingListIp: process.: Sent UDP ping to xxx.xxx.xxx.xxx
09/27 14:28:36 [MISC] [9440] NetpDcAllocateCacheEntry: new entry 0x00000102D1CE5660 -> DC:DCZCNC02 DnsDomName:process Flags:0xe8fc
09/27 14:28:36 [CRITICAL] [9440] NetpDcMatchResponse: DCZCNC02: process.: Responder is not a writable server. 0xe8fc
09/27 14:28:36 [MISC] [9440] NetpDcDerefCacheEntry: destroying entry 0x00000102D1CE5660
09/27 14:28:37 [MAILSLOT] [9440] NetpDcPingListIp: process.: Sent UDP ping to xxx.16.xxx.148
09/27 14:28:37 [MISC] [9440] NetpDcAllocateCacheEntry: new entry 0x00000102D1CE5B40 -> DC:DCZRMN02 DnsDomName:process Flags:0xe8fc
09/27 14:28:37 [CRITICAL] [9440] NetpDcMatchResponse: DCZRMN02: process.: Responder is not a writable server. 0xe8fc
09/27 14:28:37 [MISC] [9440] NetpDcDerefCacheEntry: destroying entry 0x00000102D1CE5B40
09/27 14:28:37 [MAILSLOT] [9440] NetpDcPingListIp: process.: Sent UDP ping to xxx.16.xxx.147
09/27 14:28:37 [MISC] [9440] NetpDcAllocateCacheEntry: new entry 0x00000102D1CE6770 -> DC:DCZRMN01 DnsDomName:process Flags:0xe8fc
09/27 14:28:37 [CRITICAL] [9440] NetpDcMatchResponse: DCZRMN01: process.: Responder is not a writable server. 0xe8fc
09/27 14:28:37 [MISC] [9440] NetpDcDerefCacheEntry: destroying entry 0x00000102D1CE6770
09/27 14:28:38 [MAILSLOT] [9440] NetpDcPingListIp: process.: Sent UDP ping to xxx.16.xxx.147
09/27 14:28:38 [MISC] [9440] NetpDcAllocateCacheEntry: new entry 0x00000102D1CE5180 -> DC:DCZCNC01 DnsDomName:process Flags:0xe8fc
09/27 14:28:38 [CRITICAL] [9440] NetpDcMatchResponse: DCZCNC01: process.: Responder is not a writable server. 0xe8fc
09/27 14:28:38 [MISC] [9440] NetpDcDerefCacheEntry: destroying entry 0x00000102D1CE5180
09/27 14:28:38 [CRITICAL] [9440] NetpDcGetNameIp: process.: site specific SRV records done.

Thanks
Pietro


#12

Hi Pietro,

I can’t reproduce a read-only DC to test. Can you check the ErrorLog.txt file or the ErrorLog table in the database? I’ll need more details about the error in order to proceed.

Thanks,
Stephen


#13

Dear Stephen,
Openhistorian and openpdc are installed on a server with RODC Domain Controllers access (Read Only domain controllers) and cannot in any way reach normal Domain Controllers (Read/write domain controllers) this for secury reason.

Below, openhistorian/openserver tryed to write in the domain controller, the response is:

09/27 14:28:38 [CRITICAL] [9440] NetpDcMatchResponse: DCZCNC01: process.: Responder is not a writable server. 0xe8fc

Regards
pietro


#14

Those domain controller logs only show me that the write request is denied access. As far as I know, openHistorian and its Manager does not need write access to the domain. I’m going to need a relevant error message from either the openHistorian or the openHistorian Manager application to have any hope of tracking down the location in the code that is requesting write access. Please provide the relevant log messages from ErrorLog.txt. Alternatively, you can attach the ErrorLog.txt file to either your post or a private message to me and I will see what I can find.