SpriteLink / NIPAP

Neat IP Address Planner - NIPAP is the best open source IPAM in the known universe, challenging classical IP address management (IPAM) systems in many areas.
https://spritelink.github.io/NIPAP/
MIT License
524 stars 132 forks source link

Got internal server error on web UI #1350

Open titanotom opened 8 months ago

titanotom commented 8 months ago

I got internal server error on nipap web UI after upgrade. This the log

[Wed Oct 25 17:20:30.716799 2023] [wsgi:error] Traceback (most recent call last): [Wed Oct 25 17:20:30.716823 2023] [wsgi:error] File "/etc/nipap/www/nipap-www.wsgi", line 7, in [Wed Oct 25 17:20:30.716827 2023] [wsgi:error] from nipapwww import create_app [Wed Oct 25 17:20:30.716837 2023] [wsgi:error] ImportError: No module named 'nipapwww' [Wed Oct 25 17:20:30.859976 2023] [wsgi:error] mod_wsgi (pid=30011): Target WSGI script '/etc/nipap/www/nipap-www.wsgi' cannot be loaded as Python module., referer: https://ipam.te.net.id/ [Wed Oct 25 17:20:30.860010 2023] [wsgi:error] mod_wsgi (pid=30011): Exception occurred processing WSGI script '/etc/nipap/www/nipap-www.wsgi'., referer: https://ipam.te.net.id/ [Wed Oct 25 17:20:30.860062 2023] [wsgi:error] Traceback (most recent call last):, referer: https://ipam.te.net.id/ [Wed Oct 25 17:20:30.860079 2023] [wsgi:error] File "/etc/nipap/www/nipap-www.wsgi", line 7, in , referer: https://ipam.te.net.id/ [Wed Oct 25 17:20:30.860082 2023] [wsgi:error] from nipapwww import create_app, referer: https://ipam.te.net.id/ [Wed Oct 25 17:20:30.860092 2023] [wsgi:error] ImportError: No module named 'nipapwww', referer: https://ipam.te.net.id/

is it something wrong with nipapwww?

garberg commented 8 months ago

What version are you running? 0.32.0, where we finally took the step to Python 3? How are you serving the web UI? You probably need to install a Python 3 capable WSGI server.

If you're using the Debian packages you should've gotten a notification regarding that during the upgrade.

titanotom commented 8 months ago

nipapd and nipap-www is the newest version (0.31.2-1) and i already install libapache2-mod-wsgi-py3.

What a notification?the only notification i got when i ran apt upgrade was the option of configure randomized secret_key.

garberg commented 8 months ago

Okay, that's odd.. I presume you have restarted Apache? If you just start an interactive Python 3 interpreter, can you import nipapwww?

What distribution are you running NIPAP on?

titanotom commented 8 months ago

Yes i have restarted apache and nipapd. How to import nipapwww?

I'm running on ubuntu 16.04

garberg commented 8 months ago

Just run python3 in a shell and then import nipapwww.

Ubuntu 16.04 ships with Python 3.5, I haven't tested NIPAP with versions < 3.6. Automated tests are run on Ubuntu 20.04, I've tested manually on 18.04. Would you consider a dist upgrade?

titanotom commented 8 months ago

This what i got when tried to import nipapwww on version 3.5 and 3.8

Python 3.5.2 (default, Jan 26 2021, 13:30:48) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nipapwww Traceback (most recent call last): File "", line 1, in ImportError: No module named 'nipapwww' >>> quit()

Python 3.8.6 (default, Dec 6 2020, 14:28:49) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. *>>> import nipapwww Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'nipapwww' Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 25, in from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in import apt File "/usr/lib/python3/dist-packages/apt/init.py", line 23, in import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'

Original exception was: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'nipapwww'

jacobghattas commented 6 months ago

same over here...

import nipapwww Traceback (most recent call last): File "", line 1, in ImportError: No module named nipapwww

jacobghattas commented 6 months ago

running ubuntu 20.04.6

julianbeauregardcamp commented 2 months ago

Getting the same type of error. Anyone got a fix for this on Ubuntu 20.04?