Register Login

WSAECONNREFUSED: Connection refused sapcontrol error

Updated May 20, 2018

Sapcontrol error 'NIECONN_REFUSED (WSAECONNREFUSED: Connection refused)'

This dump occurs if all the condition listed below are true:

1) the sapcontrol commands used by the upgrade tool fail with error:

FAIL: NIECONN_REFUSED (WSAECONNREFUSED: Connection refused), NiRawConnect failed in plugin_fopen()

2) The command is successful if executed via host option:

sapcontrol -nr <instance number> -host <instance hostname>:5<instance number>13 -function <sapcontrol function>

3) User has set parameter service/hostname to the instance hostname for the SAP start service.

Cause of this error:

The sapcontrol commands which have been used by the upgrade tool did not set the host option explicitly. In such scenario, the host "localhost" is used by default.

A parameter 'service/hostname' is used to specify the IP address or host name which is linked to sapstartsrv Web service port (default: all / 0.0.0.0). If set in the profile to the instance hostname, sapstartsrv will not link the web service to the localhost IP address.

In this scenario the sapcontrol commands without "-host" option will fail with the error mentioned above

Solution:

In order to resolve this dump you need to comment out parameter service/hostname for the SAP start service and restart sapstartsrv.


×