Troubleshoot and resolve HANA shutdown issues with our guide on handling the 401 Unauthorized error efficiently
Symptom
- HANA DB cannot be stopped neither from the HANA Studio nor from the database server
- You get error “FAIL: HTTP error, HTTP/1.1 401 Unauthorized” in the database server
Environment
- SAP S4/HANA 1610
- SAP HANA 1.0
- sapstartsrv 7.00 PL 45
Reproducing the Issue
- Open HANA Studio
- Under Systems, right-click on the database
- Configuration and Monitoring
- Stop System
OR:
- Logon to the database server with the <sid>adm user
- Run command “HDB stop”
Cause
- The HANA database fails to stop because file /tmp/.sapstream5<NR>13 is missing
- This file could be missing, for example, when the Unix sapstartsrv unintentionally deletes it while trying to stop the ABAP instance
- The issue affects to sapstartsrv releases < 7.00 patch level 48 and is documented in point #6 of SAP Note 877795
Resolution
For a permanent solution upgrade the sapstartsrv to a release ≥ 7.00 patch level 48.
For a workaround until the sapstartsrv is upgraded follow these steps:
- Make sure the file is missing with command “ls -la /tmp/.sapstream5<NR>13”
- If missing, then run “HDB proc” and take note of the sapstartsrv process id (PID)
- Kill the sapstartsrv with command “kill -2 <PID of sapstartsrv>”
- Run again “ls -la /tmp/.sapstream5<NR>13”, the file should now be there
- Stop the database