modoboa / modoboa-imap-migration

An extension to ease the migration between 2 IMAP servers using offlineimap
ISC License
16 stars 12 forks source link

Internal Server Error after activating modoboa-imap-migration #25

Closed Goosse closed 7 years ago

Goosse commented 7 years ago

I seem to be having the same problem as mentioned in the link below. I have set debug to True, but am seeing no new error messages in the browser.

https://groups.google.com/forum/#!topic/modoboa-users/5nlV_lrsPfA

Goosse commented 7 years ago

Ok, so I found the logs at /var/log/uwsgi/app/modoboa_instance.log.

Here is the log I am getting:

Traceback (most recent call last): File "./instance/wsgi.py", line 16, in application = get_wsgi_application() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup(set_prefix=False) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/init.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 78, in populate raise RuntimeError("populate() isn't reentrant") RuntimeError: populate() isn't reentrant Thu Oct 5 18:24:20 2017 - unable to load app 0 (mountpoint='mail.email.wheatstatewooddesign.com|') (callable not found or import error) Thu Oct 5 18:24:20 2017 - --- no python application found, check your startup logs for errors --- mail.email.wheatstatewooddesign.com [pid: 10576|app: -1|req: -1/6] 162.201.236.210 () {48 vars in 928 bytes} [Thu Oct 5 18:24:20 2017] GET /accounts/login/?next=/dashboard/ => generated 21 bytes in 2 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

Goosse commented 7 years ago

When I call service uwsgi restart as the

no python application found, check your startup logs for errors

above suggests should be done, the following is logged to that file:

Fri Oct 6 17:16:00 2017 - SIGINT/SIGQUIT received...killing workers... Fri Oct 6 17:16:01 2017 - worker 1 buried after 1 seconds Fri Oct 6 17:16:01 2017 - worker 2 buried after 1 seconds Fri Oct 6 17:16:01 2017 - goodbye to uWSGI. Fri Oct 6 17:16:01 2017 - VACUUM: unix socket /run/uwsgi/app/modoboa_instance/socket removed. Fri Oct 6 11:16:01 2017 - Starting uWSGI 2.0.15 (64bit) on [Fri Oct 6 11:16:01 2017] Fri Oct 6 11:16:01 2017 - compiled with version: 5.4.0 20160609 on 05 October 2017 12:13:01 Fri Oct 6 11:16:01 2017 - os: Linux-2.6.32-042stab120.16 #1 SMP Tue Dec 13 20:58:28 MSK 2016 Fri Oct 6 11:16:01 2017 - nodename: ssdnodes-85608 Fri Oct 6 11:16:01 2017 - machine: x86_64 Fri Oct 6 11:16:01 2017 - clock source: unix Fri Oct 6 11:16:01 2017 - pcre jit disabled Fri Oct 6 11:16:01 2017 - detected number of CPU cores: 4 Fri Oct 6 11:16:01 2017 - current working directory: / Fri Oct 6 11:16:01 2017 - writing pidfile to /run/uwsgi/app/modoboa_instance/pid Fri Oct 6 11:16:01 2017 - detected binary path: /usr/local/bin/uwsgi Fri Oct 6 11:16:01 2017 - setgid() to 1000 Fri Oct 6 11:16:01 2017 - setuid() to 1000 Fri Oct 6 11:16:01 2017 - chdir() to /srv/modoboa/instance Fri Oct 6 11:16:01 2017 - your processes number limit is 2062787 Fri Oct 6 11:16:01 2017 - your memory page size is 4096 bytes Fri Oct 6 11:16:01 2017 - detected max file descriptor number: 131072 Fri Oct 6 11:16:01 2017 - VirtualHosting mode enabled. Fri Oct 6 11:16:01 2017 - lock engine: pthread robust mutexes Fri Oct 6 11:16:01 2017 - thunder lock: disabled (you can enable it with --thunder-lock) Fri Oct 6 11:16:02 2017 - RRDtool library available at 0xc10bc0 Fri Oct 6 11:16:02 2017 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/modoboa_instance/socket fd 3 Fri Oct 6 11:16:02 2017 - Python version: 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] Fri Oct 6 11:16:02 2017 - Set PythonHome to /srv/modoboa/env Fri Oct 6 11:16:02 2017 - Python threads support is disabled. You can enable it with --enable-threads Fri Oct 6 11:16:02 2017 - Python main interpreter initialized at 0xc29e80 Fri Oct 6 11:16:02 2017 - your server socket listen backlog is limited to 100 connections Fri Oct 6 11:16:02 2017 - your mercy for graceful operations on workers is 60 seconds Fri Oct 6 11:16:02 2017 - mapped 218304 bytes (213 KB) for 2 cores Fri Oct 6 11:16:02 2017 - Operational MODE: preforking Traceback (most recent call last): File "./instance/wsgi.py", line 16, in application = get_wsgi_application() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup(set_prefix=False) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/init.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) ImportError: No module named modoboa_imap_migration Fri Oct 6 17:16:02 2017 - unable to load app 0 (mountpoint='') (callable not found or import error) Fri Oct 6 17:16:02 2017 - no app loaded. going in full dynamic mode Fri Oct 6 17:16:02 2017 - uWSGI is running in multiple interpreter mode Fri Oct 6 17:16:02 2017 - spawned uWSGI master process (pid: 20398) Fri Oct 6 17:16:02 2017 - spawned uWSGI worker 1 (pid: 20414, cores: 1) Fri Oct 6 17:16:02 2017 - spawned uWSGI worker 2 (pid: 20415, cores: 1)

So, obviously the modoboa_imap_migration is not being found...

tonioo commented 7 years ago

@Goosse If you use a virtualenv, please make sure you installed the imap migration plugin into it.

Goosse commented 7 years ago

Does the installer use a virtualenv by default?

tonioo commented 7 years ago

yes it does

Goosse commented 7 years ago

What would be the virtualenv_path then?

tonioo commented 7 years ago

Default location is /srv/modoboa/env. Before installing/updating a plugin, run this:

> su - modoboa
> bash
> source env/bin/activate
Goosse commented 7 years ago

Thanks for your help