IP Address Change

Very early today I changed the ip address of my box, updated the Glue records at the registrar, ran the mailinabox setup, and rebooted the server. Many hours later and the ip address change hasn’t taken effect. I know Glue record changes can take up to 48 hours but I have never had DNS changes take this long.

When the mailinabox setup ran it indicated the public ip address had changed but it still showed the private ip address as the old ip address. In the admin panel external DNS showed updated ip address but the status page was inaccessible.

Just now I checked my /etc/nsd/zones/box.com.txt file and found it contains only the old ip address. Reboots, mailinabox setup scripts, and services restarts have had no impact.

There are no special modifications to my mailinabox. It’s a basic install. I’d appreciate any insight on what has gone wrong with the ip address change and how I might fix it.

Check ip addr is the old ip not there anymore?
Check /etc/mailinabox.conf If the old ip address is there, change it to the new address and rerun mailinabox

1 Like

I updated /etc/mailinabox.conf to change public and private ip address to the new ip address. Once I run the mailinabox setup script it changes the private ip address back to the old ip address. Mailinabox seems to update the ip when the setup script runs but in the config files it is keeping the old address and in the case of the conf its actually reverting back to the old address. I’m not sure where it is grabbing the old ip address to revert it.

It probably means your box is still reachable on the old ip. Which is why my first question was about the output of ip addr

I’m sorry, I missed your first question some how. You are absolutely right ip addr outputs the old ip address. New address is no where in the output.

You are using a VPS? Your provider should have a dashboard with some sort of controls with which to assign the ip address

How did you do this?

Yes, I changed it on vps dashboard. It shows the new ipv4 under networking but server still shows the old ip on the login banner. Changes are applying fully and dashboard/manual edits not working. I’m communicating with vps support now. Thank you so much for your help.

The ipv4 address for my box is now updated. Mail is working and I can log into the admin panel but the status page won’t load. I tried to run sudo mailinabox again and reboot but can’t get status page to work. Other admin pages all work (except for back up but that may be duplicity). Is there anything else I can try to get the status page working ?

Good, progress!
Look at the output of sudo journalctl -u mailinabox

1 Like

Here is the sudo journalctl -u mailinabox output:

[ERROR] Worker (pid:487859) was sent SIGKILL! Perhaps out of memory?
[INFO] Booting worker with pid: 804816
[487814] [INFO] Control socket listening at /root/.gunicorn/gunicorn.ctl
localhost:50301 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.16
localhost:50301 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.16
localhost:50301 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.16
localhost:50301 SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.16
systemd[1]: mailinabox.service: A process of this unit has been killed by the OOM killer.

From Syslog I pulled a bit more info about these pid’s:

oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/mailinabox.service,task=gunicorn,pid=487859,uid=0
Out of memory: Killed process 487859 (gunicorn) total-vm:95392kB, anon-rss:0kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:236kB oom_score_adj:0
[ERROR] Worker (pid:487859) was sent SIGKILL! Perhaps out of memory?

oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/mailinabox.service,task=gunicorn,pid=804816,uid=0
Out of memory: Killed process 804816 (gunicorn) total-vm:351180kB, anon-rss:7428kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:340kB oom_score_adj:0

[487814] [ERROR] Worker (pid:487859) was sent SIGKILL! Perhaps out of memory?
[487814] [INFO] Control socket listening at /root/.gunicorn/gunicorn.ctl

I checked memory:
Real memory is at 60% free
Virtual memory is at 34% free

Box Status Checks Change Notice:

Overnight I received a Status Checks Change Notice email for the box with errors that appear mostly connected to backup.
I saw the Duplicity post indicating - python3-gnupg - fixes the issue. I installed it and confirmed backups are working.
I just can’t view the admin panel page for Status Checks or see the backups under Backup Status.

Giving up after 5 attempts. AttributeError: ‘NoneType’ object has no attribute ‘objects’. (for trace back: set log level DEBUG)
BackendException: ‘NoneType’ object has no attribute ‘objects’
Traceback (most recent call last):
File “/root/mailinabox/management/status_checks.py”, line 1179, in
run_and_output_changes(env, pool)
File “/root/mailinabox/management/status_checks.py”, line 1020, in run_and_output_changes
run_checks(True, env, cur, pool)
File “/root/mailinabox/management/status_checks.py”, line 63, in run_checks
run_system_checks(rounded_values, env, output)
File “/root/mailinabox/management/status_checks.py”, line 160, in run_system_checks
check_backup(rounded_values, env, output)
File “/root/mailinabox/management/status_checks.py”, line 278, in check_backup
backup_stat = backup_status(env)
File “/root/mailinabox/management/backup.py”, line 72, in backup_status
raise Exception("Something is wrong with the backup: " + collection_status)
Exception: Something is wrong with the backup: Attempt of list Nr. 1 failed. ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden
WARNING 1
. Attempt of list Nr. 1 failed. ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden

Attempt of list Nr. 2 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’
WARNING 1
. Attempt of list Nr. 2 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’

Attempt of list Nr. 3 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’
WARNING 1
. Attempt of list Nr. 3 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’

Attempt of list Nr. 4 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’
WARNING 1
. Attempt of list Nr. 4 failed. AttributeError: ‘NoneType’ object has no attribute ‘objects’

ERROR 50 list
. Giving up after 5 attempts. AttributeError: ‘NoneType’ object has no attribute ‘objects’. (for trace back: set log level DEBUG)

Duplicity backup complete.
NOTICE 1
. Duplicity backup complete.

ERROR 50 BackendException
. BackendException: ‘NoneType’ object has no attribute ‘objects’

Turns out the box admin status and backup pages wouldn’t load due to the S3 policy for backups. My IAM S3 policy includes a source ip which I forgot to update when I changed the server’s ip address. Updated the policy, ran a back up successfully and can now access the box admin status and backup pages. Thank you so much for all the help you provided!