[SOLVED] Ubuntu 22.04 LTS - Setup ends with HTTP 500 Error

Performed a backup of my previous MIAB server and have rebuilt the server as Ubuntu 22.04 (previously on 18.04). Fresh install, and upon running the MIAB setup script, it gets to the very end where it asks for an administrative password for the control panel, and then it spits out an HTTP 500 error.

Okay. I'm about to set up <AdminEmailAccount> for you. This account will also
have access to the box's control panel.
password:
Passwords must be at least eight characters.
password:
 (again):
<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

It then kicks me back to the command prompt and never displays the text that setup has completed.

I thought this may have been due to the password I had containing symbols and maybe the script wasn’t parsing it correctly, but when I rebuilt the server again with another fresh install and tried abcd1234 as the password, it gave the same 500 error, ruling out symbols being an issue.

I saw one post about this from 2017 which seemed to indicate it was a problem with Apache being installed. But upon running dpkg-query -l | grep apache, Apache doesn’t seem to be there.

If I visit the administration page and try to log in with the password I entered, it does work (even though I visit the admin login page and it proudly says “There are no administrative users on this system!”), but I’m hesitant to continue using this if something didn’t fully complete, and am tempted to roll back my 18.04 snapshot until this is fixed.

EDIT - SOLVED

Fixed, with the help of @ewsg576 's posts.

I kept going with my setup and restored from backup, and everything looked like it was working, until I realized that DKIM wasn’t working; my messages weren’t being signed. I didn’t remember seeing anything about DKIM records needing to be updated in DNS in the upgrade documentation, but just to verify they were correct, I went to the External DNS page to see what they were supposed to be. But, things got worse, as I couldn’t open the External DNS page either. No records displayed, and an error message appeared essentially just saying “didn’t work, sorry bruh”.

I checked the forums again, and that’s when I discovered this thread about the External DNS page not working. Sure enough, as I went through the posts I found this:

I am using SSH on port 22. The only “block” I made is regarding IPv6 (I am allowing only connections through IPv4).

Bingo. This is exactly what I do as well, as this is a common server hardening step to disable SSH access over protocols that you don’t need to access SSH on. I’d done exactly this, setting the AddressFamily directive to inet in /etc/ssh/sshd_config. Turns out, this breaks everything, as confirmed again in this post by @sundown .

I rebuilt the server again, this time just omitting the step of disabling IPv6 access over SSH, and everything worked perfectly. My results were identical to @ewsg576 's happy success post here.

TL;DR: Even though disabling SSH over IPv6 is a common hardening step, to NOT do that for a MiaB server. It’s safe on Ubuntu 18.04 LTS when installing MiaB v56, but it will break things when installing MiaB v61.1 on Ubuntu 22.04 LTS.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.