Upgrade to 0.28 is failing/has failed

I’m currently trying to upgrade MiaB using the standard upgrade process. This is what’s happened so far:

Mail-in-a-Box Version:  v0.28

Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Nextcloud is already latest version
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...

But it’s now been like that for nearly 3 hours. I’m too scared to abort it for fear of being stuck with a completely unusable machine. running ps aux shows the installed is still running but is currently using 0% CPU and doing something like tail -f mail.log shows that the server is still receiving mail

root@box:/var/log# ps aux | grep setup
root      6717  0.0  0.0  12836  1012 pts/5    S+   18:28   0:00 grep --color=auto setup
root     31967  0.0  0.0  11396  1824 pts/4    S+   18:01   0:00 /bin/bash setup/start.sh

Any suggestions on if I can recover this our how messed up it will be if I abort the install?

Thanks

Steve

If it’s still stuck at installing something, quit the setup, run apt install -f and re-run setup and try again. :slight_smile:

Thanks for the reply. Obviously only been two minutes since you posted but

root@box:~# apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

And I’ve run the installer and it’s stopped in the same place. Obviously not for three hours yet, just a couple of minutes but I assume the same thing has happened…

Steve

Heyo. :slight_smile:

What cloud provider are you on? On Digital Ocean where I’m hosting my box I can choose to create a new server based on an earlier backup. If you can duplicate your server environment based on a backup it’s easier for you to troubleshoot it.

Troubleshoot guide

Disclaimer: You should do this on a copy of your main box.

You should have a mailinabox folder on your box. Mine is on ~/mailinabox.

  1. Open file mailinabox/setup/munin.sh. Github link to file so you can see what it looks like.
  2. Inside you’ll see that the file does an echo call saying that it will install Munin. Then it does a bunch of work so it’s unclear exactly where the program hangs.
  3. What you can do is to add extra lines of echo commands inside munin.sh.
  4. Then you run sudo setup/munin.sh and see where the process hangs.

Again, even though you’re just adding extra logging I strongly advice to do this on a copy of your main box. Some of the reason for me saying this, is that future updates will perform git pull to get updates from mailinabox and git will be confused when it sees uncommited local edits, not a crisis but it will probably block the update until you fix it.

Hopefully you’ll be able to get closer to where the Munin installation hangs. :+1:

Oh, I just saw that someone seem to have fixed a similar issue by rebooting the box before rerunning the setup MIAB installation stops at "Installing Munin (system monitoring)...". You could try that before following my guide @stetho.

1 Like

Hi,

I must have restarted about 20 times while trying to fix the problem. I just created a new machine and copied the backup files over and built a new machine. This worked and I’ve since deleted the old machine so I can’t try this out on the other machine. Thanks for responding though.

Steve

I’m having the same issue. Hangs at Munin install on update.

Yep, that worked. Rebooted my DO and it installed a bunch of updates. Then Munin update/install worked. Whew!

Yep - worked for me too. Reboot the server and all is well! Thanks nilsnh!

Is this being considered to be fixed in a future update, since this is appears to be a consistent error.

Having to reboot doesn’t seem to be a very clean solution.