502 Bad Gateway - Clean installation using installer on a fresh Debian 9.4. No other errors.
See original GitHub issueImpacted versions
- Modoboa: 1.10.4 (latest)
- installer used: Yes
- Webserver: Nginx
- OS: Latest Debian 9.4
Steps to reproduce
apt-get update
apt-get -y dist-upgrade
apt-get -y install python-virtualenv python-pip git sudo
git clone https://github.com/modoboa/modoboa-installer
cd modoboa-installer
sudo ./run.py hostname.domain.tld [enter: n]
In file: installer.cfg change from: hostname = mail.%(domain)s to: hostname = %(domain)s
sudo ./run.py hostname.domain.tld [enter: y]
Output:
root@hostname:~/modoboa-installer# sudo ./run.py hostname.domain.tld Welcome to Modoboa installer!
Configuration file installer.cfg not found, creating new one. Warning: Before you start the installation, please make sure the following DNS records exist for domain ‘hostname.domain.tld’: mail IN A <IP ADDRESS OF YOUR SERVER> IN MX mail.hostname.domain.tld.
Your mail server will be installed with the following components: modoboa automx amavis clamav dovecot nginx razor postfix postwhite spamassassin uwsgi radicale opendkim Do you confirm? (Y/n) n root@hostname:~/modoboa-installer# nano installer.cfg root@hostname:~/modoboa-installer# sudo ./run.py hostname.domain.tld Welcome to Modoboa installer!
Warning: Before you start the installation, please make sure the following DNS records exist for domain ‘hostname.domain.tld’: mail IN A <IP ADDRESS OF YOUR SERVER> IN MX hostname.domain.tld.
Your mail server will be installed with the following components: modoboa automx amavis clamav dovecot nginx razor postfix postwhite spamassassin uwsgi radicale opendkim Do you confirm? (Y/n) y The process can be long, feel free to take a coffee and come back later 😉 Starting… Generating new self-signed certificate Installing amavis Installing spamassassin Installing razor Installing clamav Installing modoboa Installing automx Installing radicale Installing uwsgi Installing nginx Installing opendkim Installing postfix Installing postwhite Installing dovecot Congratulations! You can enjoy Modoboa at https://hostname.domain.tld (admin:password)
Current behavior
When I open: https://hostname.domain.tld i get this error:
502 Bad Gateway nginx/1.10.3
Logs: /var/log/nginx/hostname.domain.tld-error.log
2018/05/03 12:13:43 [error] 738#738: *4 upstream prematurely closed connection while reading response header from upstream, client: x.x.x.x, server: hostname.domain.tld, request: “GET / HTTP/1.1”, upstream: “uwsgi://unix:/run/uwsgi/app/modoboa_instance/socket:”, host: “hostname.domain.tld”
/var/log/uwsgi/app/modoboa_instance.log
Traceback (most recent call last): File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py”, line 157, in call File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 124, in get_response File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 43, in inner File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 93, in response_for_exception File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 142, in handle_uncaught_exception File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/urls/resolvers.py”, line 418, in resolve_error_handler File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/functional.py”, line 35, in get File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/urls/resolvers.py”, line 398, in urlconf_module File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module import(name) File “./instance/urls.py”, line 4, in <module> url(r’‘, include(‘modoboa.urls’)), File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/conf/urls/init.py”, line 50, in include File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module import(name) ImportError: No module named urls hostname.domain.tld [pid: 1391|app: 1|req: 11/21] x.x.x.x () {52 vars in 921 bytes} [Thu May 3 14:27:05 2018] GET / => generated 0 bytes in 211 msecs (HTTP/1.1 500) 0 headers in 0 bytes (1 switches on core 0) Traceback (most recent call last): File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py”, line 157, in call File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 124, in get_response File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 43, in inner File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 93, in response_for_exception File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 142, in handle_uncaught_exception File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/urls/resolvers.py”, line 418, in resolve_error_handler File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/functional.py”, line 35, in get File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/urls/resolvers.py”, line 398, in urlconf_module File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module import(name) File “./instance/urls.py”, line 4, in <module> url(r’', include(‘modoboa.urls’)), File “/srv/modoboa/env/local/lib/python2.7/site-packages/django/conf/urls/init.py”, line 50, in include File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module import(name) ImportError: No module named urls hostname.domain.tld [pid: 1392|app: 1|req: 11/22] x.x.x.x () {54 vars in 926 bytes} [Thu May 3 14:27:06 2018] GET /favicon.ico => generated 0 bytes in 90 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (4 by maintainers)
Top GitHub Comments
@desavil I wont reproduce your installation, I don’t have time for this. Anyway, I misread the issue’s description: your initial command line was wrong. Do not pass
hostname.domain.tld
as first argument but justdomain.tld
.@desavil It’s problem in installer https://github.com/modoboa/modoboa-installer/issues/197#issuecomment-385621392 . Workaround is working , but dkim is not . After third reinstall - actually, I’m beat. Doing the same manually i’ve lost less time .