Page 2 of 3

Re: Manage Users page SQL error

Posted: Fri Dec 09, 2016 3:02 pm
by ssax
Sounds good, thank you, we will keep an eye out.

Re: Manage Users page SQL error

Posted: Mon Dec 12, 2016 4:36 pm
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...

Re: Manage Users page SQL error

Posted: Mon Dec 12, 2016 5:02 pm
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

Re: Manage Users page SQL error

Posted: Tue Dec 13, 2016 8:37 am
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

Re: Manage Users page SQL error

Posted: Tue Dec 13, 2016 2:47 pm
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

Re: Manage Users page SQL error

Posted: Tue Dec 13, 2016 3:02 pm
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?

Re: Manage Users page SQL error

Posted: Tue Dec 13, 2016 3:29 pm
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.

Re: Manage Users page SQL error

Posted: Tue Dec 13, 2016 4:25 pm
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

Re: Manage Users page SQL error

Posted: Wed Dec 14, 2016 8:02 am
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

Re: Manage Users page SQL error

Posted: Wed Dec 14, 2016 11:19 am
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?