1

Topic: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 9.3
- Linux/BSD distribution name and version: Debian Jessie
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? yes
- Related log if you're reporting an issue: can´t traceback the logs :-(
====

If i start the upgrade process again i get :

+ [required] json or simplejson - but it´s installed
  + [optional] BeautifulSoup
  + [optional] lxml

Existing mail accounts work ,but when i log into the iredmailadmin , i get an internal server error on each site , even when i want to view the license page ! When i want to add or edit an account i always get "internal server error"

----

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 after upgrade to iRedAdmin-Pro-SQL-2.2.0

Dear bootboy1,

We fixed several issues in the latest iRedAdmin-Pro-SQL-2.2.0, i sent an email with download link of patched version to you moment ago, please let me know if you didn't receive it. You can run the "tools/upgrade_iredadmin.sh" to upgrade it.

If you still get some error, please extract related log in Apache error log file and paste here, so that we can help troubleshoot.

Sorry about this trouble.

3

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

ZhangHuangbin wrote:

Dear bootboy1,

We fixed several issues in the latest iRedAdmin-Pro-SQL-2.2.0, i sent an email with download link of patched version to you moment ago, please let me know if you didn't receive it. You can run the "tools/upgrade_iredadmin.sh" to upgrade it.

If you still get some error, please extract related log in Apache error log file and paste here, so that we can help troubleshoot.

Sorry about this trouble.

Hello ! Thanks for your help but I didn´t get the email at the moment !

4

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

bootboy1 wrote:

Hello ! Thanks for your help but I didn´t get the email at the moment !

It was sent to "info@[your_domain]", and i resent one with your address in 'CC:'.

5 (edited by bootboy1 2015-12-18 17:41:02)

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Thank you ! Now I only get the "internal server error" when i create a new account in a domain or want to change an existing one ! I even started with a clean installation and it starts to occur when i use the new version !

6

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Any related error in Apache or uwsgi error log file?

7

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Having Same Problem

Dec 18 09:43:38.832714 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return self.handle()
[Fri Dec 18 09:43:38.832730 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri Dec 18 09:43:38.832747 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return self._delegate(fn, self.fvars, args)
[Fri Dec 18 09:43:38.832764 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Fri Dec 18 09:43:38.832781 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return handle_class(cls)
[Fri Dec 18 09:43:38.832797 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Fri Dec 18 09:43:38.832840 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return tocall(*args)
[Fri Dec 18 09:43:38.832860 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Fri Dec 18 09:43:38.832878 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return func(*args, **kw)
[Fri Dec 18 09:43:38.832894 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/controllers/sql/domain.py", line 168, in GET
[Fri Dec 18 09:43:38.832911 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     qr = lib_greylist.get_greylist_setting_and_whitelists(account='@' + self.domain)
[Fri Dec 18 09:43:38.832928 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/iredapd/greylist.py", line 9, in get_greylist_setting_and_whitelists
[Fri Dec 18 09:43:38.832945 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     gl = Greylisting()
[Fri Dec 18 09:43:38.832962 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/iredapd/__init__.py", line 44, in __init__
[Fri Dec 18 09:43:38.832978 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     self.db.supports_multiple_insert = True
[Fri Dec 18 09:43:38.832995 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247] AttributeError: 'Greylisting' object has no attribute 'db'
[Fri Dec 18 09:43:38.833029 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]
[Fri Dec 18 09:43:47.122534 2015] [wsgi:error] [pid 4913] 'module' object has no attribute 'iredapd_db_host'
[Fri Dec 18 09:43:47.123197 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247] Traceback (most recent call last):
[Fri Dec 18 09:43:47.123238 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Fri Dec 18 09:43:47.123256 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return self.handle()
[Fri Dec 18 09:43:47.123273 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri Dec 18 09:43:47.123289 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return self._delegate(fn, self.fvars, args)
[Fri Dec 18 09:43:47.123334 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Fri Dec 18 09:43:47.123349 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return handle_class(cls)
[Fri Dec 18 09:43:47.123364 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Fri Dec 18 09:43:47.123379 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return tocall(*args)
[Fri Dec 18 09:43:47.123394 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Fri Dec 18 09:43:47.123408 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     return func(*args, **kw)
[Fri Dec 18 09:43:47.123423 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/controllers/sql/domain.py", line 168, in GET
[Fri Dec 18 09:43:47.123438 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     qr = lib_greylist.get_greylist_setting_and_whitelists(account='@' + self.domain)
[Fri Dec 18 09:43:47.123453 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/iredapd/greylist.py", line 9, in get_greylist_setting_and_whitelists
[Fri Dec 18 09:43:47.123468 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     gl = Greylisting()
[Fri Dec 18 09:43:47.123483 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]   File "/usr/share/apache2/iredadmin/libs/iredapd/__init__.py", line 44, in __init__
[Fri Dec 18 09:43:47.123497 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]     self.db.supports_multiple_insert = True
[Fri Dec 18 09:43:47.123512 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247] AttributeError: 'Greylisting' object has no attribute 'db'
[Fri Dec 18 09:43:47.123540 2015] [wsgi:error] [pid 4913] [remote 10.1.1.88:24247]
nm2:/var/log/apache2#

8

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

fixed

See - http://www.iredmail.org/forum/topic1028 … grade.html

I did the same thing on upgrading iRedAdmin-Pro-SQL before iredapd

9

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Thanks a lot !  but this doesn´t solve my issue ! IredAPD Version is 1.7 I already upgraded ist prior to installing the new iRedAdmin version ! But i always get this internal server error messages ! Only strange thing is it requires "+ [required] json or simplejson " - but it´s on the system !

10

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

bootboy1 wrote:

But i always get this internal server error messages

Did you restart Apache after changed iRedAdmin-Pro config file? Also, try to logout and re-login.

11

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

ZhangHuangbin wrote:
bootboy1 wrote:

But i always get this internal server error messages

Did you restart Apache after changed iRedAdmin-Pro config file? Also, try to logout and re-login.

Yes i did ! I even tried to switch to nginx already and made a clean install ,after backing up my domains and accounts ! It starts after upgrade to 2.2 , I can also see in the iredapd.log the delivery status of mails is DUNNO (don´t know):

2015-12-22 08:37:25 INFO [194.213.115.242] END-OF-MESSAGE, info@service-mail.XXXXXX -> heike.XXX@bkxxx, DUNNO
2015-12-22 08:41:09 INFO [81.92.113.46] RCPT, no-reply@snl.intersport.at -> xxx@xxx.com, DUNNO
2015-12-22 08:41:09 INFO [81.92.113.46] END-OF-MESSAGE, no-reply@xxxxx.at -> xxxxx@xxxxx.com, DUNNO

12

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

*) First of all, please make sure you have `policyd_enabled = False` in iRedAdmin-Pro config file.
*) Do you have `iredapd_enabled = True` in iRedAdmin-Pro config file? and other 'iredapd_db_*' parameters?

13

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Here is my settings.py :


############################################################
# DO NOT TOUCH BELOW LINE.
#
from libs.default_settings import *

############################################################
# General settings.
#
# Site webmaster's mail address.
webmaster = "postmaster@xxx.com"

# Default language.
default_language = 'en_US'

# Database backend: mysql.
backend = 'mysql'

# Base directory used to store all mail data.
# iRedMail uses '/var/vmail/vmail1' as default storage directory.
# Tip: You can set a per-domain storage directory in domain profile page.
storage_base_directory = "/var/vmail/vmail1"

# Default mta transport.
# iRedMail uses 'dovecot' as defualt transport.
# Tip: You can set a per-domain or per-user transport in domain or user
#      profile page.
default_mta_transport = 'dovecot'

# Min/Max admin password length.
#   - min_passwd_length: 0 means unlimited, but at least 1 character
#                        is required.
#   - max_passwd_length: 0 means unlimited.
# User password length is controlled in domain profile.
min_passwd_length = 8
max_passwd_length = 0

#####################################################################
# Database used to store iRedAdmin data. e.g. sessions, log.
#
iredadmin_db_host = "127.0.0.1"
iredadmin_db_port = "3306"
iredadmin_db_name = "iredadmin"
iredadmin_db_user = "iredadmin"
iredadmin_db_password = "XXXXXXXXXXXXXXXXXXXXXXXXXX"

############################################
# Database used to store mail accounts.
#
vmail_db_host = "127.0.0.1"
vmail_db_port = "3306"
vmail_db_name = "vmail"
vmail_db_user = "vmailadmin"
vmail_db_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXX"

##############################################################################
# Settings used for Amavisd-new integration. Provides spam/virus quaranting,
# releasing, etc.
#
# Log basic info of in/out emails into SQL (@storage_sql_dsn): True, False.
# It's @storage_sql_dsn setting in amavisd. You can find this setting
# in amavisd-new config files:
#   - On RHEL/CentOS:   /etc/amavisd.conf or /etc/amavisd/amavisd.conf
#   - On Debian/Ubuntu: /etc/amavis/conf.d/50-user.conf
#   - On FreeBSD:       /usr/local/etc/amavisd.conf
# Reference:
# http://www.iredmail.org/wiki/index.php? … in.Amavisd
amavisd_enable_logging = True

amavisd_db_host = "127.0.0.1"
amavisd_db_port = "3306"
amavisd_db_name = "amavisd"
amavisd_db_user = "amavisd"
amavisd_db_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# #### Quarantining ####
# Release quarantined SPAM/Virus mails: True, False.
# iRedAdmin-Pro will connect to @quarantine_server to release quarantined mails.
# How to enable quarantining in Amavisd-new:
# http://www.iredmail.org/wiki/index.php? … ining.SPAM
amavisd_enable_quarantine = True

# Port of Amavisd protocol 'AM.PDP-INET'. Default is 9998.
amavisd_quarantine_port = "9998"

# Enable per-recipient spam policy, white/blacklist.
amavisd_enable_policy_lookup = True

##############################################################################
# Settings used for iRedAPD integration: throttling and more.
#
# Enable iRedAPD integration.
iredapd_enabled = True

# SQL server/port and credential used to connect to iRedAPD SQL database.
iredapd_db_host = "127.0.0.1"
iredapd_db_port = "3306"
iredapd_db_name = "iredapd"
iredapd_db_user = "iredapd"
iredapd_db_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

##############################################################################
##############################################################################
# Place your custom settings below, you can override all settings in this file
# and libs/default_settings.py here.
#
DEFAULT_PASSWORD_SCHEME = 'SSHA512'

14

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Your iRedAdmin-Pro config file looks good. Could you please try to restart Apache or uwsgi (if you're running Nginx) service and try again? What's the error message in Apache or uwsgi log file?

15 (edited by bootboy1 2015-12-23 22:43:59)

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Hi! This is my nginx log ! When i get the internal server error !

GET
    mail=self.mail)
  File "/opt/www/iRedAdmin-Pro-SQL-2.2.0/libs/sqllib/user.py", line 254, in get_user_alias_addresses
    where='alias_to = $mail AND is_alias = 1')
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 682, in select
    return self.query(qout, processed=True)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 644, in query
    self._db_execute(db_cursor, sql_query)
  File "/usr/lib/python2.7/dist-packages/web/db.py", line 587, in _db_execute
    out = cur.execute(query, params)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'alias_to' in 'where clause'")

mail.bkdat.com [pid: 3533|app: 0|req: 1/4] 213.173.72.10 () {52 vars in 1206 bytes} [Wed Dec 23 15:42:19 2015] GET /iredadmin/profile/user/general/a.hammer@bkdat.com => generated 21 bytes in 164 msecs (HTTP/1.1 500) 2 headers in 165 bytes (2 switches on core 0)

16

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

bootboy1 wrote:

OperationalError: (1054, "Unknown column 'alias_to' in 'where clause'")

SQL column 'alias.alias_to' is introduced in iRedMail-0.9.3, looks like you didn't upgrade iRedMail to the latest iRedMail-0.9.3. Please follow our upgrade tutorial below to upgrade iRedMail:
http://www.iredmail.org/docs/iredmail.releases.html

17

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

Thanks ,I will try now ! As is mentioned earlier it was a clean install now ! Do I have to do this with a fresh new installation too ?

18

Re: internal Server error after upgrade to iRedAdmin-Pro-SQL-2.2.0

bootboy1 wrote:

As is mentioned earlier it was a clean install now ! Do I have to do this with a fresh new installation too ?

Is it a clean iRedMail-0.9.3 installation? or iRedMail-0.9.2?
It must be iRedMail-0.9.3.