Error while executing sapstartsrv
FAIL: HTTP error, HTTP/1.1 401 Unauthorized
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 already created and it's not owned by the adm of this system.
b) /tmp/.sapstream5$$13 file was deleted after the sapstartsrv started.
c) the commands are not executed with the same adm user.
On Windows platforms the file is located at: .pipesapcontrol_$$.
$$ stands for the instance number.
2) You experience errors like this one when executing a protected method although you provided the user and password correctly:
FAIL: Invalid Credentials
3) You receive a connection refused like this one when executing a sapcontrol function:
FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen()
4) Other problems.