1

Topic: Error when try to start iredapd service

======== Required information ====
- iRedMail version: 0.91
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx):APACHE
- Linux/BSD distribution name and version: Red Hat Enterprise Linux Server release 6.0 (Santiago)
- Related log if you're reporting an issue:
====


Hi, after installing iredmail,i have noticed that service iredapd is not running.
When I try to run the service, i got this error
Starting iredapd ...
Traceback (most recent call last):
  File "/opt/iredapd/iredapd.py", line 55, in <module>
    conn_vmail = create_engine(uri_db_vmail, pool_size=20, pool_recycle=3600, max_overflow=0)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/__init__.py", line 223, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/strategies.py", line 48, in create
    dialect_cls = u.get_dialect()
  File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/url.py", line 91, in get_dialect
    module = getattr(__import__('sqlalchemy.databases.%s' % self.drivername).databases, self.drivername)
ImportError: No module named postgresql

Kindly, i need your help or some guide to solve this error
Regards,

----

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

2

Re: Error when try to start iredapd service

Please try this patch for file /opt/iredapd/iredapd.py:

diff -r 3dd87094a8fa iredapd.py
--- a/iredapd.py    Tue May 26 17:47:59 2015 +0800
+++ b/iredapd.py    Tue May 26 21:02:08 2015 +0800
@@ -40,7 +40,7 @@
 
 
     elif settings.backend == 'pgsql':
-        sql_dbn = 'postgresql'
+        sql_dbn = 'postgres'
         conn_string_vmail = 'postgresql://%s:%s@%s/%s' % (settings.sql_user,
                                                           settings.sql_password,
                                                           settings.sql_server,

3

Re: Error when try to start iredapd service

ZhangHuangbin wrote:

Please try this patch for file /opt/iredapd/iredapd.py:

diff -r 3dd87094a8fa iredapd.py
--- a/iredapd.py    Tue May 26 17:47:59 2015 +0800
+++ b/iredapd.py    Tue May 26 21:02:08 2015 +0800
@@ -40,7 +40,7 @@
 
 
     elif settings.backend == 'pgsql':
-        sql_dbn = 'postgresql'
+        sql_dbn = 'postgres'
         conn_string_vmail = 'postgresql://%s:%s@%s/%s' % (settings.sql_user,
                                                           settings.sql_password,
                                                           settings.sql_server,

it works !!!  Tq so muchhh