1 (edited by m.krzaczek 2012-03-15 18:35:34)

Topic: iredmail restore / move to new server

Hi I use iRedOS-0.6.0-CentOS-5.5-i386, with openldap. I need to move server to  new one. I tried many times but no success.
eventually I can't access the page https://IP/iredadmin
I did:
installed new serwer with the same setting (hostname, ldap, passwd, during wizard)
backup with scprits (sql ld ldap
http://www.iredmail.org/wiki/index.php? … FAQ/Backup

restore SQL: /usr/bin/mysql -u root -p iredadmin < iredadmin.sql
/usr/bin/mysql -u root -p policyd < postfixpolicyd.sql
/usr/bin/mysql -u root -p roundcubemail < roundcubemail.sql
restore openldap
/etc/rc.d/init.d/ldap stop
-cd /var/lib/ldap/XXX.org
-I removed all files except DB_CONFIG
slapadd -f /etc/openldap/slapd.conf -l ldap.ldif
-chown -R ldap:ldap XXX.org
/etc/rc.d/init.d/ldap start    ----started clear.

next copy cp /var/lib/dkim/*pem from old to new
I didnt copy mailbaxes yet
I can login to https://IP/phpldapadmin successfull and see restored objects
https://IP/mail apears but  I cant log in to it (wrong user/passwd)

Now ireadamin page doesn't appear and cant login mailbox. Some troube with passwords. Pls help. its very important to me to finish it asap.

----

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

2

Re: iredmail restore / move to new server

m.krzaczek wrote:

https://IP/mail apears but  I cant log in to it (wrong user/passwd)

Is Dovecot running? Does it have correct LDAP related settings in /etc/dovecot/dovecot-ldap.conf?
Turn on debug mode in Dovecot to see more details.

m.krzaczek wrote:

Now ireadamin page doesn't appear and cant login mailbox.

What does "doesn't appear" mean? Any log in Apache log file?

3 (edited by m.krzaczek 2012-03-16 16:43:26)

Re: iredmail restore / move to new server

thanks for reply
- dovecot was running. Next I copied from oryginal to new. Service started. Now I CAN log in to roundcube smile 


still received when connecting with iredadmin :
-192.168.1.46 - - [16/Mar/2012:08:01:48 +0100] "GET /iredadmin HTTP/1.1" 500 41

[Fri Mar 16 07:54:36 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 16 07:54:40 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46] Traceback (most recent call last):
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/application.py", line 241, in process
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     return self.handle()
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/application.py", line 232, in handle
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     return self._delegate(fn, self.fvars, args)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/application.py", line 407, in _delegate
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     mod = __import__(mod, globals(), locals(), [""])
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/var/www/iredadmin/controllers/ldap/basic.py", line 29, in ?
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     from libs.ldaplib import core, auth, admin, domain, ldaputils
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/var/www/iredadmin/libs/ldaplib/admin.py", line 38, in ?
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     LDAPDecorators = core.LDAPDecorators()
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/var/www/iredadmin/libs/ldaplib/core.py", line 67, in __init__
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     self.conn.bind_s(cfg.ldap.get('bind_dn'), cfg.ldap.get('bind_pw'))
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 213, in bind_s
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     return self.result(msgid,all=1,timeout=self.timeout)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 428, in result
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 432, in result2
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 438, in result3
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]     result = func(*args,**kwargs)
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46] INVALID_CREDENTIALS: {'info': '', 'desc': 'Invalid credentials'}
[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46]


[16/Mar/2012:08:01:33 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /phpldapadmin/ HTTP/1.1" 20
[16/Mar/2012:08:01:33 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /phpldapadmin/htdocs/index.php HTTP/1.1" 20
[16/Mar/2012:08:01:33 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /phpldapadmin/htdocs/index.php?server_id=1&refresh=SID_1&redirect=true HTTP/1.1" 1853
[16/Mar/2012:08:01:34 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /phpldapadmin/htdocs/cmd.php?cmd=refresh&server_id=1&meth=ajax&noheader=0&meth=ajax HTTP/1.1" 20
[16/Mar/2012:08:01:35 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /phpldapadmin/htdocs/cmd.php?cmd=draw_tree_node&noheader=0&server_id=1&meth=ajax&frame=TREE HTTP/1.1" 397
[16/Mar/2012:08:01:48 +0100] 192.168.1.46 TLSv1 AES128-SHA "GET /iredadmin HTTP/1.1" 41


iredadmin error 500

4

Re: iredmail restore / move to new server

m.krzaczek wrote:

[Fri Mar 16 08:01:49 2012] [error] [client 192.168.1.46] INVALID_CREDENTIALS: {'info': '', 'desc': 'Invalid credentials'}

You don't have correct ldap bind dn and/or password in iRedAdmin config file 'settings.ini'. Please check them first.

bind_dn = cn=vmailadmin,dc=iredmail,dc=org
bind_pw = passwd

5

Re: iredmail restore / move to new server

thanks, this error doesn't appear now. But still eroor 500 when trying to get ireadadmin

in ssl_error:

File "/usr/lib/python2.4/site-packages/web/application.py", line 239, in process
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     return p(lambda: process(processors))
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/session.py", line 55, in _processor
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     self._cleanup()
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/session.py", line 135, in _cleanup
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     self.store.cleanup(timeout)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/session.py", line 280, in cleanup
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     self.db.delete(self.table, where="$last_allowed_time > atime", vars=locals())
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/db.py", line 844, in delete
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     db_cursor = self._db_cursor()
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/db.py", line 522, in _db_cursor
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     return self.ctx.db.cursor()
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/db.py", line 463, in _getctx
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     self._load_context(self._ctx)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/db.py", line 474, in _load_context
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     ctx.db = self._connect(self.keywords)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/web/db.py", line 502, in _connect
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     return self.db_module.connect(**keywords)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 75, in Connect
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     return Connection(*args, **kwargs)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]   File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 164, in __init__
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46]     super(Connection, self).__init__(*args, **kwargs2)
[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46] OperationalError: (1045, "Access denied for user 'iredadmin'@'localhost' (using password: YES)")

6

Re: iredmail restore / move to new server

m.krzaczek wrote:

[Mon Mar 19 07:42:39 2012] [error] [client 192.168.1.46] OperationalError: (1045, "Access denied for user 'iredadmin'@'localhost' (using password: YES)")

You don't have correct MySQL username/password under section "[iredadmin]" of iRedAdmin config file 'settings.ini'.