1

Topic: Internal Server Error after upgrading to iRedAdminPro-OpenLdap-v4.7

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 OPENLDAP edition.
- Deployed with iRedMail Easy or the downloadable installer? Downloadable installer
- Linux/BSD distribution name and version: CentOS Linux release 8.2.2004 (Core)
- 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.
====
I log in (with postmaster) iredamin, try to edit account profile of any user of any domain and get  a blank screen with the message "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 upgrading to iRedAdminPro-OpenLdap-v4.7

After running http server on port 8080 with python3 iredadmin.py, got this output after creating the issue:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

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 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 181, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3c2f382940>: Failed to establish a new connection: [Errno 111] Connection refused

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 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=7790): Max retries exceeded with url: /api/subscriber/josuesoares@ctngsrocpast.com/subscribed?query_all_lists=no&email_only=no (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3c2f382940>: Failed to establish a new connection: [Errno 111] Connection refused',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/web/application.py", line 280, in process
    return self.handle()
  File "/usr/local/lib/python3.6/site-packages/web/application.py", line 271, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/local/lib/python3.6/site-packages/web/application.py", line 514, in _delegate
    return handle_class(cls)
  File "/usr/local/lib/python3.6/site-packages/web/application.py", line 492, in handle_class
    return tocall(*args)
  File "/opt/www/iRedAdmin-Pro-LDAP-4.7/controllers/ldap/user.py", line 313, in GET
    _qr = mlmmj.get_subscribed_lists(mail=mail, query_all_lists=False)
  File "/opt/www/iRedAdmin-Pro-LDAP-4.7/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 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=7790): Max retries exceeded with url: /api/subscriber/josuesoares@ctngsrocpast.com/subscribed?query_all_lists=no&email_only=no (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3c2f382940>: Failed to establish a new connection: [Errno 111] Connection refused',))

192.168.5.254:51516 - - [18/Nov/2020 15:13:09] "HTTP/1.1 GET /profile/user/general/josuesoares@ctngsrocpast.com" - 500 Internal Server Error
192.168.5.254:51516 - - [18/Nov/2020 15:13:09] "HTTP/1.1 GET /favicon.ico" - 404 Not Found

3

Re: Internal Server Error after upgrading to iRedAdminPro-OpenLdap-v4.7

- Is "mlmmjadmin" service running? Please try to restart it and try iRedAdmin-Pro again.
- Also, try to create a testing mailing list with the mlmmjadmin command line tool, to verify it's actually working. FYI: https://docs.iredmail.org/manage.subscr … lists.html

4 (edited by HM 2020-11-21 02:01:33)

Re: Internal Server Error after upgrading to iRedAdminPro-OpenLdap-v4.7

ZhangHuangbin wrote:

- Is "mlmmjadmin" service running? Please try to restart it and try iRedAdmin-Pro again.
- Also, try to create a testing mailing list with the mlmmjadmin command line tool, to verify it's actually working. FYI: https://docs.iredmail.org/manage.subscr … lists.html

Restarted service "mlmmjadmin". Got this status:
mlmmjadmin.service - RESTful API server used to manage mlmmj mailing list manager
   Loaded: loaded (/usr/lib/systemd/system/mlmmjadmin.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-11-20 10:28:11 WET; 7h ago
  Process: 105547 ExecStopPost=/usr/bin/rm -rf /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 105545 ExecStart=/usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid (code=exited>
  Process: 105543 ExecStartPre=/usr/bin/chmod 0755 /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 105541 ExecStartPre=/usr/bin/chown mlmmj:mlmmj /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 105539 ExecStartPre=/usr/bin/mkdir /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
Main PID: 105545 (code=exited, status=203/EXEC)

nov 20 10:28:11 servmail.ctngsroc.com systemd[1]: Starting RESTful API server used to manage mlmmj mailing list manager...
nov 20 10:28:11 servmail.ctngsroc.com systemd[1]: Started RESTful API server used to manage mlmmj mailing list manager.
nov 20 10:28:11 servmail.ctngsroc.com systemd[1]: mlmmjadmin.service: Main process exited, code=exited, status=203/EXEC
nov 20 10:28:11 servmail.ctngsroc.com systemd[1]: mlmmjadmin.service: Failed with result 'exit-code'.
==

Execute command ]# python3.8 maillist_admin.py create listTest@ctngsrocpast.com , and got:

only_subscriber_can_post=yes disable_archive=no
python3.8: can't open file 'maillist_admin.py': [Errno 2] No such file or directory

==
The issue remains.

5

Re: Internal Server Error after upgrading to iRedAdminPro-OpenLdap-v4.7

It's a bug of mlmmjadmin upgrade script on CentOS 8. Please upgrade to the latest mlmmjadmin-3.0.5 to fix it:
https://docs.iredmail.org/upgrade.mlmmjadmin.html

6

Re: Internal Server Error after upgrading to iRedAdminPro-OpenLdap-v4.7

ZhangHuangbin wrote:

It's a bug of mlmmjadmin upgrade script on CentOS 8. Please upgrade to the latest mlmmjadmin-3.0.5 to fix it:
https://docs.iredmail.org/upgrade.mlmmjadmin.html

Ok. That's it. Thanks a lot. Fixed.