OpenHistorian web interface

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 ?

Regards
Pietro

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

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

  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

Hi Stephen,

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

I cannot type any commands, below the screenshot.

  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

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.

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

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

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

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

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

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

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

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.

Can you try the latest openPDC release, version 2.6, and see if the issue has been resolved?

Thanks!
Ritchie

Dear Ritchie,
We have installed the new version of openpdc but it doesn’t resolve the issue.

Regards
Pietro

Are you able to log in to the openHistorian Manager, that is, the user interface desktop application (not the web app)?

Yes, but only with database user e not with a domain user.
We had a test yesterday, WAMS servers moved to a Read/write domain controller and “Openpdc manager”, “OpenHistorian manager” works with domain users.
This shows that Openpdc and Openhistorian have an issue with RODC Domain Controllers access (Read Only domain controllers).
Issue with c# library ?

Thanks
Pietro

Maybe so - we will need to setup a test with a read-only domain controller…

Any good news ?

Thanks
Pietro