2396062 - sapcontrol fails with "Connection reset by peer" | SAP Knowledge Base Article

SAP Knowledge Base Articles - preview

2396062 - sapcontrol fails with "Connection reset by peer"


The commands:

  • sapcontrol -nr <NN> -function StartService <SID>
  • sapcontrol -nr <NN> -function StopService <SID>
  • sapcontrol -nr <NN> -host <a remote server> -function <any method>

Fail with the following error:

FAIL: NIECONN_BROKEN (Connection reset by peer), NiRawRead failed in plugin_sapfrecv()


Executing the command "sapcontrol -nr <NN> -host <a remote server> -function <any method> -debug" shows that the sapcontrol is connecting to the local server, through UDS (the "/sap/.saptream5NN13" file), instead of connecting to the remote server:

[Thr 139712402106144] NiIInit: allocated nitab (2048 at 0x7f1154110010)
[Thr 139712402106144] NiIHSBufInit: initialize hostname buffer (IPv4)
[Thr 139712402106144] NiHLInit: alloc host buf (100 entries)
[Thr 139712402106144] NiSrvLInit: alloc serv bufs (100 entries)
[Thr 139712402106144] ***LOG Q0I=> NiPGetServByName: 'sapctrl00' not found: getaddrinfo [/bas/742_REL/src/base/ni/niuxi.c 1814]
[Thr 139712402106144] NiSrvLGetServNo: service name 'sapctrl00' not found by operating system
[Thr 139712402106144] NiInit3: NI already initializes (init=1;cur=2048)
[Thr 139712402106144] addrinfo of '<remote server>':
[Thr 139712402106144] 0: <correct IP address of remote server>:0 '<remote server>' RAW (2-2-3-0-16)
[Thr 139712402106144] NiHLGetNodeAddr: got hostname '<remote server>' from operating system
[Thr 139712402106144] NiIGetNodeAddr: hostname '<remote server>' = addr <correct IP address of remote server>
[Thr 139712402106144] NiIGetServNo: servicename '5NN13' = port 5NN13
[Thr 139712402106144] NiICreateHandle: hdl 1 state NI_INITIAL_CON
[Thr 139712402106144] NiIInitSocket: set default settings for new hdl 1/sock 3 (UD; ST)
[Thr 139712402106144] NiIBlockMode: set blockmode for hdl 1 FALSE
[Thr 139712402106144] NiITraceByteOrder: CPU byte order: little endian, reverse network, low val .. high val
[Thr 139712402106144] NiIConnectSocket: hdl 1 is connecting to /tmp/.sapstream5NN13 (timeout=-1)
[Thr 139712402106144] NiIConnectSocket: connection of hdl 1 established to /tmp/.sapstream5NN13
[Thr 139712402106144] NiIConnect: state of hdl 1 NI_CONNECTED



  • Product independent
  • Release independent
  • Linux operating system
  • Client/Server Technology - Network Interface


SAP NetWeaver all versions


Sapcontrol, StartService, StopService, NIECONN_BROKEN, Connection reset by peer, NiRawRead failed in plugin_sapfrecv, Nonlocal_bind, Net.ipv4.ip_nonlocal_bind , KBA , BC-CST-STS , Startup Service , HAN-DB , SAP HANA Database , BC-CST , Client/Server Technology , BC-OP-LNX , Linux , BC-CST-NI , Network Interface , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.