1

Topic: internal server error after upgrading from iredadmin-pro-2.8.0 to 4.2

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: UBUNTU 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MYSQL 5.7.29
- Web server (Apache or Nginx): APACHE
- Manage mail accounts with iRedAdmin-Pro? YES
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
After upgrading everything step by step to latest iredadmin (and iredmail to 1.1) i get internal server error after login. When I refresh the page, I get the response, but going forward in the admin interface I get the same, and I have to refresh.

It seems to be the problem of python - mysql connection with ssl. I've checked someone had bug like this, but I'm not able to fix that.

In the apache error log:

[Tue Feb 11 19:36:25.177269 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933] Traceback (most recent call last):
[Tue Feb 11 19:36:25.178669 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 237, in process
[Tue Feb 11 19:36:25.178691 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     return p(lambda: process(processors))
[Tue Feb 11 19:36:25.178698 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/session.py", line 85, in _processor
[Tue Feb 11 19:36:25.178703 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     self._load()
[Tue Feb 11 19:36:25.178708 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/session.py", line 104, in _load
[Tue Feb 11 19:36:25.178712 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     self._check_expiry()
[Tue Feb 11 19:36:25.178717 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/session.py", line 123, in _check_expiry
[Tue Feb 11 19:36:25.178722 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     if self.session_id and self.session_id not in self.store:
[Tue Feb 11 19:36:25.178727 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/session.py", line 292, in __contains__
[Tue Feb 11 19:36:25.178731 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     data = self.db.select(self.table, where="session_id=$key", vars=locals())
[Tue Feb 11 19:36:25.178736 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 682, in select
[Tue Feb 11 19:36:25.178741 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     return self.query(qout, processed=True)
[Tue Feb 11 19:36:25.178745 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 643, in query
[Tue Feb 11 19:36:25.178749 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     db_cursor = self._db_cursor()
[Tue Feb 11 19:36:25.178754 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 566, in _db_cursor
[Tue Feb 11 19:36:25.178758 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     return self.ctx.db.cursor()
[Tue Feb 11 19:36:25.178763 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 507, in _getctx
[Tue Feb 11 19:36:25.178767 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     self._load_context(self._ctx)
[Tue Feb 11 19:36:25.178773 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 518, in _load_context
[Tue Feb 11 19:36:25.178778 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     ctx.db = self._connect(self.keywords)
[Tue Feb 11 19:36:25.178782 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/web/db.py", line 546, in _connect
[Tue Feb 11 19:36:25.178787 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     return self.db_module.connect(**keywords)
[Tue Feb 11 19:36:25.178791 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
[Tue Feb 11 19:36:25.178795 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     return Connection(*args, **kwargs)
[Tue Feb 11 19:36:25.178812 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__
[Tue Feb 11 19:36:25.178817 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933]     super(Connection, self).__init__(*args, **kwargs2)
[Tue Feb 11 19:36:25.178822 2020] [wsgi:error] [pid 37904] [remote 92.XXX.XXX.XXX:6933] OperationalError: (2026, 'SSL connection error: error:00000005:lib(0):func(0):DH lib')


In the SQL log i only get this:

2020-02-11T18:36:25.179917Z 52 [Note] Bad handshake

In the mysql config i have added this:
[client]
ssl-mode=DISABLED

but without success.

Please advise!

Thanks,
Balazs

2

Re: internal server error after upgrading from iredadmin-pro-2.8.0 to 4.2

Add it under “[mysqld]” section and restart mysql service.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee