NCPA: Connection error: '[Errno 104] Connection reset by pee

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

NCPA: Connection error: '[Errno 104] Connection reset by pee

Post by evisus »

Best regards!

We have had problems with the operation of NCPA on an Oracle machine, from nagios we execute the command:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xxx.xxx.xxx.xxx -t 'mytoken' -P 5693 -M 'disk/logical/|boot' -w '80' -c '90' 
And you get the answer:

Code: Select all

UNKNOWN: An error occurred connecting to API. (Connection error: '[Errno 104] Connection reset by peer')
We have already ruled out firewalls, the installation of the package to the latest compatible version, the operation of the service and the password.

Reviewing the ncpa log when executing the services on the client with the line:

Code: Select all

/usr/local/ncpa/ncpa_listener -c /usr/local/ncpa/etc/ncpa.cfg -n
We get the following error in the log:

Code: Select all

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/gevent/greenlet.py", line 536, in run
    if formatted:
  File "/usr/local/lib/python2.7/site-packages/gevent/baseserver.py", line 26, in _handle_and_close_when_done
    # do_handle. On CPython, this is ~20% faster than creating and calling
  File "/usr/local/lib/python2.7/site-packages/gevent/server.py", line 174, in wrap_socket_and_handle
    def init_socket(self):
  File "/usr/local/lib/python2.7/site-packages/gevent/_sslgte279.py", line 695, in wrap_socket
    # does have a read/write timeout property as an alias for
  File "/usr/local/lib/python2.7/site-packages/gevent/_sslgte279.py", line 198, in __init__
    suppress_ragged_eofs=True, npn_protocols=None, ciphers=None,
IOError: [Errno 13] Permission denied
Thu Nov 17 10:08:48 2022 <Greenlet at 0x7f74bd90ad70: _handle_and_close_when_done(<bound method WSGIServer.wrap_socket_and_handle of, <bound method WSGIServer.do_close of <WSGIServer a, (<socket at 0x7f74bd4b4e90 fileno=[Errno 9] Bad fi)> failed with IOError
Any idea the cause of the error?

I share the data of Nagios XI and the client:

NagiosXI

Code: Select all

Nagios XI version: 5.8.3
Release info: nagiosxi-prd 3.10.0-957.12.2.el7.x86_64 x86_64
CentOS Linux release 7.6.1810 (Core)
Gnome is not installed
Cliente:

Code: Select all

Oracle Linux Server release 7.9
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Oracle Linux Server release 7.9

Code: Select all

● ncpa_listener.service - LSB: This manages the NCPA Listener service
   Loaded: loaded (/etc/rc.d/init.d/ncpa_listener; bad; vendor preset: disabled)
   Active: active (running) since Thu 2022-11-17 11:12:36 -03; 7s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 86815 ExecStop=/etc/rc.d/init.d/ncpa_listener stop (code=exited, status=0/SUCCESS)
  Process: 86850 ExecStart=/etc/rc.d/init.d/ncpa_listener start (code=exited, status=0/SUCCESS)
    Tasks: 2
   Memory: 34.9M
   CGroup: /system.slice/ncpa_listener.service
           └─86865 /usr/local/ncpa/ncpa_listener --start

Nov 17 11:12:36 p-db-pucondr systemd[1]: Starting LSB: This manages the NCPA Listener service...
Nov 17 11:12:36 p-db-pucondr ncpa_listener[86850]: Starting NCPA Listener: [  OK  ]
Nov 17 11:12:36 p-db-pucondr systemd[1]: Started LSB: This manages the NCPA Listener service.
Post Reply