PalisadoesFoundation / switchmap-ng

A Python 3 inventory system that tabulates the status of network ports.
Apache License 2.0
16 stars 7 forks source link

Can't get program to run #119

Closed ryan12345678901 closed 3 years ago

ryan12345678901 commented 5 years ago

When running install.py, can not start daemon switchmap-ng-api and switchmap-ng-poller. How do I fix this? This is a fresh install of Ubuntu 18.04.2 LTS.

root@ryan-Virtual-Machine:/home/switchmap-ng# maintenance/install.py Please enter the username under which infoset-ng will run: root OK - Systemd installed. OK - Python version 3.6. OK - Python pip3 executable found. OK - Python module "setuptools" is installed. OK - Python pip3 executable found. OK - Python module "PyYAML" is installed. OK - Created configuration file /home/switchmap-ng/etc/config.yaml. OK - Installing required pip3 packages from requirements.txt file. Change ownership of /home/switchmap-ng directory to user:root group:root (y,N) ?: y 2019-06-21 15:08:07,878323 - root - STATUS - [1127] Could not start daemon switchmap-ng-api. 2019-06-21 15:08:07,878465 - root - STATUS - [1001] Failed to start daemon switchmap-ng-api. 2019-06-21 15:08:08,208075 - root - STATUS - [1127] Could not start daemon switchmap-ng-poller. 2019-06-21 15:08:08,208214 - root - STATUS - [1001] Failed to start daemon switchmap-ng-poller.

Edit file /home/switchmap-ng/etc/config.yaml with correct SNMP parameters and then restart the daemons.

You can restart switchmap-ng daemons with these commands:

$ bin/switchmap-ng-cil restart api $ bin/switchmap-ng-cli restart poller

OK - Installation complete, pending changes mentioned above.

geoffroi commented 4 years ago

Hello, I have the same issue. It seems to be an issue with gunicorn 20.0.4 vs 19.9.0. Is there a fix to run switchmap-ng with gunicorn 20.0.0.4 ? Thanks Geoffroi

palisadoes commented 4 years ago

This should be fixed now. Older versions of Gunicorn used python iteritems for cycling through dictionaries. Newer versions use items like python3. Let me know if it works for you now.

The code has been updated, you will need to clone it again.

geoffroi commented 4 years ago

Hi there,

Thanks a lot, now it is working on a CentOS8.

Cheers.

Geoffroi