1

Topic: Python error after migrate

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? Yes
- Linux/BSD distribution name and version:  Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, this weekend we migrated our iredmail 1.6.1 (PHP 5.0) in Centos 7 to a Rocky 8 (new VM)

We installed iredmail 1.6.7 PHP 8.0 (Since iredmail doesnt support install older versions) and migrate all the configuration files, dovecot, postfix, amasvid, iredapd, etc

after a long afternoon of debugging and bug fixing we found a bug that we were unable to fix and we need your help with this issue please.

[root@mrc-mail02 iredadmin]# python3 iredadmin.py
http://0.0.0.0:8080/
127.0.0.1:41660 - - [11/Dec/2023 11:35:19] "HTTP/1.1 GET /" - 200 OK
127.0.0.1:53678 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /" - 200 OK
127.0.0.1:53678 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/css/reset.css" - 200
127.0.0.1:53688 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/css/screen.css" - 200
127.0.0.1:53678 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/bck_white_10.png" - 200
127.0.0.1:53688 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/header.png" - 200
127.0.0.1:53706 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/login_header.png" - 200
127.0.0.1:53694 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/login.jpg" - 200
127.0.0.1:53718 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/bck_black_70.png" - 200
127.0.0.1:53712 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/default/images/gear.png" - 200
127.0.0.1:53688 - - [11/Dec/2023 11:35:30] "HTTP/1.1 GET /static/favicon.ico" - 200
127.0.0.1:40410 - - [11/Dec/2023 11:35:51] "HTTP/1.1 POST /login" - 303 See Other
127.0.0.1:40410 - - [11/Dec/2023 11:35:53] "HTTP/1.1 GET /dashboard" - 200 OK
127.0.0.1:40410 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/default/css/fancybox.css" - 200
127.0.0.1:40416 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/fontawesome/css/fontawesome-all.min.css" - 200
127.0.0.1:40432 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/jquery.tooltip.js" - 200
127.0.0.1:40426 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/jquery-1.12.4.min.js" - 200
127.0.0.1:40438 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/jquery.idtabs.js" - 200
127.0.0.1:40448 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/jquery.fancybox.js" - 200
127.0.0.1:40410 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/jquery.quickfilter.js" - 200
127.0.0.1:40432 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/js/stupidtable.min.js" - 200
127.0.0.1:40416 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/fontawesome/webfonts/fa-regular-400.woff2" - 200
127.0.0.1:40426 - - [11/Dec/2023 11:35:54] "HTTP/1.1 GET /static/fontawesome/webfonts/fa-solid-900.woff2" - 200
127.0.0.1:40426 - - [11/Dec/2023 11:36:02] "HTTP/1.1 GET /static/default/images/arrow_sm_grey.gif" - 200
127.0.0.1:40426 - - [11/Dec/2023 11:36:06] "HTTP/1.1 POST /search" - 200 OK
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.6/http/client.py", line 1365, in getresponse
response.begin()
File "/usr/lib64/python3.6/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.6/http/client.py", line 289, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.6/site-packages/urllib3/packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.6/http/client.py", line 1365, in getresponse
response.begin()
File "/usr/lib64/python3.6/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.6/http/client.py", line 289, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/web/application.py", line 277, in process
return self.handle()
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/web/application.py", line 268, in handle
return self._delegate(fn, self.fvars, args)
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/web/application.py", line 510, in _delegate
return handle_class(cls)
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/web/application.py", line 488, in handle_class
return tocall(*args)
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/controllers/ldap/user.py", line 314, in GET
_qr = mlmmj.get_subscribed_lists(mail=mail, query_all_lists=False)
File "/opt/www/iRedAdmin-Pro-LDAP-5.4.1/libs/mlmmj/__init__.py", line 335, in get_subscribed_lists
r = requests.get(url, params=params, headers=api_headers, verify=_verify_ssl)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 535, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 648, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

127.0.0.1:40426 - - [11/Dec/2023 11:36:13] "HTTP/1.1 GET /profile/user/general/cf@javanstest.com" - 500 Internal Server Error
127.0.0.1:40426 - - [11/Dec/2023 11:36:13] "HTTP/1.1 GET /favicon.ico" - 404 Not Found

----

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

2

Re: Python error after migrate

It's not clear which code line caused the error.

- Can you reproduce this issue steadily? How?
- Did you upgrade iRedMail after migrated to new server? FYI https://docs.iredmail.org/iredmail.releases.html

3

Re: Python error after migrate

Hello! thanks for the reply , we updated to 1.6.7 and iredadminpro to 5.6 (image attached)

The problem we are having is when we try to click on an user to edit the preferences in the iredadmin panel we get "Internal Server Error" (images attached)

Post's attachments

Screenshot_1.png
Screenshot_1.png 10.44 kb, 1 downloads since 2023-12-21 

Screenshot_3.png
Screenshot_3.png 4.78 kb, file has never been downloaded. 

Screenshot_4.png
Screenshot_4.png 863 b, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4

Re: Python error after migrate

- What's the (FULL) related error log lines in /var/log/messages?
- Is "mlmmjadmin" service running?

5

Re: Python error after migrate

I have the same problem after release upgrade.

FIX: reinstall mlmmjadmin

docs.iredmail.org/upgrade.mlmmjadmin.html