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