SAP Knowledge Base Article - Preview

2396062 - sapcontrol fails with "Connection reset by peer"

Symptom

The commands:

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

Fail with the following error:

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

 

SCENARIO 1:

The sapcontrol tool is being used to manage an SAP instance (ABAP, Java or HANA) at a remote server.

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
(...)

SCENARIO 2:

The sapcontrol tool is being used to manage an SAP instance (ABAP, Java or HANA) at the local server.

This scenario was most commonly observed at SAP HANA instances and the issue starts occurring usually after "HDB start" is executed.


Read more...

Environment

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

Product

SAP NetWeaver all versions

Keywords

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 for Me (Login required).

Search for additional results

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