I only noticed that the server was unreachable this morning.
To recover the server I need to ssh in using the ip, and run sudo mailinabox, then it is fixed for another month.
Has anyone else run into this? I’m on the latest (v0.54) and couldn’t put a finger on when exactly this started happening, possibly when I changed the ip address of the server. As the issue crops up even after reinstalling/upgrading, I’m unsure where to look to fix this, custom DNS records?
possibly when I changed the ip address of the server
How did you do this?
The ip address is used in a number of configuration files. If you still know the old ip address you can perform the following search to see if that might be an issue:
So what I did was capture a snapshot of the server on DigitalOcean, deploy it on a new machine with new ip, rerun the MIAB configuration - in the dashboard then everything looked correct and it had picked up the new ip address.
So I assumed (apparently wrongly) that if you do this it would also update the DNS records, which, it oddly did do in the admin dashboard, but searching for the old address as you suggest I can see it’s hanging around in all the nsd/zones/ files.
I guess my question now is, is it safe to manually update these files with the new IP? Equally, how is it that the server seems to currently function correctly whilst these are incorrect…?
I think what you need to do is edit the file /etc/mailinabox.conf In there you’ll have to replace your old ipv4 and ipv6 addresses with the new ones. Then run the mailinabox setup once more. Alternatively, you could remove the PUBLIC and PRIVATE ip address lines (4 lines total). The setup will then figure out the ip addresses itself.
I am not entirely sure of the above, have never done this before, so it is untested. It would sure be nice if someone else could confirm this way ahead.
I have no idea, but not all configuration parts are depending on correct setting of the ip address.
I have the exact same issue, every couple of months this happens. I actually got the same IP when we migrated to 18.04, (by doing a digital ocean restore) so something else must be causing this. I have to ssh in with the IP and run the setup again to fix. happens every few months.
So the file in /etc/mailinabox.conf was the new ip address already.
I went ahead and manually changed the addresses in the nsd zones, so we may have to wait a month to see if that fixes it.
I’ve done in place upgrades using DO using the same method to keep the same IP and haven’t had this issue on other MIAB instances though.
If this is not fixed I may consider doing a fresh install and restoring from backup - I currently have all the user data on a DO Volume, @randy2134 are you using volumes too?
Did you change only the files in the zones folder, or also the file nsd.conf?
Mail-in-a-Box checks daily if the files in the zones folder should be regenerated, so you might not need to wait a month.
Only in the zones folder yeah, nsd.conf was correct, as it’s updated by MIAB from setup - this change just didn’t seem to get replicated in the zones files themselves.
Okay so I’ve noticed that the overnight backups to s3 are not being performed despite re-adding the keys and I haven’t been getting the update email since changing ip, tried to run the daily tasks manually and this worked…
So the daily tasks script doesn’t seem to be run.
aaron@box:~$ run-parts /etc/cron.d
/etc/cron.d/mailinabox-nextcloud: line 3: */5: No such file or directory
run-parts: /etc/cron.d/mailinabox-nextcloud exited with return code 127