Library

Docs
Beta

Products

404 errors after upgrade from 2024R1.1.2 to 2024R1.1.3Active Directory / LDAP Troubleshooting Authentication IntegrationBackups are not being generated due to tar creation errorsCCM says unapplied changes exist, but none listedCHECK_NRPE Error Could not connect to xxx.xxx.xxx.xxx Connection reset by peerDatabase Storage Engine and High CPU usage in Nagios XIDisabling Port 113 IDENT RequestsERROR Please add the ’Optional’ channel to your Red Hat systems subscriptionsError Invalid max_check_attempts value for hostHow To Clear Solaris Service Maintenance StatusNagios XI -ERROR unable to open include file conf.d/.cfgNagios XI 2014 Upgrade Issue CONFIG ERRORNagios XI Ajaxterm Installation AbortedNagios XI Apply Configuration Fails Backend login to the Core Configuration failedNagios XI Apply Configuration Never CompletesNagios XI Can’t Log Into The Web InterfaceNagios XI CentOS 6 Installation Problems XI 2011R1.7 2011R1.8Nagios XI Checking System StatusNagios XI Common Upgrade Failures And SolutionsNagios XI Configuration Applies, No Changes Take PlaceNagios XI Configuration Applies, but still get Configuration File Is Out Of Date ErrorNagios XI Configuration Verification FailedNagios XI Core 4 Load Spikes on 1.75 and 7 Hour IntervalsNagios XI Crashed Database TablesNagios XI Debugging Bandwidth Performance GraphsNagios XI Defining Global Environment VariablesNagios XI Disabling Database UTF8 ConnectivityNagios XI ERROR PostgresQL not running exitingNagios XI ERROR unable to open include file /etc/mrtg/conf.d/xxxxxxx.cfgNagios XI Empty Screen for Wizard, Component, DashletNagios XI Error while converting SVGNagios XI Event Data Is StaleNagios XI HTTP 500 Error / PHP Parse error Unexpected $endNagios XI HTTP 500 Error / White Screen After LoginNagios XI High Availability and Failover Solutions for Nagios XI NWC14Nagios XI Host Still Visible After Deletion (Ghost Hosts)Nagios XI Hosts Pending/GrayNagios XI ICMP and Ping Checks Stopped GraphingNagios XI Installing XI Fails To Install Dependency pymssqlNagios XI Issues with mod_gearman and Performance Data Newlines \nNagios XI LDAP / Active Directory Import Users Certificate IssuesNagios XI Last Check Time Not UpdatingNagios XI Login Screen Keeps Redirecting To ItselfNagios XI MK Livestatus Problems With Mod GearmanNagios XI MRTG Reports SNMP_Session ErrorsNagios XI MSSQL Query Wizard Invalid characters in the usernameNagios XI MSSQL Wizards Adaptive Server connection failedNagios XI Missing localhost AlertsNagios XI Notification ProblemsNagios XI Notifications Not Sending In XI 5.3.0Nagios XI Oracle Services Critical After Nagios XI UpgradeNagios XI Performance Graph ProblemsNagios XI Plain Text Password ConsiderationsNagios XI Problems Using Nagios XI With ProxiesNagios XI Problems With Scheduled Backups At MidnightNagios XI Problems with $ Signs in the Check CommandNagios XI Profile Build FailedNagios XI Receiving IPv6 SNMP TrapsNagios XI Reset Security CredentialsNagios XI Reset Upgrade Status In Web InterfaceNagios XI Resetting The nagiosadmin PasswordNagios XI Resizing the VM Disk SizeNagios XI Resolving Cannot connect to database Error Core Config ManagerNagios XI Running Out Of Disk Space On The Nagios XI VMNagios XI SNMP MIB Upload ProblemsNagios XI SNMPTT Service generates Cannot find module errorsNagios XI SQL Error [nagiosxi] -ERROR -syntax errorNagios XI Schedulded Backups No Longer WorkingNagios XI Scheduled Downtime Not WorkingNagios XI Scheduled Reports Not RunningNagios XI Some BPI Checks Show Unknown BPI Group Index After UpgradeNagios XI SourceGuardian Errors 2009R1.2CNagios XI Status Information Cut Off At 256 CharactersNagios XI Troubleshooting ReportsNagios XI Unable To Login Using Two Factor AuthenticationNagios XI Unable to Delete HostNagios XI Upgrade errors root.crontab.orig cannot overwrite existing fileNagios XI Uploaded plugin returns /bin/bash^M bad interpreter No such file or directoryNagios XI Warning Duplicate definition found for contact ’xi_default_contact’Nagios XI Windows Memory Usage PhysicalNagios XI mysql_error out of range value for columnPerformance Graphs Showing Data during Host Down Time PeriodsSlack Notifications Stopped WorkingUpgrade error with XI and non standard Broker ModulesUpgrading to NDO 3 after having been downgraded in newer versions of Nagios XIWeb Browser Reports 330 Error Content EncodingXI 5.4 monitoring engine not running/usr/local/nagiosxi/var/xi itype No such file or directory error

Nagios XI - Can’t Log Into The Web Interface

Problem Description

Sometimes a user can connect to the Nagios XI server via ssh (putty) session but he/she is not able to log in to the web UI.

Possible Causes

There could be various reasons for this problem. Here are some of the possible causes:

Wrong/Lost password for the nagiosadmin user

To reset the nagiosadmin's password, follow the steps in this article:

Nagios XI - Resetting The nagiosadmin Password

SELinux enabled (especially if it is running in enforcing mode)

In order to check if SELinux is disabled, first you need to install the tools:

**RHEL | CentOS | Oracle Linux
**

yum install -y policycoreutils

**Debian | Ubuntu
**

apt-get install -y policycoreutils

Now check if SELinux is disabled by running one of these commands:

sestatus

OR

getenforce

To disable SELinux, run:

setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

Running the above commands will turn off SELinux immediately AND make the change remain after a server reboot.

The apache service is not running

If apache is not running, you will see the following messages in the web UI: "Unable to connect" (in Firefox) or "This webpage is not available" (in Chrome).

To check if apache is started, run using one of the commands below:

**RHEL 7 | CentOS 7 | Oracle Linux 7
**

systemctl status httpd.service

**Debian | Ubuntu 16/18
**

systemctl status apache2.service

To start/restart the apache service, run:

**RHEL 7 | CentOS 7 | Oracle Linux 7
**

systemctl start httpd.service

or

systemctl restart httpd.service

**Debian | Ubuntu 16/18
**

systemctl start apache2.service

or

systemctl restart apache2.service

The firewall is blocking port 80

RHEL 7 | CentOS 7 | Oracle Linux 7

First check the status of the firewall:

systemctl status firewalld.service

IF the firewall is running, it should product output like:

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-11-20 10:05:15 AEDT; 1 weeks 0 days ago
     Docs: man:firewalld(1)
 Main PID: 647 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─647 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

IF the firewall is NOT running, it will produce this output:

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2018-11-27 14:11:34 AEDT; 965ms ago
     Docs: man:firewalld(1)
 Main PID: 647 (code=exited, status=0/SUCCESS)

If the firewall is NOT running, this means that inbound traffic is allowed.

To ENABLE the firewall on boot and to start it, execute the following commands:

systemctl enable firewalld.service
systemctl start firewalld.service

To list the firewall rules execute this command:

firewall-cmd --list-all

Which should produce output like:

public (active)
  target: default
  icmp-block-inversion: no
  interfaces: ens32
  sources: 
  services: dhcpv6-client ssh
  ports: 443/tcp 80/tcp 7878/tcp 162/udp 22/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 

Specifically, the ports line tells us that the firewall rule exists and in allowing inbound TCP traffic on port 80:

ports: 443/tcp 80/tcp 7878/tcp 162/udp 22/tcp

If this firewall rule DOES NOT exist, then it can be added by executing the following commands:

firewall-cmd --zone=public --add-port=80/tcp
firewall-cmd --zone=public --add-port=80/tcp --permanent

Debian

Debian has the iptables firewall installed but not enabled by default. The firewall rules are maintained by the netfilter-persistent service, this is not installed by default. You can determine if it is installed with the following command:

systemctl status netfilter-persistent.service

If you receive this output then there is no firewall service active on your Debian machine:

Unit netfilter-persistent.service could not be found.

This means all inbound traffic is allowed.

If you receive this output then the firewall service is active on your Debian machine:

● netfilter-persistent.service - netfilter persistent configuration
   Loaded: loaded (/lib/systemd/system/netfilter-persistent.service; enabled)
   Active: active (exited) since Tue 2018-11-27 14:24:11 AEDT; 1min 26s ago
 Main PID: 17749 (code=exited, status=0/SUCCESS)

If the netfilter-persistent service is enabled you can now check the status of the firewall:

iptables --list

An open firewall config would produce output like:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination       

You can see no rules exist.

If a rule did exist allowing inbound TCP traffic on port 80 then it would look like this:

target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http

If this firewall rule DOES NOT exist, then it can be added by executing the following command:

iptables -I INPUT -p tcp --destination-port 80 -j ACCEPT

Ubuntu

Ubuntu uses the Uncomplicated Firewall (ufw) to manage firewall rules however it is not enabled on a default install. You can check if it is enabled with the following command:

ufw status

IF the firewall is NOT running, it will produce this output:

Status: inactive

IF the firewall is running, it should product output like:

Status: active

If the firewall is NOT running, this means that inbound traffic is allowed.

To ENABLE the firewall on boot and to start it, execute the following command:

ufw enable

Be careful executing this command, you will not be able to access the server when it next reboots as the default configuration is to deny all incoming connections. You will need to add rules for all the different ports connect to this server.

To list the firewall rules execute this command:

ufw status verbose

Which should produce output like:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
80                    ALLOW IN    Anywhere                  
80 (v6)               ALLOW IN    Anywhere (v6)   

You can see from the output that firewall rules exists allowing inbound TCP traffic on port 80.

If this firewall rule DOES NOT exist, then it can be added by executing the following commands:

ufw allow http
ufw reload

The mysqld service is not running or there are crashed database tables

When you try to log in the web UI and there is a problem with the MySQL database, you will most probably see an errors message similar to this one:

Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.    

Please follow the steps in this KB article:

Nagios XI - Crashed Database Tables

The postgresql service is not running or the database is not accepting commands

If there is a problem with the posgresql, the message that you will see in the web UI would be similar to the one displayed for mysql errors. However, you will see an additional message, which would look something like this:

SQL: SQL Error [nagiosxi] : Database connection failed SQL: SQL Error [nagiosxi] : Database connection failed SQL: SQL Error [nagiosxi] : Database connection failed
Message: A database connection error has been detected, we are attempting to repair the server, if the repair does not resolve the issue, please contact Nagios support.

If you see this message, you will need to make sure that:

a) You are not running out of disk space

df -h
df -i

b) posgresql is running and you can actually log in the database manually

Try to start/restart posqgresql to see if it would start normally using one of the commands below:

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

sysctemctl start postgresql.service

or

sysctemctl restart postgresql.service

Note: sometimes, you will need to run vacuum on the postgres database. The following commands are different if you are using a version of PostgreSQL before v9. To determine which version you have execute the following command:

postgres -V

Based on that output, execute the commands specific to your version:

Versions BEFORE 9

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

echo "vacuum;vacuum analyze;"|psql nagiosxi postgres
sysctemctl restart postgresql.service

Versions 9 onwards

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
sysctemctl restart postgresql.service

To log in the postgres manually, run:

psql nagiosxi nagiosxi

To view the tables, run:

\d

and to exit:

\q

If you tried to run the vacuum on the posgres or you attempted to log in manually in the database, but you see the following error message:

psql: FATAL:  database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT:  Stop the postmaster and use a standalone backend to vacuum database "postgres".

You may notice either a high CPU usage for the postmaster process, or a repeated error message in the /var/lib/pgsql/data/pg_log file:

transaction ID wrap limit is 2147484146

You can try to fix the issue by running the following command in the command line:

Important: Run the commands one-by-one (don't run them with one go!)

Versions BEFORE PostgreSQL 9

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

sysctemctl stop postgresql.service
su postgres
echo "VACUUM;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
sysctemctl start postgresql.service

Note: The commands listed above may not work with some versions of PosgreSQL. If you see the following error:

postgres: invalid argument: "nagiosxi"

You will need to run the following commands instead:

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

sysctemctl stop postgresql.service
su postgres
echo "VACUUM;" > /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
sysctemctl start postgresql.service

Versions 9 Onwards

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

sysctemctl stop postgresql.service
su postgres
echo "VACUUM FULL;" > /tmp/fix.sql
postgres -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
sysctemctl start postgresql.service

Note: The commands listed above may not work with some versions of PosgreSQL. If you see the following error:

postgres: invalid argument: "nagiosxi"

You will need to run the following commands instead:

**RHEL 7 | CentOS 7 | Oracle Linux 7 | Debian | Ubuntu 16/18
**

sysctemctl stop postgresql.service
su postgres
echo "VACUUM FULL;" > /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data postgres < /tmp/fix.sql
postgres --single -D /var/lib/pgsql/data template1 < /tmp/fix.sql
exit
sysctemctl start postgresql.service

Other products installed that use Postgres may need their databases vacuumed

If you have another piece of software installed on your Nagios XI server that uses Postgres, such as Nagios Fusion, you may need to vacuum the databases of that software as well as those mentioned in previous steps. In the case of Fusion specifically, the following commands needed to be run as well as those in the previous steps:

postgres -D /var/lib/pgsql/data nagiosfusion < /tmp/fix.sql

or

postgres --single -D /var/lib/pgsql/data nagiosfusion < /tmp/fix.sql

as appropriate to the situation.

More information on PostgreSQL and VACUUM can be found here:

https://wiki.postgresql.org/wiki/VACUUM_FULL

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

Nagios Enterprises, LLC

© All rights reserved. 2026