Nagios is not able to be logged in from GUI
-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Nagios is not able to be logged in from GUI
Hi,
We are currently having trouble login to Nagios from GUI. We used the username and password, which were correct for sure, and clicked the login button. Then, the page was refreshed but sent us back to the login page again. It seems clicking on the login button just refresh the page without actually login.
Thanks in advace
We are currently having trouble login to Nagios from GUI. We used the username and password, which were correct for sure, and clicked the login button. Then, the page was refreshed but sent us back to the login page again. It seems clicking on the login button just refresh the page without actually login.
Thanks in advace
Re: Nagios is not able to be logged in from GUI
Former Nagios Employee.
me.
me.
-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Re: Nagios is not able to be logged in from GUI
Yes, I can log into core.
Re: Nagios is not able to be logged in from GUI
What are the contents of /etc/httpd/conf.d/nagiosxi.conf?
Former Nagios Employee.
me.
me.
-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Re: Nagios is not able to be logged in from GUI
<Directory "/usr/local/nagiosxi/html">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios XI"
# AuthType Basic
# AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
# Require valid-user
</Directory>
Alias /nagiosxi "/usr/local/nagiosxi/html"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios is not able to be logged in from GUI
You can reset the nagiosadmin password with the following script
Code: Select all
/usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php --password=<newpassword>-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Re: Nagios is not able to be logged in from GUI
Hi, I reset the password, but the same issue still exists. It does not seem like the password authorization problem, because it does not prompt the username or password is wrong, just refreshes the login page.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios is not able to be logged in from GUI
Did you modify any of the httpd configuration files?
Any mysql errors?
Finally, you do have cookies and sessions enabled in your browser correct?
Any mysql errors?
Code: Select all
tail -f /var/log/mysqld.log-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Re: Nagios is not able to be logged in from GUI
I did not modify any of the httpd configuration files. In mysqld.log, i saw some errors as below,
Also, I found I was not able to run /usr/local/nagiosxi/scripts/reconfigure_nagios.sh. I gave me this error.
Thanks
Code: Select all
160322 11:23:00 [ERROR] /usr/libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13)
160322 11:23:00 [ERROR] Can't start server: can't create PID file: Permission denied
Code: Select all
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mcrypt.so' - /usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2016-03-22 15:37:13-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”
[ <=> ] 9,860 --.-K/s in 0.02s
2016-03-22 15:37:14 (538 KB/s) - “nagiosql.export.monitoring” saved [9860]
NAGIOSQL WRITE CONFIGS FAILED!\n
-
amit.ahuja
- Posts: 113
- Joined: Fri May 15, 2015 8:20 am
Re: Nagios is not able to be logged in from GUI
The only thing I did before this happens was that I changed the user of the directories in /var to nagios, then accessing web interface showed we needed to repair db. Then I changed the user back to root, then we were still not able to login.