1

Topic: Internal server error - Admin Login

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

After you attempt to login to iredAdmin, i am getting

"internal server error".  further to add, if on the error page, you enter the url of login, it redirects to dashboard correctly.

Below are the log details from apache error logs

[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175] Traceback (most recent call last):
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]     return self.handle()
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]     return self._delegate(fn, self.fvars, args)
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]     return handle_class(cls)
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]     return tocall(*args)
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]   File "/var/www/iredadmin/controllers/mysql/basic.py", line 66, in POST
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175]     selected_language = str(i.get('lang').strip())
[Sat Jan 03 15:16:55 2015] [error] [client 83.110.69.175] AttributeError: 'NoneType' object has no attribute 'strip'

can somebody guide on how to resolve this issue.

----

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

2

Re: Internal server error - Admin Login

Please try below patch, it should fix this issue:

diff -r 0ce17e54b924 controllers/mysql/basic.py
--- a/controllers/mysql/basic.py    Fri Jan 02 01:00:20 2015 +0800
+++ b/controllers/mysql/basic.py    Sat Jan 03 23:17:01 2015 +0800
@@ -59,7 +59,7 @@
             web.logger(msg="Admin login success", event='login')
 
             # Save selected language
-            selected_language = str(i.get('lang').strip())
+            selected_language = str(i.get('lang', '')).strip()
             if selected_language != web.ctx.lang and \
                selected_language in languages.get_language_maps():
                 session['lang'] = selected_language

3

Re: Internal server error - Admin Login

thanks, we got the admin login working. but we have further error below when we try to go to user administration under particular domain

[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128] Traceback (most recent call last):
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     return self.handle()
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     return self._delegate(fn, self.fvars, args)
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     return handle_class(cls)
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     return tocall(*args)
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/var/www/iredadmin/controllers/decorators.py", line 22, in proxyfunc
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     return func(self, *args, **kw)
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]   File "/var/www/iredadmin/controllers/mysql/user.py", line 179, in GET
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]     existing_settings=user_profile['settings'])
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128] KeyError: 'settings'
[Sun Jan 04 14:20:50 2015] [error] [client 217.165.110.128]

4

Re: Internal server error - Admin Login

You missed some SQL columns, looks like you didn't upgrade your iRedMail.
Please follow our upgrade tutorials below to upgrade iRedMail:
http://www.iredmail.org/docs/iredmail.releases.html

5

Re: Internal server error - Admin Login

hi

i have added the required fields in MySQL as per the requirement, but still I get the following error

[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110] Traceback (most recent call last):
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     return self.handle()
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     return self._delegate(fn, self.fvars, args)
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     return handle_class(cls)
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     return tocall(*args)
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/var/www/iredadmin/controllers/decorators.py", line 22, in proxyfunc
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     return func(self, *args, **kw)
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]   File "/var/www/iredadmin/controllers/mysql/user.py", line 179, in GET
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]     existing_settings=user_profile['settings'])
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110] KeyError: 'settings'
[Mon Jan 05 23:14:50 2015] [error] [client 10.11.255.110]

6

Re: Internal server error - Admin Login

hi

i have fixed the issue. The problem was that settings field was missing from mailbox table under vmail.