1 (edited by nemesisfixx 2014-04-30 14:35:35)

Topic: totally failed getting https://<server>/iredadmin to work!

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

iRedMail version :  Version: 0.3
Storing mail accounts using backend : PGSQL
Linux Distro : Debian 7 (Wheezy)
Python 2.7.3
Apache/2.2.22

I installed my iRedMail based off instructions / guide here : http://www.iredmail.org/install_iredmail_on_debian.html

And after a hectic process spanning about 12 hours, finally managed to upgrade my Debian 6 to 7, and then finally to install iRedMail. The final clue that all was well was when I reached this message in the setup:

********************************************************************
* URLs of installed web applications:
*
* - Webmail: httpS://<server>/mail/
* - Admin Panel (iRedAdmin): httpS://<server>/iredadmin/
*

********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   -[PATH]mail_setup/iRedMail-0.8.6/iRedMail.tips
*
* And it's sent to your mail account .
*
* Please reboot your system to enable mail services.
*
********************************************************************

I rebooted, and then checked the said tips file...

Then I tried to access my iredadmin via a browser:

https://<server>/iredadmin

And that's where I've been stuck with a nasty 500! almost all day long!

Relevant apache log:
====================

[Tue Apr 29 14:41:48 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Tue Apr 29 14:41:48 2014] [error] python_init: Python executable found '/usr/bin/python'.
[Tue Apr 29 14:41:48 2014] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Tue Apr 29 14:41:48 2014] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Tue Apr 29 14:41:48 2014] [notice] mod_python: using mutex_directory /tmp
[Tue Apr 29 14:41:48 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Apr 29 14:41:48 2014] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Tue Apr 29 14:41:48 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Tue Apr 29 14:41:48 2014] [notice] Apache/2.2.22 (Debian) mod_auth_pgsql/2.0.3 mod_fcgid/2.3.6 mod_python/3.3.1 Python/2.7.3 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6] mod_wsgi (pid=23399): Target WSGI script '/usr/share/apache2/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6] mod_wsgi (pid=23399): Exception occurred processing WSGI script '/usr/share/apache2/iredadmin/iredadmin.py'.
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6] Traceback (most recent call last):
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]   File "/usr/share/apache2/iredadmin/iredadmin.py", line 10, in <module>
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]     from libs import iredbase
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 18, in <module>
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]     import iredutils
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]   File "/usr/share/apache2/iredadmin/libs/iredutils.py", line 13, in <module>
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]     from iredadmin.libs import settings
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]   File "/usr/share/apache2/iredadmin/iredadmin.py", line 10, in <module>
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6]     from libs import iredbase
[Tue Apr 29 14:41:56 2014] [error] [client 41.190.133.6] ImportError: cannot import name iredbase


============
listing of my iredmail directory:

root@v128:/usr/share/apache2/iredadmin# ls -la .
total 100
dr-xr-xr-x  9 iredadmin iredadmin  4096 Apr 29 14:31 .
drwxr-xr-x  8 root      root       4096 Apr 29 13:43 ..
-rw-r--r--  1 iredadmin iredadmin   533 Apr 29 13:12 1
-r-xr-xr-x  1 iredadmin iredadmin    49 Oct 14  2013 AUTHORS
-r-xr-xr-x  1 iredadmin iredadmin  3958 Oct 14  2013 ChangeLog
dr-xr-xr-x  6 iredadmin iredadmin  4096 Apr 29 13:41 controllers
dr-xr-xr-x  3 iredadmin iredadmin  4096 Apr 29 08:09 docs
dr-xr-xr-x 18 iredadmin iredadmin  4096 Apr 29 08:09 i18n
-rw-r--r--  1 iredadmin iredadmin     0 Apr 29 12:55 __init__.py
-r-xr-xr-x  1 iredadmin iredadmin   403 Apr 29 14:25 iredadmin.py
-r--r--r--  1 root      root        480 Apr 29 13:28 iredadmin.pyc
dr-xr-xr-x  6 iredadmin iredadmin  4096 Apr 29 14:31 libs
-r-xr-xr-x  1 iredadmin iredadmin 18092 Oct 14  2013 LICENSE
-r-xr-xr-x  1 iredadmin iredadmin   439 Oct 14  2013 README
-r--------  1 iredadmin iredadmin  3926 Apr 29 08:12 settings.py
-r-xr-xr-x  1 iredadmin iredadmin  4468 Oct 14  2013 settings.py.ldap.sample
-r-xr-xr-x  1 iredadmin iredadmin  3831 Oct 14  2013 settings.py.mysql.sample
-r-xr-xr-x  1 iredadmin iredadmin  3814 Oct 14  2013 settings.py.pgsql.sample
dr-xr-xr-x  4 iredadmin iredadmin  4096 Apr 29 08:09 static
dr-xr-xr-x  3 iredadmin iredadmin  4096 Apr 29 08:09 templates
dr-xr-xr-x  2 iredadmin iredadmin  4096 Oct 14  2013 tools

iredadmin/libs:

root@v128:/usr/share/apache2/iredadmin# ls -la libs/
total 84
dr-xr-xr-x 6 iredadmin iredadmin  4096 Apr 29 14:45 .
dr-xr-xr-x 9 iredadmin iredadmin  4096 Apr 29 14:31 ..
-r-xr-xr-x 1 iredadmin iredadmin  8719 Oct 14  2013 default_settings.py
-rw-r--r-- 1 root      root          0 Apr 29 14:25 __init__.py
-r-xr-xr-x 1 iredadmin iredadmin   159 Oct 14  2013 __init__.py.bak
-r-xr-xr-x 1 iredadmin iredadmin  6405 Oct 14  2013 iredbase.py
-r-xr-xr-x 1 iredadmin iredadmin  4997 Oct 14  2013 ireddate.py
-r-xr-xr-x 1 iredadmin iredadmin 13824 Apr 29 13:46 iredutils.py
-r-xr-xr-x 1 iredadmin iredadmin  3515 Oct 14  2013 languages.py
dr-xr-xr-x 2 iredadmin iredadmin  4096 Apr 29 08:09 ldaplib
-r-xr-xr-x 1 iredadmin iredadmin  4245 Oct 14  2013 md5crypt.py
dr-xr-xr-x 2 iredadmin iredadmin  4096 Apr 29 08:09 mysql
dr-xr-xr-x 2 iredadmin iredadmin  4096 Apr 29 08:09 panel
dr-xr-xr-x 2 iredadmin iredadmin  4096 Oct 14  2013 pgsql



I've banged my head about, trying everything from modifying the import statements, adding dynamic Python path extension code to the lib/__init__.py (which I had to add too), moving settings to libs, etc all in vain!


@ZhangHuangbin  Please help me! Please!

----

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

2

Re: totally failed getting https://<server>/iredadmin to work!

nemesisfixx wrote:

[Tue Apr 29 14:41:48 2014] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.

Please remove package 'libapache2-mod-python', restart Apache service and try again.

3 (edited by nemesisfixx 2014-04-30 14:45:35)

Re: totally failed getting https://<server>/iredadmin to work!

ZhangHuangbin wrote:
nemesisfixx wrote:

[Tue Apr 29 14:41:48 2014] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.

Please remove package 'libapache2-mod-python', restart Apache service and try again.


I have. And here's the error am still getting:

[Wed Apr 30 06:44:48 2014] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Wed Apr 30 06:44:48 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Wed Apr 30 06:44:48 2014] [notice] Apache/2.2.22 (Debian) mod_auth_pgsql/2.0.3 mod_fcgid/2.3.6 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 Python/2.7.3 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44] mod_wsgi (pid=5306): Target WSGI script '/usr/share/apache2/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44] mod_wsgi (pid=5306): Exception occurred processing WSGI script '/usr/share/apache2/iredadmin/iredadmin.py'.
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44] Traceback (most recent call last):
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]   File "/usr/share/apache2/iredadmin/iredadmin.py", line 10, in <module>
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]     from libs import iredbase
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 18, in <module>
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]     import iredutils
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]   File "/usr/share/apache2/iredadmin/libs/iredutils.py", line 13, in <module>
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44]     import settings
[Wed Apr 30 06:44:56 2014] [error] [client 41.190.77.44] ImportError: No module named settings

4

Re: totally failed getting https://<server>/iredadmin to work!

Do you have file /usr/share/apache2/iredadmin/settings.py? What's the file owner and permission?

5

Re: totally failed getting https://<server>/iredadmin to work!

root@v128:/home/nemesisfixx/mail_setup/iRedAdmin-0.3# ls -al /usr/share/apache2/iredadmin/settings.py
-r-------- 1 iredadmin iredadmin 3926 Apr 29 08:12 /usr/share/apache2/iredadmin/settings.py

Oh! Should there be execute permissions therein?

6

Re: totally failed getting https://<server>/iredadmin to work!

nemesisfixx wrote:

Oh! Should there be execute permissions therein?

No.

No idea about why it doesn't work for you. Is it possible to let me login to your server (via ssh) for further debug?

7

Re: totally failed getting https://<server>/iredadmin to work!

ZhangHuangbin wrote:
nemesisfixx wrote:

Oh! Should there be execute permissions therein?

No.

No idea about why it doesn't work for you. Is it possible to let me login to your server (via ssh) for further debug?

my email address is : joewillrich [ at ] gmail [dot ] com

Share with me your address, and i'll send u access info via mail.

thanks!