1

Topic: iRedAdmin: ImportError: No module named settings

Hi ZhangHuangbin help me

tail -f /var/log/apache2/error.log
[Sat Mar 15 10:57:51.483357 2014] [:error] [pid 2734] [client x.x.x.x:55589] mod_wsgi (pid=2734): Target WSGI script '/usr/share/apache2/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Sat Mar 15 10:57:51.483472 2014] [:error] [pid 2734] [client x.x.x.x:55589] mod_wsgi (pid=2734): Exception occurred processing WSGI script '/usr/share/apache2/iredadmin/iredadmin.py'.
[Sat Mar 15 10:57:51.483508 2014] [:error] [pid 2734] [client x.x.x.x:55589] Traceback (most recent call last):
[Sat Mar 15 10:57:51.483524 2014] [:error] [pid 2734] [client x.x.x.x:55589]   File "/usr/share/apache2/iredadmin/iredadmin.py", line 9, in <module>
[Sat Mar 15 10:57:51.483574 2014] [:error] [pid 2734] [client x.x.x.x:55589]     from libs import iredbase
[Sat Mar 15 10:57:51.483587 2014] [:error] [pid 2734] [client x.x.x.x:55589]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 18, in <module>
[Sat Mar 15 10:57:51.483668 2014] [:error] [pid 2734] [client x.x.x.x:55589]     import iredutils
[Sat Mar 15 10:57:51.483682 2014] [:error] [pid 2734] [client x.x.x.x:55589]   File "/usr/share/apache2/iredadmin/libs/iredutils.py", line 13, in <module>
[Sat Mar 15 10:57:51.483831 2014] [:error] [pid 2734] [client x.x.x.x:55589]     import settings
[Sat Mar 15 10:57:51.483868 2014] [:error] [pid 2734] [client x.x.x.x:55589] ImportError: No module named settings

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedAdmin: ImportError: No module named settings

xlancyber wrote:

[Sat Mar 15 10:57:51.483868 2014] [:error] [pid 2734] [client x.x.x.x:55589] ImportError: No module named settings

You don't have iRedAdmin config file /usr/share/apache2/iredadmin/settings.py.

3

Re: iRedAdmin: ImportError: No module named settings

ZhangHuangbin wrote:
xlancyber wrote:

[Sat Mar 15 10:57:51.483868 2014] [:error] [pid 2734] [client x.x.x.x:55589] ImportError: No module named settings

You don't have iRedAdmin config file /usr/share/apache2/iredadmin/settings.py.

hi ZhangHuangbin...i have /usr/share/apache2/iredadmin/settings.py

dr-xr-xr-x  9 iredadmin iredadmin  4096 Mar 15 20:51 .
drwxr-xr-x  9 root      root       4096 Mar 15 20:46 ..
-rw-r--r--  1 iredadmin iredadmin    49 Oct 14 09:20 AUTHORS
-rw-r--r--  1 iredadmin iredadmin  3958 Oct 14 09:20 ChangeLog
drwxr-xr-x  6 iredadmin iredadmin  4096 Mar 15 20:45 controllers
drwxr-xr-x  3 iredadmin iredadmin  4096 Mar 15 20:45 docs
drwxr-xr-x 18 iredadmin iredadmin  4096 Mar 15 20:45 i18n
-rw-r--r--  1 iredadmin iredadmin   402 Oct 14 09:20 iredadmin.py
drwxr-xr-x  6 iredadmin iredadmin  4096 Mar 15 20:45 libs
-rw-r--r--  1 iredadmin iredadmin 18092 Oct 14 09:20 LICENSE
-rw-r--r--  1 iredadmin iredadmin   439 Oct 14 09:20 README
-r--------  1 iredadmin iredadmin  3831 Mar 15 20:51 settings.py
-rw-r--r--  1 iredadmin iredadmin  4468 Oct 14 09:20 settings.py.ldap.sample
-rw-r--r--  1 iredadmin iredadmin  3831 Oct 14 09:20 settings.py.mysql.sample
-rw-r--r--  1 iredadmin iredadmin  3814 Oct 14 09:20 settings.py.pgsql.sample
drwxr-xr-x  4 iredadmin iredadmin  4096 Mar 15 20:45 static
drwxr-xr-x  3 iredadmin iredadmin  4096 Mar 15 20:45 templates
drwxr-xr-x  2 iredadmin iredadmin  4096 Oct 14 09:20 tools

4

Re: iRedAdmin: ImportError: No module named settings

xlancyber wrote:
ZhangHuangbin wrote:
xlancyber wrote:

[Sat Mar 15 10:57:51.483868 2014] [:error] [pid 2734] [client x.x.x.x:55589] ImportError: No module named settings

You don't have iRedAdmin config file /usr/share/apache2/iredadmin/settings.py.

hi ZhangHuangbin...i have /usr/share/apache2/iredadmin/settings.py

dr-xr-xr-x  9 iredadmin iredadmin  4096 Mar 15 20:51 .
drwxr-xr-x  9 root      root       4096 Mar 15 20:46 ..
-rw-r--r--  1 iredadmin iredadmin    49 Oct 14 09:20 AUTHORS
-rw-r--r--  1 iredadmin iredadmin  3958 Oct 14 09:20 ChangeLog
drwxr-xr-x  6 iredadmin iredadmin  4096 Mar 15 20:45 controllers
drwxr-xr-x  3 iredadmin iredadmin  4096 Mar 15 20:45 docs
drwxr-xr-x 18 iredadmin iredadmin  4096 Mar 15 20:45 i18n
-rw-r--r--  1 iredadmin iredadmin   402 Oct 14 09:20 iredadmin.py
drwxr-xr-x  6 iredadmin iredadmin  4096 Mar 15 20:45 libs
-rw-r--r--  1 iredadmin iredadmin 18092 Oct 14 09:20 LICENSE
-rw-r--r--  1 iredadmin iredadmin   439 Oct 14 09:20 README
-r--------  1 iredadmin iredadmin  3831 Mar 15 20:51 settings.py
-rw-r--r--  1 iredadmin iredadmin  4468 Oct 14 09:20 settings.py.ldap.sample
-rw-r--r--  1 iredadmin iredadmin  3831 Oct 14 09:20 settings.py.mysql.sample
-rw-r--r--  1 iredadmin iredadmin  3814 Oct 14 09:20 settings.py.pgsql.sample
drwxr-xr-x  4 iredadmin iredadmin  4096 Mar 15 20:45 static
drwxr-xr-x  3 iredadmin iredadmin  4096 Mar 15 20:45 templates
drwxr-xr-x  2 iredadmin iredadmin  4096 Oct 14 09:20 tools

plz help tutorial ZhangHuangbin

5

Re: iRedAdmin: ImportError: No module named settings

Everything looks just fine. Could you please show me output of below commands:

# grep -i 'iredadmin' /etc/apache2/sites-enabled/default-ssl
# ls -la /usr/share/apache2/iredadmin/libs/

6

Re: iRedAdmin: ImportError: No module named settings

I'm having the exact same issue.  If the OP doesn't respond I can provide the data you're requesting; 

grep -i 'iredadmin' /etc/apache2/sites-enabled/default-ssl.conf
Alias /iredadmin/static "/usr/share/apache2/iredadmin/static/"
WSGIScriptAlias /iredadmin "/usr/share/apache2/iredadmin/iredadmin.py/"

ls -la /usr/share/apache2/iredadmin/libs/
total 84
dr-xr-xr-x 6 iredadmin iredadmin  4096 Mar 15 15:20 .
dr-xr-xr-x 9 iredadmin iredadmin  4096 Mar 15 15:20 ..
-r-xr-xr-x 1 iredadmin iredadmin  8719 Oct 13 22:20 default_settings.py
-r-xr-xr-x 1 iredadmin iredadmin   159 Oct 13 22:20 __init__.py
-r-xr-xr-x 1 iredadmin iredadmin  6405 Oct 13 22:20 iredbase.py
-r-xr-xr-x 1 iredadmin iredadmin  4997 Oct 13 22:20 ireddate.py
-r-xr-xr-x 1 iredadmin iredadmin 13795 Oct 13 22:20 iredutils.py
-r-xr-xr-x 1 iredadmin iredadmin  3515 Oct 13 22:20 languages.py
dr-xr-xr-x 2 iredadmin iredadmin  4096 Mar 15 15:20 ldaplib
-r-xr-xr-x 1 iredadmin iredadmin  4245 Oct 13 22:20 md5crypt.py
dr-xr-xr-x 2 iredadmin iredadmin  4096 Mar 15 15:20 mysql
dr-xr-xr-x 2 iredadmin iredadmin  4096 Mar 15 15:20 panel
dr-xr-xr-x 2 iredadmin iredadmin  4096 Oct 13 22:20 pgsql

7

Re: iRedAdmin: ImportError: No module named settings

Hi ctxsguy,

Everything looks just fine, permission/owner is correct.
Is it possible to let me login to your server for debug? Contact me if it's ok: http://www.iredmail.org/contact.html

8 (edited by ctxsguy 2014-03-18 09:52:49)

Re: iRedAdmin: ImportError: No module named settings

I'm currently on the road, I should be able to get you in the environment later this week.

Thanks for your response,
Bill