1

Topic: Getting Internal Server error

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  2.3.1
- Linux/BSD distribution name and version:  Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

I tried following this. http://www.iredmail.org/forum/topic1056 … pages.html
But cant get it to work.
Still having internal server errors trying to access domains, I have updated lapd to 1.8.0.

----

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

2

Re: Getting Internal Server error

Any related error in Apache log file?

3

Re: Getting Internal Server error

ZhangHuangbin wrote:

Any related error in Apache log file?


[Tue Feb 16 08:32:00.330221 2016] [:error] [pid 19017] [remote 192.168.1.1:14282] Traceback (most recent call last):
[Tue Feb 16 08:32:00.330299 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Tue Feb 16 08:32:00.330314 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return self.handle()
[Tue Feb 16 08:32:00.330325 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Tue Feb 16 08:32:00.330337 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return self._delegate(fn, self.fvars, args)
[Tue Feb 16 08:32:00.330349 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Tue Feb 16 08:32:00.330361 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return handle_class(cls)
[Tue Feb 16 08:32:00.330372 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Tue Feb 16 08:32:00.330384 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return tocall(*args)
[Tue Feb 16 08:32:00.330395 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/share/apache2/iredadmin/libs/sqllib/decorators.py", $
[Tue Feb 16 08:32:00.330407 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return func(*args, **kw)
[Tue Feb 16 08:32:00.330418 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/share/apache2/iredadmin/controllers/sql/user.py", li$
[Tue Feb 16 08:32:00.330430 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     mail=self.mail)
[Tue Feb 16 08:32:00.330442 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/share/apache2/iredadmin/libs/sqllib/user.py", line 2$
[Tue Feb 16 08:32:00.330453 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     where='alias_to = $mail AND is_alias = 1')
[Tue Feb 16 08:32:00.330465 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 682, in$
[Tue Feb 16 08:32:00.330476 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     return self.query(qout, processed=True)
[Tue Feb 16 08:32:00.330488 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 644, in$
[Tue Feb 16 08:32:00.330499 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     self._db_execute(db_cursor, sql_query)
[Tue Feb 16 08:32:00.330510 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 587, in$
[Tue Feb 16 08:32:00.330522 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     out = cur.execute(query, params)
[Tue Feb 16 08:32:00.330533 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", lin$
[Tue Feb 16 08:32:00.330545 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     self.errorhandler(self, exc, value)
[Tue Feb 16 08:32:00.330556 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py",$
[Tue Feb 16 08:32:00.330568 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]     raise errorclass, errorvalue
[Tue Feb 16 08:32:00.330580 2016] [:error] [pid 19017] [remote 192.168.1.1:14282] OperationalError: (1054, "Unknown column 'alias_to' in 'where cla$
[Tue Feb 16 08:32:00.330624 2016] [:error] [pid 19017] [remote 192.168.1.1:14282]

4

Re: Getting Internal Server error

ocpistol wrote:

[Tue Feb 16 08:32:00.330580 2016] [:error] [pid 19017] [remote 192.168.1.1:14282] OperationalError: (1054, "Unknown column 'alias_to' in 'where cla$

Some SQL columns which were introduced in newer iRedMail releases are missing. Please upgrade your iRedMail server to the latest iRedMail release. Upgrade tutorials are available here:
http://www.iredmail.org/docs/iredmail.releases.html

5

Re: Getting Internal Server error

were is roundcube stored?

6

Re: Getting Internal Server error

Excuse me, what do you mean "is roundcube stored?

7

Re: Getting Internal Server error

Ok I did all the updates to get iRedMail to 0.9.4. still getting these problems

[Wed Feb 17 09:04:35.070194 2016] [mpm_prefork:notice] [pid 7147] AH00169: caught SIGTERM, shutting down
[Wed Feb 17 09:04:36.286067 2016] [mpm_prefork:notice] [pid 8063] AH00163: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/$
[Wed Feb 17 09:04:36.286170 2016] [core:notice] [pid 8063] AH00094: Command line: '/usr/sbin/apache2'
[Wed Feb 17 09:15:36.398952 2016] [mpm_prefork:notice] [pid 8063] AH00169: caught SIGTERM, shutting down
[Wed Feb 17 09:15:25.220911 2016] [mpm_prefork:notice] [pid 2100] AH00163: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/$
[Wed Feb 17 09:15:25.230021 2016] [core:notice] [pid 2100] AH00094: Command line: '/usr/sbin/apache2'
[Wed Feb 17 09:42:35.870210 2016] [:error] [pid 2104] 'module' object has no attribute 'iredapd_db_host'
[Wed Feb 17 09:42:35.886176 2016] [:error] [pid 2104] [remote 192.168.1.1:8088] Traceback (most recent call last):
[Wed Feb 17 09:42:35.886220 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/lib/python2.7/dist-packages/web/applica$
[Wed Feb 17 09:42:35.886234 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     return self.handle()
[Wed Feb 17 09:42:35.886246 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/lib/python2.7/dist-packages/web/applica$
[Wed Feb 17 09:42:35.886258 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     return self._delegate(fn, self.fvars, args)
[Wed Feb 17 09:42:35.886269 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/lib/python2.7/dist-packages/web/applica$
[Wed Feb 17 09:42:35.886280 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     return handle_class(cls)
[Wed Feb 17 09:42:35.886292 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/lib/python2.7/dist-packages/web/applica$
[Wed Feb 17 09:42:35.886304 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     return tocall(*args)
[Wed Feb 17 09:42:35.886361 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/share/apache2/iredadmin/libs/sqllib/dec$
[Wed Feb 17 09:42:35.886377 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     return func(*args, **kw)
[Wed Feb 17 09:42:35.886408 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/share/apache2/iredadmin/controllers/sql$
[Wed Feb 17 09:42:35.886420 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     qr = iredapd_greylist.get_greylist_setting_and_w$
[Wed Feb 17 09:42:35.886432 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/share/apache2/iredadmin/libs/iredapd/gr$
[Wed Feb 17 09:42:35.886443 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     gl = Greylisting()
[Wed Feb 17 09:42:35.886453 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]   File "/usr/share/apache2/iredadmin/libs/iredapd/__$
[Wed Feb 17 09:42:35.886464 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]     self.db.supports_multiple_insert = True
[Wed Feb 17 09:42:35.886475 2016] [:error] [pid 2104] [remote 192.168.1.1:8088] AttributeError: 'Greylisting' object has no attribut$
[Wed Feb 17 09:42:35.886500 2016] [:error] [pid 2104] [remote 192.168.1.1:8088]

8

Re: Getting Internal Server error

ocpistol wrote:

[Wed Feb 17 09:42:35.886475 2016] [:error] [pid 2104] [remote 192.168.1.1:8088] AttributeError: 'Greylisting' object has no attribut$

*) Please set 'policyd_enabled = False' in iRedAdmin-Pro config file (/usr/share/apache2/iredadmin/settings.py), then restart Apache service.
*) Do you have parameters which starts with "iredapd_db_" in iRedAdmin-Pro config file? Can you connect to sql server with the values specified in "iredapd_db_*"?

*) Did you upgrade iRedAPD to the latest iRedAPD-1.8.0?

*) Did you upgrade iRedAdmin-Pro BEFORE upgrading iRedAPD/iRedMail?

9

Re: Getting Internal Server error

ZhangHuangbin wrote:
ocpistol wrote:

[Wed Feb 17 09:42:35.886475 2016] [:error] [pid 2104] [remote 192.168.1.1:8088] AttributeError: 'Greylisting' object has no attribut$

*) Please set 'policyd_enabled = False' in iRedAdmin-Pro config file (/usr/share/apache2/iredadmin/settings.py), then restart Apache service.
*) Do you have parameters which starts with "iredapd_db_" in iRedAdmin-Pro config file? Can you connect to sql server with the values specified in "iredapd_db_*"?

*) Did you upgrade iRedAPD to the latest iRedAPD-1.8.0?

*) Did you upgrade iRedAdmin-Pro BEFORE upgrading iRedAPD/iRedMail?

I do not have parameters that start iwth "iredapd_db_

I have upgraded to iRedAPD 1.8.0

and i did upgrade before

10

Re: Getting Internal Server error

Please show us output of command below:

ls -l /opt/

*) During upgrading iRedAPD, it will ask you to input MySQL root username and password, did you input the correct username/password? It will create sql database "iredapd" and update /opt/iredapd/settings.py with "iredapd_db_*".

11

Re: Getting Internal Server error

ZhangHuangbin wrote:

Please show us output of command below:

ls -l /opt/

*) During upgrading iRedAPD, it will ask you to input MySQL root username and password, did you input the correct username/password? It will create sql database "iredapd" and update /opt/iredapd/settings.py with "iredapd_db_*".


root@mail:~/iRedAdmin-Pro-SQL-2.3.0/tools# ls -l /opt/
total 8
lrwxrwxrwx 1 root    root      13 Feb 16 15:35 iredapd -> iRedAPD-1.8.0
dr-xr-xr-x 5 iredapd iredapd 4096 Sep 26  2014 iRedAPD-1.4.3
dr-x------ 7 root    root    4096 Feb 17 09:10 iRedAPD-1.8.0


I put the root password in when i installed it.

12

Re: Getting Internal Server error

OK, let's fix it this way:

*) Make sure you have SQL database "iredapd" in SQL server. If not, please create it with SQL template file '/opt/iredapd/SQL/iredapd.mysql', then import SQL file "/opt/iredapd/SQL/greylisting_whitelist_domains.sql".

Note: Of course you need to create a new SQL user 'iredapd' and grant all privileges on "iredapd" table to user "iredapd".

*) Add below settings in /opt/iredapd/settings.py:

# iRedAPD database, used for greylisting, throttle.
iredapd_db_server = '127.0.0.1'
iredapd_db_port = '3306'
iredapd_db_name = 'iredapd'
iredapd_db_user = 'iredapd'
iredapd_db_password = 'password'

*) Please update the "iredapd_db_*" settings, make sure you're using the correct SQL username/password.
*) Restart iRedAPD service.

13

Re: Getting Internal Server error

ZhangHuangbin wrote:

OK, let's fix it this way:

*) Make sure you have SQL database "iredapd" in SQL server. If not, please create it with SQL template file '/opt/iredapd/SQL/iredapd.mysql', then import SQL file "/opt/iredapd/SQL/greylisting_whitelist_domains.sql".

Note: Of course you need to create a new SQL user 'iredapd' and grant all privileges on "iredapd" table to user "iredapd".

*) Add below settings in /opt/iredapd/settings.py:

# iRedAPD database, used for greylisting, throttle.
iredapd_db_server = '127.0.0.1'
iredapd_db_port = '3306'
iredapd_db_name = 'iredapd'
iredapd_db_user = 'iredapd'
iredapd_db_password = 'password'

*) Please update the "iredapd_db_*" settings, make sure you're using the correct SQL username/password.
*) Restart iRedAPD service.


I had the database, and I added the stuff to settings.py but i am still getting this


[Thu Feb 18 09:08:54.893488 2016] [:error] [pid 2084] 'module' object has no attribute 'iredapd_db_host'
[Thu Feb 18 09:08:54.904551 2016] [:error] [pid 2084] [remote 192.168.1.1:8916] Traceback (most recent call last):
[Thu Feb 18 09:08:54.904591 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Thu Feb 18 09:08:54.904605 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     return self.handle()
[Thu Feb 18 09:08:54.904617 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Thu Feb 18 09:08:54.904629 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     return self._delegate(fn, self.fvars, args)
[Thu Feb 18 09:08:54.904640 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Thu Feb 18 09:08:54.904652 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     return handle_class(cls)
[Thu Feb 18 09:08:54.904663 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/lib/python2.7/dist-packages/web/application.py", lin$
[Thu Feb 18 09:08:54.904675 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     return tocall(*args)
[Thu Feb 18 09:08:54.904686 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/share/apache2/iredadmin/libs/sqllib/decorators.py", $
[Thu Feb 18 09:08:54.904697 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     return func(*args, **kw)
[Thu Feb 18 09:08:54.904709 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/share/apache2/iredadmin/controllers/sql/domain.py", $
[Thu Feb 18 09:08:54.904721 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     qr = iredapd_greylist.get_greylist_setting_and_whitelists(acc$
[Thu Feb 18 09:08:54.904732 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/share/apache2/iredadmin/libs/iredapd/greylist.py", l$
[Thu Feb 18 09:08:54.904765 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     gl = Greylisting()
[Thu Feb 18 09:08:54.904776 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]   File "/usr/share/apache2/iredadmin/libs/iredapd/__init__.py", l$
[Thu Feb 18 09:08:54.904787 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     self.db.supports_multiple_insert = True
[Thu Feb 18 09:08:54.904798 2016] [:error] [pid 2084] [remote 192.168.1.1:8916] AttributeError: 'Greylisting' object has no attribute 'db'
[Thu Feb 18 09:08:54.904820 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]
[Thu Feb 18 09:14:09.683949 2016] [mpm_prefork:notice] [pid 2080] AH00169: caught SIGTERM, shutting down
[Thu Feb 18 09:14:10.889132 2016] [mpm_prefork:notice] [pid 20733] AH00163: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/2.7.6 config$
[Thu Feb 18 09:14:10.889265 2016] [core:notice] [pid 20733] AH00094: Command line: '/usr/sbin/apache2'

14

Re: Getting Internal Server error

ocpistol wrote:

[Thu Feb 18 09:08:54.904787 2016] [:error] [pid 2084] [remote 192.168.1.1:8916]     self.db.supports_multiple_insert = True
[Thu Feb 18 09:08:54.904798 2016] [:error] [pid 2084] [remote 192.168.1.1:8916] AttributeError: 'Greylisting' object has no attribute 'db'

This is caused by upgrading iRedAdmin-Pro BEFORE upgrading iRedAPD.
Please set "policyd_enabled = False" in iRedAdmin-Pro config file, then restart Apache and try again.

15

Re: Getting Internal Server error

It was set to false.

16

Re: Getting Internal Server error

It's False, not "false".
Also, please restart Apache service and try again.

17

Re: Getting Internal Server error

ZhangHuangbin wrote:

It's False, not "false".
Also, please restart Apache service and try again.


This is how my file has been.

18

Re: Getting Internal Server error

ocpistol wrote:

This is how my file has been.

Please do NOT show your passwords in a public forum.

The settings looks fine. Did you restart Apache service?

19

Re: Getting Internal Server error

ZhangHuangbin wrote:
ocpistol wrote:

This is how my file has been.

Please do NOT show your passwords in a public forum.

The settings looks fine. Did you restart Apache service?

yes I have restarted it many times.

20

Re: Getting Internal Server error

*) Do you have correct SQL username/password defined in iredapd_db_user and iredapd_db_password? NOTE: It's "iredapd_*", not "iredadmin_*".

*) If it does have correct sql username/password, i'm afraid that i need direct ssh access for further debug. Are you willing to buy a support ticket for this?
http://www.iredmail.org/support.html