Sapcontrol: FAIL: HTTP Error, HTTP/1.1 401 Unauthorized

When executing sapcontrol -nr <instance> -function Stop it returns the error “FAIL: HTTP Error, HTTP/1.1 401 Unauthorized

Fixing this error is simple with the below steps:

1- Using (1) ps -ef | grep sapstartsrv to identify the process id of the sapstartsrv process as shown below. In the below case we can see that it is the process 6100. (2) Kill that process using kill -9 6100.

After you killed the process, if you try using sapcontrol it should return: FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen().

Just start the service again using sapcontrol -nr <instance> -function StartService <SID> or start again sapservices, which should be under /usr/sap/ as shown below:

Try starting/stopping the system again and it should work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: