22 April, 2015

Not able to stop SAP application, the error is FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen()

When we stop using the command stopsap <hostname configured in profile> R3, the system is not able to stop the application with the error FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen(). 

The solution:
There is no problem with the network instead it is about missing sapstartsrv process even though all the SAP services are running and application is stable. 

Start the sapstartsrv process manually using the command:
1. go to kernel directory- cdexe
2. start the sapstart srv  : ./sapstartsrv pf=/usr/sap/EPD/SYS/profile/EPD_DVEBMGS10_sapepd
3. while it is running in the dialog mode, open the new session and stop the system as usual. It will be able to connect to the instance and stop 
4. Once it is stopped and no other SAP processes are running, kill or stop the sapstartsrv process using 

sapcontrol -prot NI_HTTP -nr 10 -host sapepd -function StopService 

5. If you kill, it creates the core dump in work directory, be sure to delete it. 
6. do the cleanipc <instance no> remove 
7. start the system fresh. 

9 comments: