1

Topic: iRedAdmin not installing on Ubuntu 9.04

Hello, I tried to install IredAdmin on Ubuntu 9.04 server X64. It failed at 'easy_install web.py Jinja2 netifaces' after a quick google search, I installed python2.5-dev. 'easy_install' then worked. When I tried to start the webpage I got this:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.11 (Ubuntu) mod_ssl/2.2.11 OpenSSL/0.9.8g mod_wsgi/2.3 Python/2.6.2 Server at 192.168.2.10 Port 443

A search of my server produced this: /usr/lib/python2.5/site-packages/web.py-0.32-py2.5.egg

This is the only occurence of web.py on the server, and as you can see it is for python 2.5, Ubuntu 9.04 uses 2.6

Any idea where I get web.py for 2.6?

----

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

2

Re: iRedAdmin not installing on Ubuntu 9.04

Hello again, after some investigation I discovered that somehow /usr/share/python/debian_defaults was pointing to python 2.5, I changed this and started again.
I now get just this, when I attempt to login into https://my_server_ip/iredadmin

internal server error.

I also get this in /var/log/apache2/error.log:

[Sun Sep 20 20:36:18 2009] [error] /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
[Sun Sep 20 20:36:18 2009] [error]   from sets import ImmutableSet
[Sun Sep 20 20:36:18 2009] [error] /usr/local/lib/python2.6/dist-packages/Jinja2-2.2.1-py2.6.egg/jinja2/__init__.py:31: UserWarning: Module _mysql was already imported from
/var/lib/python-support/python2.6/_mysql.so, but /var/lib/python-support/python2.6 is being added to sys.path
[Sun Sep 20 20:36:18 2009] [error]   __version__ = __import__('pkg_resources') \\
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101] Traceback (most recent call last):
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/local/lib/python2.6/dist-packages/web.py-0.32-py2.6.egg/web/application.py", line 242, in process
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     return self.handle()
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/local/lib/python2.6/dist-packages/web.py-0.32-py2.6.egg/web/application.py", line 233, in handle
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     return self._delegate(fn, self.fvars, args)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/local/lib/python2.6/dist-packages/web.py-0.32-py2.6.egg/web/application.py", line 408, in _delegate
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     mod = __import__(mod, globals(), locals(), [""])
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/share/apache2/iredadmin/controllers/ldap/basic.py", line 8, in <module>
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     from libs.ldaplib import core, auth, domain, ldaputils
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/share/apache2/iredadmin/libs/ldaplib/domain.py", line 13, in <module>
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     LDAPDecorators = core.LDAPDecorators()
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/share/apache2/iredadmin/libs/ldaplib/core.py", line 52, in __init__
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     self.conn.bind_s(cfg.ldap.get('bind_dn'), cfg.ldap.get('bind_pw'))
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 213, in bind_s
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     return self.result(msgid,all=1,timeout=self.timeout)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 428, in result
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 432, in result2
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 438, in result3
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]   File "/usr/lib/python2.6/dist-packages/ldap/ldapobject.py", line 96, in _ldap_call
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]     result = func(*args,**kwargs)
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101] INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}
[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101]

I have followed the howto to the letter, apart from the top of settings.ini, the howto says

'[general]
admin = user@domain.ltd'

mine says
'[general]
# Site webmaster's mail address.
webmaster = user@example.com'  <-- not the real email address I entered

I have also checked the ldap credentials I entered in settings.ini, they are correct

Anybody got any idea why it does not work?

3

Re: iRedAdmin not installing on Ubuntu 9.04

hortimech wrote:

[Sun Sep 20 20:36:18 2009] [error] [client 172.16.0.101] INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}

It means bind dn or password is incorrect.

You can test them with ldapsearch command:

$ ldapsearch -x -D 'YOUR_BIND_DN_HERE' -W

PS: I synced installation guide, add this tip to ensure both bind dn & pw are correct. smile

4

Re: iRedAdmin not installing on Ubuntu 9.04

I tried 'ldapsearch -x -D 'cn=vmailadmin,dc=home,dc=net' -W' and got asked for vmailadmins password, entered it and got 'ldap_bind: Invalid credentials (49)'

I then changed vmailadmin to Manager and tried again, this got me the complete contents of LDAP, I changed vmailadmin to Manager in settings.ini and tried the webpage again.

the webpage now comes up: the Username is filled in as cn=Manager,dc=home,dc=net but underneath it says 'Must be a valid email address' the Username is not an email address and it seems you cannot change it. anyway, I entered the Manager password (remember this works from the cli), nothing! I just get 'Error:  Username or password is incorrect. '

I have tried entering the email address I entered as admin in settings.ini, but this did not work and got changed back to cn=Manager,dc=home,dc=net

I changed the topline of settings.ini to admin instead of webmaster, I also tried having both lines, but I still cannot get past the login page.

I must be doing something wrong but I cannot see what.

5

Re: iRedAdmin not installing on Ubuntu 9.04

Well I found out what I was doing wrong, after reading /usr/share/apache2/iredadmin/controllers/ldap/basic.py and looking at the LDAP database I came to the conclusion that the email address I should be entering was a member of the domainadmins. I enterered this and I am in, yay
Well, at least no-one will be able to accuse me of not RTFM, there does not seem to be a manual yet smile

I suggest changing 'Must be a valid email address' to 'Must be a valid domainAdmins email address'

6

Re: iRedAdmin not installing on Ubuntu 9.04

hortimech wrote:

I suggest changing 'Must be a valid email address' to 'Must be a valid domainAdmins email address'

Good suggestion, thanks dude smile

Fixed, i will commit it later.