NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
176 stars 95 forks source link

AIX ncpa_listener not starting #369

Closed metabsd closed 6 years ago

metabsd commented 6 years ago
root@servername:/usr/local/ncpa# ./ncpa_listener
Traceback (most recent call last):
  File "/opt/freeware/lib/python2.7/site-packages/cx_Freeze-4.3.4-py2.7-aix-6.1.egg/cx_Freeze/initscripts/Console.py", line 27, in <module>
  File "ncpa_listener.py", line 5, in <module>
  File "/tmp/test/ncpa/agent/ncpadaemon.py", line 14, in <module>
  File "/tmp/test/ncpa/agent/listener/database.py", line 5, in <module>
  File "/tmp/test/ncpa/agent/listener/server.py", line 11, in <module>
  File "/tmp/test/ncpa/agent/listener/psapi.py", line 3, in <module>
  File "/tmp/test/psutil/psutil/__init__.py", line 163, in <module>
  File "/tmp/test/psutil/psutil/_psaix.py", line 20, in <module>
  File "ExtensionLoader_psutil__psutil_aix.py", line 25, in <module>
  File "ExtensionLoader_psutil__psutil_aix.py", line 17, in __bootstrap__
ImportError: rtld: 0712-001 Symbol perfstat_thread was referenced
      from module /usr/local/ncpa/psutil._psutil_aix.so(), but a runtime definition
        of the symbol was not found.

yum info python

root@servername:/usr/local/ncpa# yum info python
Installed Packages
Name        : python
Arch        : ppc
Version     : 2.7.13
Release     : 1
Size        : 58 M
Repo        : installed
Summary     : An interpreted, interactive, object-oriented programming language.
URL         : http://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
            : language often compared to Tcl, Perl, Scheme or Java. Python includes
            : modules, classes, exceptions, very high level dynamic data types and
            : dynamic typing. Python supports interfaces to many system calls and
            : libraries, as well as to various windowing systems (X11, Motif, Tk,
            : Mac and MFC).
            : 
            : Programmers can write new built-in modules for Python in C or C++.
            : Python can be used as an extension language for applications that need
            : a programmable interface. This package contains most of the standard
            : Python modules, as well as modules for interfacing to the Tix widget
            : set for Tk and RPM.
            : 
            : Note that documentation for Python is provided in the python-docs
            : package.

I see you bundle psutil._psutil_aix.so in /usr/local/ncpa. I make sure to setup LIBPATH=/usr/local/ncpa

I think I have to use the same minimal version of AIX 6.1 you use to compile NCPA on AIX.

The version I use right now is oslevel -s --> 6100-08-02-1316

Sometime with AIX we cannot update to the latest because of specific version support for specific Application.

Thank you!!!

jomann09 commented 6 years ago

We built it on AIX 6.1 so I don't know if that is the problem, I will look up the version it was built on and post it back here.

There are some specific counters that have to be available on the system that I don't think are always enabled by default that might be why that error is happening. I think it is something like bos.perf.libperfstat or whatever provides perfstat_thread on the IBM AIX machines.

jomann09 commented 6 years ago

oslevel -s returned 6100-04-01-0944 btw

metabsd commented 6 years ago

ok I will check if those bff is already installed.

metabsd commented 6 years ago

Those bff are already installed.

root@servername:/root# lslpp -l | grep -i perfstat
  bos.perf.libperfstat      6.1.8.15  COMMITTED  Performance Statistics Library
  bos.perf.perfstat         6.1.8.15  COMMITTED  Performance Statistics
  bos.perf.libperfstat      6.1.8.15  COMMITTED  Performance Statistics Library
  bos.perf.perfstat          6.1.4.0  COMMITTED  Performance Statistics
jomann09 commented 6 years ago

I wonder if it needs something else too for that to work, those looks correct to me.

metabsd commented 6 years ago

I will continue de deployment. For the moment I have 1 AIX 6.1 not working.

jomann09 commented 6 years ago

image I think this is the problem, the library version you have is lower than the one on the build server. Which is interesting, considering the AIX version says it's an older 6.1 system. Any thoughts?

Sorry for the screenshot by the way, it's in the applet :)

typer100 commented 6 years ago

I can confirm after updating perfstat to 6.1.9.xxx, the client works. 6.1.9.0 was release 3rd quarter of 2013 (1341). 6.1.8.15 was release first quarter of 2013. Maybe later version of 6.1.8 will work too.

jomann09 commented 6 years ago

Thanks for the confirmation.

I'm going to close this then, I thought that was the case once I saw what we were running on the build server. I doubt we will be able to go backwards and if it's only one server then I won't do anything. Feel free to re-open this if it becomes and issue and we need to look at an older build.