5 Replies Latest reply on Aug 13, 2014 12:50 PM by Gregor

    Error when using PI WebParts Configuration

    torsteins

      Hi,

       

      I would like to change the background color of the PI Trend web part but when I open http://server/_layouts/PI_WebParts/trend_config.aspx I see an error in red on the top saying: "At this time, the Primary PI Server for the Configuration Database is not available. Therefore, any attempt to modify the configuration may fail. " .

       

      If I click on any other item from the menu on the left, e.g. "PI Table", I get a popup with the error "Error Reading Configuration Database: 'Object reference not set to an instance of an object.'".

       

      What is the reason for that error?

       

      Thanks in advance.

        • Re: Error when using PI WebParts Configuration

          Hello Torstein,

           

          When you install PI Web Parts, you are prompted to refer a PI Server (PI Data Archive). The PI Web Parts configuration becomes stored in the Module Database (MDB) of the referenced PI Server. The messages you are getting indicate the "default" PI Server referenced during installation cannot be accessed and hence the configuration cannot be read nor modified. Please check with PI Web Parts Admin page for the default PI Server and make sure the referenced PI Server node is available and PI Web Parts has appropriate rights to read from the MDB.

            • Re: Error when using PI WebParts Configuration
              torsteins

              Hi Gregor,

               

              Thank you for your answer.

               

              I tried checking what is my default PI Server but when I clicked on PI Data Sources in the admin page, I got "Object reference not set to an instance of an object" popup and the list with configured PI Data Sources was empty. When I clicked on "New" I was redirected to the iis error page....

               

              After some try and error attempts, I changed the application pool identities of sharepoint and piwebservices to NetworkService(it was set to custom account) and suddenly the admin pages started working - no red error messages and no popups and I could successfully change the colors of the trend.

               

              I navigated to the PI Data Sources page to check my  PI Data servers configurations and the list with servers wasn't empty anymore so I tried the test connection button and I am trying to understand the answer:

               

              ---start

               

              User: PI Data Server Connection Test of 'myServer' was successful, PI User: 'myPIIdentity', Windows User: 'myDomain\myUser

               

              Is Windows Identity: myDomain\myUser

               

              '

               

              Process: PI Data Server Connection Test of ''myServer' ' was successful, PI User: 'myPIIdentity', Windows User: 'NT AUTHORITY\NETWORK SERVICE'

               

              --end

               

              Why are there two connection tests and what the result means?

               

              Why my admin page wasn't working when I was using custom account as identity ( the account was the same as the one from the result -  'myDomain\myUser')?

                • Re: Error when using PI WebParts Configuration

                  Hello Torstein,

                   

                  Torstein Sørhaug

                  Why are there two connection tests and what the result means?

                   

                  One test is done with your domain credentials and the other one with the identity specified for the application pool. I am not 100% certain but believe the domain credentials are used to see if a user is allowed to change configuration (stored in MDB). The application pool identity is tested because it is used by the w3wp.exe process. Booth test have been successful. To understand how 'myPIIdentity' user credentials were granted you would have to check the PI Message Log on the PI Server node.

                   

                  Torstein Sørhaug

                  Why my admin page wasn't working when I was using custom account as identity ( the account was the same as the one from the result -  'myDomain\myUser')?

                   

                  I can only guess that the password provided within the application pool settings was not current. This is one of the common issues with custom accounts. Because of the Active Directory Policy, passwords need to be changed and suddenly connections are not working anymore. You should be able to find information about failed authentication within the Windows Security Event log on the web server node. 

                   

                   

                   

                   

                    • Re: Error when using PI WebParts Configuration
                      torsteins

                      Hi Gregor,

                       

                      Thank you for your clarifications.

                       

                      The password of the account hasn't been recently changed and I am sure it was correct. Moreover I don't see any errors about failed authentication within the Windows Security Event Log on the web server node. The only errors I see are in the Windows Application Log:

                       

                      One from PI WebParts with category "None":

                       

                      Message: Severity:'Error', Stack:'OSIsoft.PresentationServices.Common' Message:'Index was outside the bounds of the array.

                       

                      Category: General

                       

                      Priority: -1

                       

                      EventId: 0

                       

                      Severity: Error

                       

                      Title:

                       

                      Machine: BTV7302

                       

                      App Domain: /LM/W3SVC/1403670723/ROOT-1-130523874504371896

                       

                      ProcessId: 6020

                       

                      Process Name: c:\windows\system32\inetsrv\w3wp.exe

                       

                      Thread Name:

                       

                      Win32 ThreadId:6620

                       

                      Extended Properties:

                       

                      And one from PI Web Parts with category "PIWebPartsServices":

                       

                      Message: Severity:'Error', Stack:'   at OSIsoft.AF.Support.AFProxy.Reconnect(AFCollectiveMember member, Boolean autoPrompt, Boolean raiseEvents, AFConnectionPreference preference)

                       

                        at OSIsoft.AF.Support.AFProxy.Reconnect()

                       

                        at OSIsoft.AF.Support.AFSerialProxy.Call(String rpcName, ProxyDelegate codeBlock)

                       

                        at OSIsoft.AF.Support.AFSerialProxy.GetDatabaseList(DateTime sinceTime, AFSortField sortField, AFSortOrder sortOrder, Int32 maxCount, Boolean& fullUpdate, DateTime& lastUpdateTime)

                       

                        at OSIsoft.AF.AFDatabases.LoadObjects(Int32 page, Boolean fullReload)

                       

                        at OSIsoft.AF.AFCollection`1.Load(Boolean force)

                       

                        at OSIsoft.AF.AFCollection`1.<GetEnumerator>d__1.MoveNext()

                       

                        at OSIsoft.PIWebParts.PIWebPartsServices.PISystemSearch.GetDatabasesForBreadCrumb(String srvr)

                       

                        at SyncInvokeGetDatabasesForBreadCrumb(Object , Object[] , Object[] )

                       

                        at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

                       

                        at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)

                       

                        at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)

                       

                        at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)

                       

                        at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)' Message:'afserver'.

                       

                      Category: PIWebPartsServices

                       

                      Priority: -1

                       

                      EventId: 0

                       

                      Severity: Error

                       

                      Title:

                       

                      Machine: server1

                       

                      App Domain: /LM/W3SVC/1/ROOT/PIWebPartsServices-1-130523874771145240

                       

                      ProcessId: 6356

                       

                      Process Name: c:\windows\system32\inetsrv\w3wp.exe

                       

                      Thread Name:

                       

                      Win32 ThreadId:3700

                       

                      Extended Properties:

                       

                      Do you have more ideas?

                        • Re: Error when using PI WebParts Configuration

                          Hello Torstein,

                           

                          I am pretty sure the PI Message Log of the PI Server holding the PI Web Parts configuration will document failed authentication requests or show that an identity was granted that has insufficient privileges. Either one could cause the errors you were seeing. Please let us know if you want us to have OSIsoft create a Technical Support case and contact you for troubleshooting.

                           

                          If you just like to ensure PI Web Parts (w3wp.exe) is using your user account, I suggest changing the application pool identity again, perform an IISRESET, monitor the PI Message Log on the PI Server holding the configuration and hit PI Web Parts administration page again. Please don't hesitate to let us know if you require assistance with this.