Help with fresh install on Ubuntu - multiple failures - MRTG Service won't start and more
Posted: Wed Oct 08, 2025 1:19 pm
Hey everyone, been using NagiosXI for years and it's time to migrate to a new box with a fresh install and I'm having some struggles. I really appreciate this forum and the countless threads (which I've so thoroughly searched) but I'm stumped at the moment. Here goes:
---
Linux Distro: Ubuntu 24.04.3 LTS
64 bit
Manual Install of XI via "wget https://assets.nagios.com/downloads/nagiosxi/install.sh"
No special configuration, no GUI, no proxy, but I am connected via SSH over a VPN
It is a VM hosted by Rackspace, our cloud hosting provider. Same as the previous NagiosXI installation
I'll attach the install.log file to this post but here's the short version, which I will give more detail on:
Attempted a fresh install of NagiosXI as the root user. It fails on multiple steps, and each time I resolve one of the failures, I encounter another further in. I have done a complete wipe/reset multiple times to try to do the install run without errors by proactively running the fixes I uncovered on the previous attempt. As a controlled test, I grabbed a spare mini-PC, installed the same version of Ubuntu and took the same steps, I encounter no errors and the installation completes perfectly. I keep referencing files on that known working machine but I cannot find any differences. My organization is enforcing the distro choice, cloud provider, and another team handles the firewall and imaging of cloud VM's, so I don't have as much visibility on that as I'd like to have.
---
Detailed steps below:
1. I log in as my user, but use 'sudo -i' to run things as root, so all commands ahead are as root user
2. I run 'apt update && upgrade' SUCCESS
3. I run 'apt install apache2 php mysql-server php-mysql libapache2-mod-php php-gd php-ldap php-pear php-xml php-soap php-intl php-json php-mbstring php-cli php-curl' SUCCESS
4. I run wget 'https://assets.nagios.com/downloads/nagiosxi/install.sh' SUCCESS
5. I run 'chmod +x install.sh' SUCCESS
6. I run './install.sh' which succeeds in downloading the Nagios package, but fullinstall fails, permission ERROR
7. I run 'mount -o remount,exec /tmp/', which then allows fullinstall to run. I run fullinstall...
Now from this point, NagiosXI begins installing various packages, dependencies, configurations. My first failure is usually part of Step 01 phpize error
->I resolve this error by using 'pecl uninstall ssh2' then 'pecl clear-cache' then 'pecl install ssh2'
I run fullinstall again and it proceeds past this error.
Next error is on Step 03, MySQL fails to start, journalctl shows it is in Frozen state.
"systemctl stop mysql"
"apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*"
"rm -rf /etc/mysql"
"rm -rf /var/lib/mysql"
"apt autoremove"
"apt autoclean"
That sequence clears up that error. I run fullinstall again and it proceeds past that error.
Next error is on Step 11. This error has changed a few times depending on the above steps. The first time, it was "can't locate mysql headers," which required me to download a missing package (from another thread here) 'apt install libmysqlclient-dev' which cleared that up. However on this most recent install attempt, I am not seeing this error.
Instead, still on Step 11, I have two errors now:
MRTG installation failed - exiting.
The MRTG service will not start, and doesn't give me any information as to why it won't start. Most of the threads I can find on this one are about troubleshooting MRTG after installation. I attempted a manual installation of MRTG which gets me past the installation failed message, but mrtg.service is still not running even though it installed (same if I remove/wipe it first then reinstall). Checking my working mini-PC box, the config files and folders are all present and all identical.
The 2nd error in this section is 'nagios-mod-gearman' installation failed, permission denied. I can't find much about this, but I'm worried that the previous errors are causing a daisy chain effect where I'm wasting my time troubleshooting this far in. As a hail mary attempt on the last reset of this vm, I even opened read/write/execute permissions on the entire /etc/ /tmp/ and /var/ directories. I'm no linux expert so I'm a little confused how I'm logged in as root with all directors completely 777 open and I'm still getting permission denied errors, when the exact same thing on my mini-pc works without any permission errors at all.
Does the fullinstall use the Nagios user to make certain configuration changes? If so, how do I ensure that the nagios user it creates has the correct permission levels on the system? Does the fullinstall script not apply those permissions to the required folders or is something stopping that from occuring?
---
I really appreciate any help here. There must be something about this image (out of my scope) different from a base Ubuntu install but that's my only guess left at this point, and I don't know what to do with that information anyway as my organization only allows this approved image.
Thanks
-Bret
Edit: I keep getting a generic HTTP error attaching the install.log, so I've put it on google drive
https://drive.google.com/file/d/19dOzNR ... sp=sharing
---
Linux Distro: Ubuntu 24.04.3 LTS
64 bit
Manual Install of XI via "wget https://assets.nagios.com/downloads/nagiosxi/install.sh"
No special configuration, no GUI, no proxy, but I am connected via SSH over a VPN
It is a VM hosted by Rackspace, our cloud hosting provider. Same as the previous NagiosXI installation
I'll attach the install.log file to this post but here's the short version, which I will give more detail on:
Attempted a fresh install of NagiosXI as the root user. It fails on multiple steps, and each time I resolve one of the failures, I encounter another further in. I have done a complete wipe/reset multiple times to try to do the install run without errors by proactively running the fixes I uncovered on the previous attempt. As a controlled test, I grabbed a spare mini-PC, installed the same version of Ubuntu and took the same steps, I encounter no errors and the installation completes perfectly. I keep referencing files on that known working machine but I cannot find any differences. My organization is enforcing the distro choice, cloud provider, and another team handles the firewall and imaging of cloud VM's, so I don't have as much visibility on that as I'd like to have.
---
Detailed steps below:
1. I log in as my user, but use 'sudo -i' to run things as root, so all commands ahead are as root user
2. I run 'apt update && upgrade' SUCCESS
3. I run 'apt install apache2 php mysql-server php-mysql libapache2-mod-php php-gd php-ldap php-pear php-xml php-soap php-intl php-json php-mbstring php-cli php-curl' SUCCESS
4. I run wget 'https://assets.nagios.com/downloads/nagiosxi/install.sh' SUCCESS
5. I run 'chmod +x install.sh' SUCCESS
6. I run './install.sh' which succeeds in downloading the Nagios package, but fullinstall fails, permission ERROR
7. I run 'mount -o remount,exec /tmp/', which then allows fullinstall to run. I run fullinstall...
Now from this point, NagiosXI begins installing various packages, dependencies, configurations. My first failure is usually part of Step 01 phpize error
->I resolve this error by using 'pecl uninstall ssh2' then 'pecl clear-cache' then 'pecl install ssh2'
I run fullinstall again and it proceeds past this error.
Next error is on Step 03, MySQL fails to start, journalctl shows it is in Frozen state.
"systemctl stop mysql"
"apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*"
"rm -rf /etc/mysql"
"rm -rf /var/lib/mysql"
"apt autoremove"
"apt autoclean"
That sequence clears up that error. I run fullinstall again and it proceeds past that error.
Next error is on Step 11. This error has changed a few times depending on the above steps. The first time, it was "can't locate mysql headers," which required me to download a missing package (from another thread here) 'apt install libmysqlclient-dev' which cleared that up. However on this most recent install attempt, I am not seeing this error.
Instead, still on Step 11, I have two errors now:
MRTG installation failed - exiting.
The MRTG service will not start, and doesn't give me any information as to why it won't start. Most of the threads I can find on this one are about troubleshooting MRTG after installation. I attempted a manual installation of MRTG which gets me past the installation failed message, but mrtg.service is still not running even though it installed (same if I remove/wipe it first then reinstall). Checking my working mini-PC box, the config files and folders are all present and all identical.
The 2nd error in this section is 'nagios-mod-gearman' installation failed, permission denied. I can't find much about this, but I'm worried that the previous errors are causing a daisy chain effect where I'm wasting my time troubleshooting this far in. As a hail mary attempt on the last reset of this vm, I even opened read/write/execute permissions on the entire /etc/ /tmp/ and /var/ directories. I'm no linux expert so I'm a little confused how I'm logged in as root with all directors completely 777 open and I'm still getting permission denied errors, when the exact same thing on my mini-pc works without any permission errors at all.
Does the fullinstall use the Nagios user to make certain configuration changes? If so, how do I ensure that the nagios user it creates has the correct permission levels on the system? Does the fullinstall script not apply those permissions to the required folders or is something stopping that from occuring?
---
I really appreciate any help here. There must be something about this image (out of my scope) different from a base Ubuntu install but that's my only guess left at this point, and I don't know what to do with that information anyway as my organization only allows this approved image.
Thanks
-Bret
Edit: I keep getting a generic HTTP error attaching the install.log, so I've put it on google drive
https://drive.google.com/file/d/19dOzNR ... sp=sharing