Saturday, 3 November 2012

instance startup issue:FAIL: HTTP error, HTTP/1.1 401 Unauthorized

Error:

/usr/sap/<SID>/D00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Start

01.11.2012 01:23:37
Start
FAIL: HTTP error, HTTP/1.1 401 Unauthorized

-------------------------------------------
01:23:48
startup of Instance failed



Possible reasons for this issue:

The sapstartsrv provides two ways of authenticating it's requests:
- HTTP Basic authentication
- Trusted connects

If you don't pass any credentials to the sapcontrol command, it tries to use the trusted connection functionality but if it fails, it will fall back to the basic HTTP authentication and it will fail by the lack of credentials. Possible reasons for this to fail are:

a) sapstartsrv was not able to create the /tmp/.sapstream5$$13 file because someone else (some other  sidadm which is already there on the same server) already created and it's not owned by the <sid>adm of this system.($$ - instance number)

b) /tmp/.sapstream5$$13 file was deleted after the sapstartsrv started.

c) the commands are not executed with the same <sid>adm user.

d) if the ports are occupied by some other  < sid>adm  hosted on the same server rather than required  <sid>adm.






Follow the solutions for this case:

a)Remove the file manually and after performing this, restart the sapstartsrv service.
 (sapcontrol -nr <instance number> -function RestartService)
                                                   
b) Disable any cleanups that can be made on /tmp and restart sapstartsrv.

c) run everything as <sid>adm.



2 comments:

  1. hi,

    very helpful information.

    thanks.

    ReplyDelete
  2. Have the exact error, saved my life! Had deleted .sapstream file not knowing what it is for. Thanks!

    ReplyDelete