1

Topic: Error

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL): do not use iRedMail but RoundCube
- Linux/BSD distribution name and version: RHEL 6 64bit
- Any related log? Log is helpful for troubleshooting.
====

Hi,
I try to start the admin and get a internal server error.
I activated debug and get the foolowing in the ssl log

[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18] mod_wsgi (pid=15710): Target WSGI script '/var/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18] mod_wsgi (pid=15710): Exception occurred processing WSGI script '/var/www/iredadmin/iredadmin.py'.
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18] Traceback (most recent call last):
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18]   File "/var/www/iredadmin/iredadmin.py", line 9, in <module>
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18]     from libs import iredbase
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18]   File "/var/www/iredadmin/libs/iredbase.py", line 8, in <module>
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18]     from jinja2 import Environment, FileSystemLoader
[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18] ImportError: No module named jinja2


some more info:

[root@433680-web1 iRedMail-0.8.1]# ls -l /var/www/
total 28
drwxr-xr-x  9 root      root      4096 Jul 18 06:01 awstats
drwxr-xr-x. 2 root      root      4096 Oct  6  2011 cgi-bin
drwxr-xr-x. 3 root      root      4096 Jul  6 20:41 error
drwxr-xr-x. 2 root      root      4096 Oct 21  2011 html
drwxr-xr-x. 3 root      root      4096 Jul 13 11:15 icons
lrwxrwxrwx  1 root      root        25 Jul 17 03:26 iredadmin -> iRedAdmin-Pro-MySQL-1.4.0
dr-xr-xr-x  9 iredadmin iredadmin 4096 Jul 18 05:26 iRedAdmin-Pro-MySQL-1.4.0
drwxr-xr-x. 2 webalizer root      4096 Jul 12 03:19 usage
[root@433680-web1 iRedMail-0.8.1]# ls -l /var/www/iredadmin/*
-r-xr-xr-x  1 iredadmin iredadmin   49 Jul 17 03:08 /var/www/iredadmin/AUTHORS
-r-xr-xr-x  1 iredadmin iredadmin 7429 Jul 17 03:08 /var/www/iredadmin/ChangeLog.mysql
-r-xr-xr-x  1 iredadmin iredadmin  550 Jul 17 03:08 /var/www/iredadmin/EULA
lrwxrwxrwx  1 root      root        25 Jul 18 02:17 /var/www/iredadmin/iRedAdmin-Pro-MySQL-1.4.0 -> iRedAdmin-Pro-MySQL-1.4.0
-r-xr-xr-x  1 iredadmin iredadmin  402 Jul 17 03:08 /var/www/iredadmin/iredadmin.py
-r-xr-xr-x  1 iredadmin iredadmin  416 Jul 17 03:08 /var/www/iredadmin/README
-r--------  1 iredadmin iredadmin 3719 Jul 18 05:26 /var/www/iredadmin/settings.ini
-r-xr-xr-x  1 iredadmin iredadmin 3700 Jul 17 03:08 /var/www/iredadmin/settings.ini.mysql.sample

/var/www/iredadmin/controllers:
total 24
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 amavisd
-r-xr-xr-x 1 iredadmin iredadmin  927 Jul 17 03:08 decorators.py
-r-xr-xr-x 1 iredadmin iredadmin    0 Jul 17 03:08 __init__.py
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 mysql
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 panel
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 policyd
-r-xr-xr-x 1 iredadmin iredadmin  981 Jul 17 03:08 utils.py

/var/www/iredadmin/docs:
total 4
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 samples

/var/www/iredadmin/i18n:
total 176
-r-xr-xr-x 1 iredadmin iredadmin    778 Jul 17 03:08 babel.cfg
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 de_DE
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 en_US
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 es_ES
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 fi_FI
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 fr_FR
-r-xr-xr-x 1 iredadmin iredadmin 108655 Jul 17 03:08 iredadmin.po
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 it_IT
-r-xr-xr-x 1 iredadmin iredadmin   5501 Jul 17 03:08 msgfmt.py
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 nl_NL
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 pl_PL
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 pt_BR
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 ru_RU
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 sl_SI
-r-xr-xr-x 1 iredadmin iredadmin   2503 Jul 17 03:08 translation.sh
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 zh_CN
dr-xr-xr-x 3 iredadmin iredadmin   4096 Jul 17 03:08 zh_TW

/var/www/iredadmin/libs:
total 88
dr-xr-xr-x 2 iredadmin iredadmin  4096 Jul 17 03:08 amavisd
-r-xr-xr-x 1 iredadmin iredadmin   555 Jul 17 03:08 __init__.py
-r-xr-xr-x 1 iredadmin apache      819 Jul 18 02:31 __init__.pyc
-r-xr-xr-x 1 iredadmin iredadmin  7770 Jul 17 03:08 iredbase.py
-r-xr-xr-x 1 iredadmin apache     6670 Jul 18 02:31 iredbase.pyc
-r-xr-xr-x 1 iredadmin iredadmin  4997 Jul 17 03:08 ireddate.py
-r-xr-xr-x 1 iredadmin iredadmin 12933 Jul 17 03:08 iredutils.py
-r-xr-xr-x 1 iredadmin iredadmin  3569 Jul 17 03:08 languages.py
-r-xr-xr-x 1 iredadmin iredadmin  2599 Jul 17 03:08 mailparser.py
-r-xr-xr-x 1 iredadmin iredadmin  4200 Jul 17 03:08 md5crypt.py
dr-xr-xr-x 2 iredadmin iredadmin  4096 Jul 17 03:08 mysql
dr-xr-xr-x 2 iredadmin iredadmin  4096 Jul 17 03:08 panel
dr-xr-xr-x 2 iredadmin iredadmin  4096 Jul 17 03:08 policyd
-r-xr-xr-x 1 iredadmin iredadmin  7615 Jul 17 03:08 settings.py

/var/www/iredadmin/static:
total 16
dr-xr-xr-x 4 iredadmin iredadmin 4096 Jul 17 03:08 default
dr-xr-xr-x 2 iredadmin iredadmin 4096 Jul 17 03:08 js
-r-xr-xr-x 1 iredadmin iredadmin 8162 Jul 17 03:08 logo.png

/var/www/iredadmin/templates:
total 4
dr-xr-xr-x 7 iredadmin iredadmin 4096 Jul 17 03:08 default

/var/www/iredadmin/tools:
total 8
-r-xr-xr-x 1 iredadmin iredadmin 7035 Jul 17 03:08 dump_disclaimer.py
[root@433680-web1 iRedMail-0.8.1]#


any info would be welcome

Best wishes,
thom

2

Re: Error

Thomanji wrote:

[Wed Jul 18 06:47:54 2012] [error] [client 175.143.198.18] ImportError: No module named jinja2

You don't have python module Jinja2 installed. Please fix it with below command:

easy_install Jinja2

Also, this symbol link should be removed: /var/www/iredadmin/iRedAdmin-Pro-MySQL-1.4.0.

3

Re: Error

Hi,

I removed the symlink and renames the install from iRedAdmin-Pro-MySQL-1.4.0. to iredadmin.
I can now login but since I did not install iRebMail it did not make the vmail database so i get lots of errors that vmail tables are missing. Is there anywhere a .sql file that does make all tables for this database?

Best wishes,
Thomas

4

Re: Error

Thomanji wrote:

since I did not install iRebMail

Dear Thomas,

iRedAdmin-Pro requires the latest iRedMail, so please install iRedMail first, then install iRedAdmin-Pro.

5

Re: Error

Hi,

Well looks like this is going to be a problem. I actually had one of the provesional system administartors of RackSpace try this and here is his conclusion:

iRedMail depends on some packages, including mysql and php.
Since you are using mysql and php from IUS repository their names are mysql55 and php53u, it causes iRedMail installer to think that mysql and php is not installed on your system. In the next step it tries to install them and fails.

< INFO > Installing package(s): mysql-server.x86_64 mysql.x86_64 mod_auth_mysql.x86_64 httpd.x86_64 mod_ssl.x86_64 php.x86_64 php-common.x86_64 php-gd.x86_64 php-xml.x86_64 php-mysql.x86_64 php-ldap.x86_64 php-pgsql.x86_64 postfix.x86_64 policyd.x86_64 dovecot.x86_64 dovecot-managesieve.x86_64 dovecot-pigeonhole.x86_64 clamd.x86_64 clamav.x86_64 clamav-db.x86_64 spamassassin.x86_64 altermime.x86_64 perl-LDAP.noarch perl-Mail-SPF.noarch perl-Mail-SPF-Query.noarch amavisd-new.noarch python-ldap.x86_64 python-psycopg2.x86_64 python-jinja2.x86_64 python-webpy.noarch MySQL-python.x86_64 mod_wsgi.x86_64 awstats.noarch fail2ban bzip2.x86_64 acl.x86_64 patch.x86_64 tmpwatch.x86_64 crontabs.noarch dos2unix.x86_64 logwatch

[snip]
Error: mysql55-server conflicts with mysql-server
Error: mysql55 conflicts with mysql
Error: mysql55-libs conflicts with mysql-libs

Obviously iRedMail is looking for packages with very specific names.

iRedMail documentation states that "iRedMail is designed to be deployed on a FRESH server system, which means your server does NOT have mail related components installed, e.g. MySQL, OpenLDAP, Postfix, Dovecot, Amavisd, etc. Otherwise it may override your existing files/configurations althought it will backup files before modifing, and it may be not working as expected. "

It seems that the only way forward with iRedMail is to either:
a) downgrade mysql to stock version
b) reinstall the server with a fresh copy of the operating system, then install iRedMail and then upgrade MySql/php/other to required versions. Please note that I am not sure how iRedMail will work with those packages.

I have tested iRedMail with mysql55 and unfortunately does not work. You will need to contact iRedMail devs to ask if it is even possible.

Please let me know your thoughts.

6

Re: Error

Hi,

Just one more note, I do relay on MuSql 5.5 and PHP 5.3.14 because we use very specific features that require these versions.
This is a server that has 150 domains running so I can not do a fresh install, I already did mess with it for 3 days and now asked the assistance of a senior rackSpace Administrator that tells me it can't run. So please let me know if there is a solution that lets me run this software without breacking my mission critical system.

Best wishes,
thomas

7

Re: Error

Is this a FRESH RaskSpace VPS server? If so, i'm willing to give it a try. But i need your help to restore it to fresh instance if installation failed to let me try again (and again).

8 (edited by Thomanji 2012-07-21 17:52:48)

Re: Error

Hi,

Well it is a full RackSpace Dedicated server runing RHEL 6 - 64bit.
Dell Memory:  24 GB DELL RAM, GB Memory: 24
Dell Servers:  Dual Socket Quad Core Intel Xeon L5520 2.26GHz, #Cores per Proc: 4, #Processors: 2
Hard Drive:  146GB SAS 15K RPM Drive, HDD RPM: 15000, GB Hard Drive: 146
Hard Drive:  100GB SFF SSD Drive, GB Hard Drive: 100
Linux OS:  Red Hat Enterprise Linux 6

However I already migrated some 160 domains to this server so it is running several sites already. So I can not install it fresh because many opf my developers have already adjusted the older PHP scripts since we upgrated from PHP5.2 on the opld machine to PHP 5.3 on the new and this caused a lot of issues.
If you think you can install this without breaching my system you can try.

Best wishes,
thomas