6 Replies Latest reply on Jul 15, 2016 12:21 AM by gaoshuai

    Pi Web Api service

    luis.dominguez

      Hello

      Im trying to use the PI web api, i can pass all the initial configuration, but when the service attempts to start, if trhows the error 1053 The service did not respond to the start or control request in a timely fashion

      I tried several fixes including, modifying the registry with ServicePipeTimeout, but it still occurs the error

      How can I fix that?

        • Re: Pi Web Api service
          jpennington

          Hi Luis,

           

          Could I ask what version of PI Web API you are using? I am also curious if the service is running as "Local System" or a domain account. This sounds like it may be an issue with the account that PI Web API is running as having sufficient permissions on the PI AF Server. Checking the Windows Event Viewer logs after attempting to start the service should help narrow down the issue.

            • Re: Pi Web Api service
              luis.dominguez

              Hi John

              Thanks for you reply

              Im using the Pi Web API 2016 the latest version

              Also I see in the services the API like this:

              Name: PI Web API 2016

              Description: A restful API...

              Status:

              Startup Type: Automatic (Delayed Start) *I change this to manually and automatic with no success

              Log on As: NT Service\piwebapi

                • Re: Pi Web Api service
                  Marcos Vainer Loeff

                  Hello Luis,

                   

                  Two things I would check on the PI Web API  server:

                   

                  • Open the Command Promt with admin privileges and go to the %PIHOME64%\WebAPI folder. Then run OSIsoft.REST.Host.exe and check the error message.
                  • Open the Windows Event Viewer and check the PIWebAPI folder under Applications and Services Log. Do you see any error message under the Admin folder? You can right click on the PIWebAPI folder and then go to View --> Show Analytic and Debug Logs. You will be able to view the Analytics and Debug folders as well. Finally, just right click on those folder and select "Enable Log". Check the content of those 3 folders after trying to start PI Web API.

                   

                  Let us know the results!

              • Re: Pi Web Api service
                gaoshuai

                Hi Luis, did you have resolved this problem?

                  • Re: Pi Web Api service
                    Marcos Vainer Loeff

                    Hello Gao,

                     

                    Are you facing the same issue? Did you follow the instructions above?

                      • Re: Pi Web Api service
                        gaoshuai

                        yes, Marcos, I am facing the same issue. And I follow the instructions above as you mentioned.

                        @Marcos Vainer Loef

                        The screenshot is below and the detailed information is following:

                        Detailed information:

                        Log Name:      PIWebAPI/Admin

                        Source:        PIWebAPI

                        Date:          7/14/2016 4:02:06 PM

                        Event ID:      3

                        Task Category: AdminMessage

                        Level:         Information

                        Keywords:      Session0,Session1,Session2,Session3

                        User:          NT SERVICE\piwebapi

                        Computer:      ITSSGSGW01215.jnj.com

                        Description:

                        [Host]: The service will stop due to an unhandled exception.

                        System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception. ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The target principal name is incorrect

                           --- End of inner exception stack trace ---

                           at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)

                           at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetNam

                        Event Xml:

                        <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

                          <System>

                            <Provider Name="PIWebAPI" Guid="{21B44454-1081-59F5-8C28-7F53000A91CF}" />

                            <EventID>3</EventID>

                            <Version>0</Version>

                            <Level>4</Level>

                            <Task>65531</Task>

                            <Opcode>0</Opcode>

                            <Keywords>0x8000f00000000000</Keywords>

                            <TimeCreated SystemTime="2016-07-14T08:02:06.224135300Z" />

                            <EventRecordID>22</EventRecordID>

                            <Correlation />

                            <Execution ProcessID="7628" ThreadID="11288" />

                            <Channel>PIWebAPI/Admin</Channel>

                            <Computer>ITSSGSGW01215.jnj.com</Computer>

                            <Security UserID="S-1-5-80-1143366187-2805966828-1971289575-931675289-2233629655" />

                          </System>

                          <EventData>

                            <Data Name="componentName">Host</Data>

                            <Data Name="message">The service will stop due to an unhandled exception.

                        System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception. ---&gt; System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---&gt; System.ComponentModel.Win32Exception: The target principal name is incorrect

                           --- End of inner exception stack trace ---

                           at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)

                           at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)

                           at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetNam</Data>

                          </EventData>

                        </Event>