1 (edited by nicola.braccia 2013-12-19 18:17:00)

Topic: mod_wsgi error Pro-PGSQL-1.4.0 upgrade

======== Required information ====
- iRedMail version: 0.8.6 upgraded from 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  PGSQL
- Linux/BSD distribution name and version: Debian 7
====
Apache LOG

[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33] mod_wsgi (pid=15911): Target WSGI script '/usr/share/apache2/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33] mod_wsgi (pid=15911): Exception occurred processing WSGI script '/usr/share/apache2/iredadmin/iredadmin.py'.
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33] Traceback (most recent call last):
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]   File "/usr/share/apache2/iredadmin/iredadmin.py", line 8, in <module>
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]     from libs import iredbase
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 16, in <module>
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]     import iredutils
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]   File "/usr/share/apache2/iredadmin/libs/iredutils.py", line 15, in <module>
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]     import settings
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]   File "/usr/share/apache2/iredadmin/settings.py", line 74
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]     policyd_db_port =
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33]                      ^
[Thu Dec 19 10:42:25 2013] [error] [client 192.168.1.33] SyntaxError: invalid syntax

/usr/share/apache2 permissions

drwxr-xr-x  10 root      root       4096 dic 19 10:29 .
drwxr-xr-x 113 root      root       4096 ott 15 21:08 ..
drwxr-xr-x   2 root      root       4096 ott  8 17:46 build
drwxr-xr-x   2 root      root       4096 ott  8 17:46 default-site
drwxr-xr-x   3 root      root       4096 ott  8 17:46 error
drwxr-xr-x   3 root      root      12288 ott  8 17:46 icons
lrwxrwxrwx   1 root      root         25 dic 19 10:29 iredadmin -> iRedAdmin-Pro-PGSQL-1.4.0
dr-xr-xr-x   8 iredadmin iredadmin  4096 ott  8 18:01 iRedAdmin-0.2.2
dr-xr-xr-x   9 iredadmin iredadmin  4096 dic 19 10:36 iRedAdmin-Pro-PGSQL-1.3.0
dr-xr-xr-x   9 iredadmin iredadmin  4096 dic 19 09:59 iRedAdmin-Pro-PGSQL-1.4.0
lrwxrwxrwx   1 root      root         20 dic 18 18:12 roundcubemail -> roundcubemail-0.9.5/
drwxr-xr-x  11 root      root       4096 dic 18 18:08 roundcubemail-0.9.5

iRedAdmin-Pro-PGSQL-1.4.0 permissions

dr-xr-xr-x  9 iredadmin iredadmin  4096 dic 19 09:59 .
drwxr-xr-x 10 root      root       4096 dic 19 10:29 ..
-r-xr-xr-x  1 iredadmin iredadmin    36 dic 16 17:58 AUTHORS
-r-xr-xr-x  1 iredadmin iredadmin 10117 dic 16 17:58 ChangeLog.pgsql
dr-xr-xr-x  7 iredadmin iredadmin  4096 dic 16 17:58 controllers
dr-xr-xr-x  3 iredadmin iredadmin  4096 dic 16 17:58 docs
-r-xr-xr-x  1 iredadmin iredadmin   550 dic 16 17:58 EULA
dr-xr-xr-x 18 iredadmin iredadmin  4096 dic 16 17:58 i18n
-r-xr-xr-x  1 iredadmin iredadmin   384 dic 16 17:58 iredadmin.py
dr-xr-xr-x  7 iredadmin iredadmin  4096 dic 19 10:06 libs
-r-xr-xr-x  1 iredadmin iredadmin   416 dic 16 17:58 README
-r--------  1 iredadmin iredadmin  3879 dic 19 09:58 settings.py
-r-xr-xr-x  1 iredadmin iredadmin  3814 dic 16 17:58 settings.py.pgsql.sample
dr-xr-xr-x  4 iredadmin iredadmin  4096 dic 16 17:58 static
dr-xr-xr-x  3 iredadmin iredadmin  4096 dic 16 17:58 templates
dr-xr-xr-x  2 iredadmin iredadmin  4096 dic 16 17:58 tools

dpkg -l | grep apache

ii  apache2                            2.2.22-13                     amd64        Apache HTTP Server metapackage
ii  apache2-mpm-prefork                2.2.22-13                     amd64        Apache HTTP Server - traditional non-threaded model
ii  apache2-utils                      2.2.22-13                     amd64        utility programs for webservers
ii  apache2.2-bin                      2.2.22-13                     amd64        Apache HTTP Server common binary files
ii  apache2.2-common                   2.2.22-13                     amd64        Apache HTTP Server common files
ii  libapache2-mod-auth-mysql          4.3.9-13.1+b1                 amd64        Apache 2 module for MySQL authentication
ii  libapache2-mod-auth-pgsql          2.0.3-5                       amd64        Module for Apache2 which provides pgsql authentication
ii  libapache2-mod-php5                5.4.4-14+deb7u7               amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-wsgi                3.3-4                         amd64        Python WSGI adapter module for Apache

i follow your upgrade tutorial step by step, but when I try to access in the admin appears "500 internal server error"
thank you

2

Re: mod_wsgi error Pro-PGSQL-1.4.0 upgrade

if i modify the file libs/iredbase.py from

# Check Policyd/Cluebringer
enable_policyd = settings.policyd_enabled
enable_cluebringer = settings.policyd_enabled
if settings.policyd_db_name in ['cluebringer']:
    enable_policyd = False

to

# Check Policyd/Cluebringer
enable_policyd = settings.policyd_enabled
enable_cluebringer = settings.policyd_enabled
#if settings.policyd_db_name in ['cluebringer']:
#    enable_policyd = False

i can access to iredadmin

3

Re: mod_wsgi error Pro-PGSQL-1.4.0 upgrade

sorry my mistake: in settings.py all the fields of policyd was empty, i solved this problem but i have the same issue reported Here