Manage Users page SQL error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Manage Users page SQL error

Post by ssax »

Sounds good, thank you, we will keep an eye out.
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Manage Users page SQL error

Post by TBT »

Followed your recommendation, successfully ran on remote DB, but issues remains.
SQL Error [nagiosxi] : ERROR: column "login_attempts" does not exist
LINE 1: SELECT user_id FROM xi_users WHERE (login_attempts >= 3) AN...
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Manage Users page SQL error

Post by ssax »

What is the output from this command:
- Please change user/pass and xxx.xxx.xxx.xxx

Code: Select all

echo "desc xi_users;" | mysql -unagiosxi -pnagios -h xxx.xxx.xxx.xxx nagiosxi
Thank you
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Manage Users page SQL error

Post by TBT »

ssax wrote:What is the output from this command:
- Please change user/pass and xxx.xxx.xxx.xxx

Code: Select all

echo "desc xi_users;" | mysql -unagiosxi -pnagios -h xxx.xxx.xxx.xxx nagiosxi
Thank you
ERROR 1146 (42S02) at line 1: Table 'nagiosqldev.xi_users' doesn't exist
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Manage Users page SQL error

Post by tgriep »

Can you post the following files from your Nagios XI server so we can view the settings?

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
/etc/php.ini
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Manage Users page SQL error

Post by TBT »

tgriep wrote:Can you post the following files from your Nagios XI server so we can view the settings?

Code: Select all

/usr/local/nagiosxi/html/config.inc.php
/etc/php.ini
Thanks
Not keen on posting login credentials. Can you be more specific on what you're looking for an I will verify?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Manage Users page SQL error

Post by tgriep »

The output from this command from a previous post failed so I wanted to verify the settings for your MYSQL server.

Code: Select all

echo "desc xi_users;" | mysql -u nagiosxi -pnagios -h xxx.xxx.xxx.xxx nagiosxi
You can PM me the files or open a ticket by sending an email to [email protected] and we can continue there.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Manage Users page SQL error

Post by tgriep »

Thanks for the files, run this command from the XI server as root and post the output.

Code: Select all

echo "\d+ xi_users;" | psql nagiosxi nagiosxi
Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Manage Users page SQL error

Post by TBT »

Table "public.xi_users"
Column | Type | Modifiers | Storage | Description
----------------+------------------------+------------------------------------------------------------+----------+-------------
user_id | integer | not null default nextval('xi_users_user_id_seq'::regclass) | plain |
username | character varying(64) | not null | extended |
password | character varying(64) | not null | extended |
name | character varying(64) | | extended |
email | character varying(128) | not null | extended |
backend_ticket | character varying(128) | | extended |
enabled | smallint | not null default (1)::smallint | plain |
Indexes:
"xi_users_pkey" PRIMARY KEY, btree (user_id)
"xi_users_username_key" UNIQUE, btree (username)
Has OIDs: no
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Manage Users page SQL error

Post by tgriep »

If the system was recently upgraded, it looks like it did not finish because the new tables in the postgress database are missing causing the SQL error.
Depending on how the upgrade was run, the upgrade.log file could be in one of these 2 folders.

Code: Select all

/tmp/nagiosxi/upgrade.log
/usr/local/nagiosxi/tmp/upgrade.log
Can you post them?
What version of XI is this server running?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked