SAP Knowledge Base Article - Preview

1916333 - "FAIL: NIECONN_REFUSED" sapcontrol error due to agent.lock file

Symptom

A connection refused error such as the one below is received when a sapcontrol function is executed.

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

When checked at the OS level, it can be seen that port 5<instance number>13 is not up and the sapstartsrv streamfile /tmp/.sapstream5<instance number>13 does not exist. 

In the sapstartsrv_ccms.log file found in /usr/sap/<SID>/<instance>/log/sapccm4x, the following entry can be seen as the latest one.

       INFO: Starting CCMS agent threads...
       INFO: Checking lock file ...

Additionally, when a UNIX debug tool (such as truss, strace, or pstack) is used and sapstartsrv is started for this instance, it can be observed that the last entry shows an attempt to open the "agent.lock" file at the OS level.

       __semop(340787253, 0x0FFFFFFFFFFFAFC0, 1) = 0
       kopen("/usr/sap/<SID>/log/sapccmsr/agent.lock", O_RDONLY O_LARGEFILE)
       = 7
       kioctl(7, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


Read more...

Environment

  • Any SAP environment with sapstartsrv runnning and kernel 710 or above.
  • UNIX Operating System.
  • Not related to a particular DB or SAP Product.

Product

SAP NetWeaver 7.0 ; SAP NetWeaver 7.3 ; SAP NetWeaver 7.4 ; SAP NetWeaver 7.5 ; SAP enhancement package 1 for SAP NetWeaver 7.0 ; SAP enhancement package 1 for SAP NetWeaver 7.3 ; SAP enhancement package 2 for SAP NetWeaver 7.0 ; SAP enhancement package 3 for SAP NetWeaver 7.0

Keywords

NIECONN_REFUSED, Sapstartsrv, FAIL, CCMS, Hanging, Agent.lock, Agent down , KBA , BC-CST-STS , Startup Service , BC-CTS , Change and Transport System , 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.