1

Topic: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: FreeBSD
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- 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.
====

Hi,
while managing a domain i got this error today.
This happens as i'm trying to get a specific email user details. (
From the domains lists i choose a domain ->
From the emails/users list a click on one)

Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=7790): Max retries exceeded with url: /api/subscriber/email@domain.dom/subscribed?query_all_lists=no&email_only=yes (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x80b1c5890>: Failed to establish a new connection: [Errno 61] Connection refused',))",),)

The problem is likely connected to they fact that (being on a FreeBSD jail) i do not use 127.0.0.1 for anything, jails don't have 127.0.0.1, the parent system does. Consequently it looks to me that there might be a place where 127.0.0.1 is hardcoded instead than getting it form the settings file.

A quick check at the "/usr/local/www/iRedAdmin-Pro-SQL-4.2" gets me a list of files that have '127.0.0.1' in it:

# grep -e '127.0.0.1' -r ./
./settings.py.mysql.sample:#   3. lmtp:inet:127.0.0.1:24: LMTP (TCP listener). Supported by iRedMail-0.8.6
./settings.py.mysql.sample:iredadmin_db_host = '127.0.0.1'
./settings.py.mysql.sample:vmail_db_host = '127.0.0.1'
./settings.py.mysql.sample:amavisd_db_host = '127.0.0.1'
./settings.py.mysql.sample:# Default is '127.0.0.1'. Sample setting:
./settings.py.mysql.sample:iredapd_db_host = '127.0.0.1'
./rc_scripts/uwsgi/rhel.ini:uwsgi-socket = 127.0.0.1:7791
./rc_scripts/uwsgi/openbsd.ini:uwsgi-socket = 127.0.0.1:7791
./rc_scripts/uwsgi/debian.ini:uwsgi-socket = 127.0.0.1:7791
./rc_scripts/uwsgi/freebsd.ini:uwsgi-socket = 127.0.0.1:7791
./tools/ira_tool_lib.py:                    ip='127.0.0.1',
./tools/upgrade_iredadmin.sh:host=127.0.0.1
./tools/upgrade_iredadmin.sh:            perl -pi -e 's#uwsgi_pass unix:.*iredadmin.socket;#uwsgi_pass 127.0.0.1:7791;#g' ${f}
./tools/upgrade_iredadmin.sh:        add_missing_parameter 'iredapd_db_host' '127.0.0.1'
./libs/default_settings.py:    "lmtp:inet:127.0.0.1:24",
./libs/default_settings.py:# Base url of mlmmjadmin API. For example: 'http://127.0.0.1:7790/api'
./libs/default_settings.py:MLMMJADMIN_API_BASE_URL = "http://127.0.0.1:7790/api"
./libs/default_settings.py:fail2ban_db_host = '127.0.0.1'
./libs/ipaddress.py:            >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
./settings.py.pgsql.sample:#   3. lmtp:inet:127.0.0.1:24: LMTP (TCP listener). Supported by iRedMail-0.8.6
./settings.py.pgsql.sample:iredadmin_db_host = '127.0.0.1'
./settings.py.pgsql.sample:vmail_db_host = '127.0.0.1'
./settings.py.pgsql.sample:amavisd_db_host = '127.0.0.1'
./settings.py.pgsql.sample:# Default is '127.0.0.1'. Sample setting:
./settings.py.pgsql.sample:iredapd_db_host = '127.0.0.1'

But none of these seems to be the culpit....

Any suggestion?
Thanks,
Marco

----

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

2

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

I decided to restart the whole server, just on case something was not working properly, and now iredadmin won't start at all.
I think the issue is that I installed imapsync on the same system and it might have upgraded some python libraries from 27 to 37, if i attempt to reinstall iredAdmin-Pro i get an error:
pkg-static: py27-setuptools-41.4.0_1 conflicts with py37-setuptools-41.4.0_1 (installs files into the same place).  Problematic file: /usr/local/bin/easy_install
Should I remove py37-setuptools-41.4.0_1? (probably at the expense of imapsync not working, but that is not a big problem, i can set it up on a separate jail...).
Thanks

3

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

- iRedAdmin-Pro requires python-2, not python-3.
- I suppose both py2 and py3 can exist on same FreeBSD host, you just need to install the required packages for py2.

4

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

OK, so my guess here is that the installation of imapsync removed a required py27 module.
So this is a 'non issue', the real issue is which modules are now missing (which is being discussed here: https://forum.iredmail.org/post73691.html
Because this issue caused another...
Thank you.

5

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

- let's discuss iRedAdmin-Pro issue in that thread.
- you may need to restart "mlmmjadmin" service too.

6 (edited by OldGreyFox 2023-04-11 00:47:36)

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

Debian 11
iRedMail    1.6.2
iRedAdmin-Pro    5.3 (MySQL)

I got the same error in latest iRedAdminPro when i click on user properties.

Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=7790): Max retries exceeded with url: /api/subscriber/com@gik.ru/subscribed?query_all_lists=no&email_only=yes (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4d16cb310>: Failed to establish a new connection: [Errno 111] Connection refused'))"))

Any suggestion?

7

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

@OldGreyFox, i have not upgraded to the latest version, but in general that error can be solved by restarting the service. In my case I had a problem with my python installation, but I think the issue was very specific to my installation.

8

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

@iredmail.mb, i have clean install, then import users, then import mailboxes, no upgrade. 4 days ago everything was working fine. restarting the service and restarting the server does not solve the problem.

9

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

OldGreyFox wrote:

@iredmail.mb, i have clean install, then import users, then import mailboxes, no upgrade. 4 days ago everything was working fine. restarting the service and restarting the server does not solve the problem.

According to the error message, "mlmmjadmin" service was not running. Please try to start it first then try again.

10

Re: Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.

ZhangHuangbin wrote:

mlmmjadmin

You are right as usual, my sync mail script make wrong permission for /var/vmail. Now all fine, thanks.
Regards