Me again
So Iām to migrate a quite big NS7 mail server to NS8. Iām trying a hybrid setup with the mail repository stored on a bind-mounted slow storage like I successfully did with nextcloud.
Mail looks like another story. Iāve multiple questions
- It looks like the script is launching instances of rsync multiple times in a hardcoded way, but I canāt find where. I need to add the infamous
--security-opt label=disable
parameter to avoid selinux errors :
# ns8-migration.log excerpt
<7>podman-pull-missing ghcr.io/nethserver/rsync:3.9.2
<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20005 --env=RSYNCD_USER=mail4 --env=RSYNCD_PASSWORD=17055676222ac0-2e0f-4db4-9769-bde36994bfe2 --env=RSYNCD_SYSLOG_TAG=mail4 --volume=/dev/log:/dev/log --replace --name=rsync-mail4 --volume=/home/mail4/.config/state:/srv/state --volume=rspamd-redis:/srv/volumes/rspamd-redis --volume=dovecot-data:/srv/volumes/dovecot-data --volume=clamav-cus-cfg:/srv/volumes/clamav-cus-cfg --volume=clamav-db:/srv/volumes/clamav-db --volume=clamav-cus:/srv/volumes/clamav-cus --volume=rspamd-data:/srv/volumes/rspamd-data --volume=rspamd-override:/srv/volumes/rspamd-override --volume=dovecot-lmtp:/srv/volumes/dovecot-lmtp --volume=postfix-queue:/srv/volumes/postfix-queue --volume=postfix-custom:/srv/volumes/postfix-custom ghcr.io/nethserver/rsync:3.9.2
R
- it could be linked to the problem above but Iām not sure; there is a connection refused to the Dovecot API (http://127.0.0.1:9288/doveadm/v1). I suppose it is not running, any idea why ?
Below the entire log file, keep in mind that I restarted the process sometime :
<f..T...... default.txt
dr-xr-xr-x 6 2025/02/14 00:04:11 .
<7>podman-pull-missing ghcr.io/nethserver/rsync:3.9.2
<7>podman run --rm --privileged --network=host --workdir=/srv --env=RSYNCD_NETWORK=10.5.4.0/24 --env=RSYNCD_ADDRESS=cluster-localnode --env=RSYNCD_PORT=20005 --env=RSYNCD_USER=mail4 --env=RSYNCD_PASSWORD=17055676222ac0-2e0f-4db4-9769-bde36994bfe2 --env=RSYNCD_SYSLOG_TAG=mail4 --volume=/dev/log:/dev/log --replace --name=rsync-mail4 --volume=/home/mail4/.config/state:/srv/state --volume=rspamd-redis:/srv/volumes/rspamd-redis --volume=dovecot-data:/srv/volumes/dovecot-data --volume=clamav-cus-cfg:/srv/volumes/clamav-cus-cfg --volume=clamav-db:/srv/volumes/clamav-db --volume=clamav-cus:/srv/volumes/clamav-cus --volume=rspamd-data:/srv/volumes/rspamd-data --volume=rspamd-override:/srv/volumes/rspamd-override --volume=dovecot-lmtp:/srv/volumes/dovecot-lmtp --volume=postfix-queue:/srv/volumes/postfix-queue --volume=postfix-custom:/srv/volumes/postfix-custom ghcr.io/nethserver/rsync:3.9.2
Renamed 'users@fqdn' -> 'users'
...
Bogus entry ignored: `vmail@lebrass.be`
<6>Importing Always BCC Address...
<6>Importing smarthosts...
<6>Importing sender validation...
<6>Importing network table...
<7>BEGIN
<7>DELETE FROM mynetworks
<7>COMMIT
renamed 'dkim.migration/default.private' -> 'dkim.migration/default.key'
./
./default.txt
./default.key
changed ownership of '/var/lib/rspamd/dkim/default.key' to 101:102
changed ownership of '/var/lib/rspamd/dkim/default.txt' to 101:102
removed 'dkim.migration/default.txt'
removed 'dkim.migration/default.key'
removed directory 'dkim.migration'
Traceback (most recent call last):
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/util/connection.py", line 85, 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/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib64/python3.11/http/client.py", line 1303, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.11/http/client.py", line 1349, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.11/http/client.py", line 1298, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib64/python3.11/http/client.py", line 1058, in _send_output
self.send(msg)
File "/usr/lib64/python3.11/http/client.py", line 996, in send
self.connect()
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fc388980150>: 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/agent/pyenv/lib64/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=9288): Max retries exceeded with url: /doveadm/v1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc388980150>: 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 "/home/mail4/.config/actions/import-module/50import_domains", line 30, in <module>
mail.doveadm_query("mailboxCreate", {"mailbox": ["postmaster"], "user": "vmail"})
File "/home/mail4/.config/pypkg/mail.py", line 275, in doveadm_query
oresp = requests.post(f"http://127.0.0.1:{dport}/doveadm/v1", json=req, headers={"Authorization": "X-Dovecot-API " + atok}).json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/agent/pyenv/lib64/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9288): Max retries exceeded with url: /doveadm/v1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc388980150>: Failed to establish a new connection: [Errno 111] Connection refused'))
""----------- start nethserver-mail Wed, 23 Jul 2025 15:29:24 +0200
mkdir: création du répertoire « /var/lib/nethserver/nethserver-ns8-migration/nethserver-sogo »
Assertion failed
File "/var/lib/nethserver/cluster/actions/import-module/50import", line 50, in <module>
agent.assert_exp(add_module_result['exit_code'] == 0) # add-module is successful
[INFO] Created remote module instance mail1
[INFO] App nethserver-mail is bound to rsync://mail1@10.5.4.1:20004, waiting for task module/mail1/task/3b4e4436-f9de-465b-aaaf-4524db27112b
----------- start nethserver-mail Wed, 23 Jul 2025 15:30:06 +0200
[INFO] App nethserver-mail is bound to rsync://mail1@10.5.4.1:20004, waiting for task module/mail1/task/3b4e4436-f9de-465b-aaaf-4524db27112b
[INFO] Created remote module instance sogo1
[INFO] App nethserver-sogo is bound to rsync://sogo1@10.5.4.1:20006, waiting for task module/sogo1/task/db52c40f-7238-4bf2-8a0d-c31be1753309
----------- sync nethserver-mail Wed, 23 Jul 2025 15:40:50 +0200
<f+++++++++ accounts.json
<f+++++++++ clamd.json
<f+++++++++ domains.json
<f+++++++++ dovecot.json
<f+++++++++ groups.json
EDIT : Tried this Cluster and sd error mail and dovecot updating - #8 by davidep without success.
Thanks !