Trying to upgrade from 14.04 to 18.04. After getting everything setup finally, and restoring my backup, I tried rerunning # mailinabox
which ended with:
RTNETLINK answers: Network is unreachable
Primary Hostname: box.eladhen.com
Public IP Address: 165.227.150.231
Mail-in-a-Box Version: v0.41
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)...
FAILED: service nginx restart
-----------------------------------------
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
-----------------------------------------
Running:
systemctl status nginx.service
Got me:
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-03-30 23:40:06 IDT; 4min 7s ago
Docs: man:nginx(8)
Process: 7005 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Mar 30 23:40:04 box.mybox.com systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 30 23:40:06 box.mybox.com nginx[7005]: nginx: [emerg] BIO_new_file("/home/user-data/ssl/box.mybox.com-20190628-a44560
Mar 30 23:40:06 box.mybox.com nginx[7005]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 30 23:40:06 box.mybox.com systemd[1]: nginx.service: Control process exited, code=exited status=1
Mar 30 23:40:06 box.mybox.com systemd[1]: nginx.service: Failed with result 'exit-code'.
Mar 30 23:40:06 box.mybox.com systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Gotcha! When you try again and if you have the same problem come to the Slack room … something like the problem you had is hard for me to diagnose, but easy to solve - if that makes sense …
Yes, I get the same error. I did a fresh install on 18.04 when I restore my backups I get this error and then I cant connect to the web control pannel or anything.
If you have time now, and are willing to go to the Slack channel we can trouble shoot. Slack is a bit easier than PM – if you don’t want to use Slack we can PM.
So maybe removing this file is the key step? I have a feeling I may have read this somewhere before on the forum when I first tried to upgrade early March and it went straight over my head.
Yes, the solution I would have proposed would have been to remove the contents of the /home/user-data/ssl directory and then run
sudo /home/user/mailinabox/setup/ssl.sh
replace “/home/user” with the location of your mailinabox install directory. (Either /home/user or /root - dependent upon which user you used.)
and finally
sudo mailinabox
This will be the solution for anyone who does not still have their Ubuntu 14.04 box running (only have the encrypted backups) – in the case of a VPS provider who required the original VPS to be destroyed to retain the IP address.
after Running sudo mailinabox in the end I got: ln: failed to create symbolic link '/home/user-data/ssl/ssl_certificate.pem': File exists
the web interface says: that I’m self signed.
Trying to provision let’s encrypt gets me this:
Log:
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None You should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.
that is created when installing a fresh box was not overwritten by the current one from the backup; duplicity gives an error to that effect.
If you subsequently run ‘sudo mailinabox’ it bails out with an error when trying to start nginx.
What I did to solve this (building on the info in this thread) is delete the symbolic link and create a new one pointing to the latest available .pem file for your box. This file is found in /home/user-data/ssl, in my case