Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got internal server error on web UI #1350

Open
titanotom opened this issue Oct 25, 2023 · 10 comments
Open

Got internal server error on web UI #1350

titanotom opened this issue Oct 25, 2023 · 10 comments

Comments

@titanotom
Copy link

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
Copy link
Member

garberg commented Oct 25, 2023

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
Copy link
Author

titanotom commented Oct 26, 2023

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
Copy link
Member

garberg commented Oct 26, 2023

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
Copy link
Author

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

I'm running on ubuntu 16.04

@garberg
Copy link
Member

garberg commented Oct 26, 2023

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
Copy link
Author

titanotom commented Oct 27, 2023

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
Copy link

same over here...

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

@jacobghattas
Copy link

running ubuntu 20.04.6

@julianbeauregardcamp
Copy link

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

@atrogu
Copy link

atrogu commented Dec 6, 2024

Hello, my nipap installation on Ubuntu 20.04 gave the same errors, then I've found that it needed libapache2-mod-wsgi-py3 instead of libapache2-mod-wsgi installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants