mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 08:56:02 +03:00
[GH-ISSUE #2720] Internal error on fresh reinstallation #1687
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yannfill on GitHub (Dec 28, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2720
Hi,
On a fresh reinstall the the login page is displayed correctly but after logging I get an internal error. With
DEBUG = Truein settings.py, I launch gunicorn with this command:I have no trace on stdout or on the web page, simply internal error on red background.
@yannfill commented on GitHub (Dec 28, 2022):
I'm using python 3.10 in venv.
@Spitfireap commented on GitHub (Dec 28, 2022):
Hi,
Could you open browser console with
DEBUG = Trueand try to log in ? Requests with error should logically have a trace within the response.@yannfill commented on GitHub (Dec 28, 2022):
All I get is:
No usable info in the error 500.
If I try /new-admin everything seems to work fine.
@Spitfireap commented on GitHub (Dec 28, 2022):
Okay, so I guess that if you reload the page without the browser cache, you see a bunch of 404 error (like jquery) ? If so, you might need to re-apply static collection (
python manage.py collectstatic) and checkSTATIC_ROOTin yoursettings.py.@yannfill commented on GitHub (Dec 28, 2022):
I always do ctrl-shift-R to flush the browser cache, I see no 404. Error 500 on /dashboard/ and 200 for JS and CSS.
@yannfill commented on GitHub (Dec 28, 2022):
Are modoboa.policyd and modoboa.maillog mandatory in MODOBOA_APPS ?
@Spitfireap commented on GitHub (Dec 29, 2022):
policyd is what manage relationship with postfix and maillog is for analyzing logs for the stats. These are not extensions but core feature, so I would leave them there.
As for the error 500, having
DEBUG = Trueshould input the trace in the response of the request. Else it might suggest that there is an issue on Nginx side. Have you checked Nginx access logs ?@yannfill commented on GitHub (Dec 29, 2022):
The error 500 is logged in nginx access log, not error log, so I don't think it's on nginx side. And the internal error seems like a django formatted output.
The thing that I don't understand is, in spite of having
DEBUG = Truein settings.py,debug = trueandloglevel = debugin gunicorn.conf.py, I don't see any error anywhere, not on stdout when using command line or in journald when using systemd unit, or in browser console. If I split gunicorn access and error logs in 2 files, the access log is empty and no error appears in the error log.Maybe the problem lies between nginx and the gunicorn socket but I don't know how to debug it. It was working a few weeks ago and I don't think anything has changed since then.
@Spitfireap commented on GitHub (Dec 29, 2022):
Yes, If it was on Django side, you would have the traceback. I don't use gunicorn, so I can't really help you on this. Perhaps you could leave the DEBUG to True and restart your server. So you are sure that everything is reloading correctly ?
Do you see the POST request directed to /login ?
@yannfill commented on GitHub (Dec 29, 2022):
OK, in fact I was using the wrong settings.py file. I still have error 500 but know I have traces:
@yannfill commented on GitHub (Dec 29, 2022):
Seems related to a change in python 3.10: https://bobbyhadz.com/blog/python-attributeerror-module-collections-has-no-attribute-callable
@Spitfireap commented on GitHub (Dec 29, 2022):
Much better, so yes. Simple fix: remove
py-dateutilfrom the venv and installpython-dateutil@yannfill commented on GitHub (Dec 29, 2022):
Indeed, now everything is working. Than you very much for your help @Spitfireap.