NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
181 stars 94 forks source link

Installing/running NCPA on Catalina 10.15.4 issue #625

Open LukeyGee opened 4 years ago

LukeyGee commented 4 years ago

I ran through the documentation on installing the agent on MacOS. My endpoint is running 10.15.4.

The web service never started, running the ncpa_listener resulted in the following return;

bash-3.2# ./ncpa_listener Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/cx_Freeze-4.3.4-py2.7-macosx-10.15-x86_64.egg/cx_Freeze/initscripts/Console.py", line 27, in <module> File "ncpa_listener.py", line 8, in <module> File "/Users/nagiosdev/repos/ncpa/agent/ncpadaemon.py", line 14, in <module> File "/Users/nagiosdev/repos/ncpa/agent/listener/database.py", line 3, in <module> File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module> File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module> ImportError: dlopen(/usr/local/ncpa/_sqlite3.so, 2): Symbol not found: _sqlite3_enable_load_extension Referenced from: /usr/local/ncpa/_sqlite3.so Expected in: /usr/lib/libsqlite3.dylib in /usr/local/ncpa/_sqlite3.so

I ended up running brew install python, restarted the listener and it is now up and running.

Are there pre-reqs missing on the installation doco ( https://www.nagios.org/ncpa/getting-started.php#mac ) or have i done something wrong? Im able to reproduce this on a fresh 10.15 machine.

jomann09 commented 4 years ago

You should not be required to install python on the system in order for it to work, that would mean that for some reason it's not able to "find" the python that is bundled with the software. This could be for a few reasons, however I haven't seen this issue before.

I'll try testing this on our mac, but I am not sure if I will be able to do it until we are back in the office and I have access to it again.

epaulsen5 commented 4 years ago

I posted on another Catalina thread as well about an issue running the Mac NCPA agent on a newly updated Catalina system. I went from 10.14.6 to 10.15.4 and NCPA stopped working. It was working fine in Mojave. I deleted the /usr/local/ncpa directory, removed the launchctl files, deleted user and group, and tried reinstalling. It installs, but won't run. If I manually try to run the listener, a dialog appears saying the developer can't be verified. If I disable SIP, it runs fine. Obviously, I don't want to run this way, so I've reenabled SIP, and am looking for another workaround with NCPA. Any suggestions?

jomann09 commented 4 years ago

Unfortunately I don't have an updated Mac with Catalina on it to test at the moment. When I was doing testing before, I believe we had to add a line in for it to trust the agent in order for it to run it as a system service, but I can't recall where that was at.

dcoobs commented 4 years ago

We're still seeing this issue on 10.15.7

dcoobs commented 4 years ago

I'm wondering if https://github.com/NagiosEnterprises/ncpa/blob/master/build/osx/setup.sh#L3 should be 2.7.16, which is the version of Python located in the build/resources directory. It's currently set to 2.7.14.