[Solved] Can't connect to the web page

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't connect to the web page

Post by slansing »

Let us know how the re-installation goes :).
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

Hmmm... Not so good. I made it to the following step:

Code: Select all

Create a Default User for Web Access.
Add a default user for Web Interface Access:
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
and this error popped up:

Code: Select all

[root@FreeNag jobee]# htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Usage:
        htpasswd [-cmdpsD] passwordfile username
        htpasswd -b[cmdpsD] passwordfile username password

        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -m  Force MD5 encryption of the password.
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
 -D  Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.
Do you think there's an inherent problem with my CentOS install? Should I Nuke & Repopulate?

Thanks,

Joe B
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Can't connect to the web page

Post by sreinhardt »

Do you already have this file from the past installation? /usr/local/nagios/etc/htpasswd.users If so you should remove it then run the command to create it again.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

That file isn't there:

Code: Select all

[root@FreeNag etc]# ls -l
total 64
-rw-rw-r-- 1 nagios nagios 12015 May  8 08:52 cgi.cfg
-rw-rw-r-- 1 nagios nagios 44475 May  8 08:52 nagios.cfg
drwxrwxr-x 2 nagios nagios  4096 May  8 08:52 objects
-rw-rw---- 1 nagios nagios  1312 May  8 08:52 resource.cfg
[root@FreeNag etc]#
Thanks,

Joe B
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't connect to the web page

Post by lmiltchev »

Normally you see the usage of a command, when there is a syntax error... however your command looks just fine. I wonder if there is something goofy with any of the characters... Did you copy/paste the command or you typed it? Try typing it, and see if you are going to get the same output.

Also, run the following commands and show us the output:

Code: Select all

sestatus
grep htpasswd /etc/httpd/conf.d/nagios.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

Thanks lmiltchev, that was the problem. I just typed the command and it worked. I recently posted an off-topic question in one of my posts about Notepad not correctly displaying files while Wordpad can. Sreinhardt said it had to do with line endings. I'm guessing it was the same issue here. Anyway, I'm on to the next step in the process.

Thanks,

Joe B
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

Nope. I made it down to the last step but my Nagios server isn't responding. I did an NMAP scan and the only port that's open is 22. I've restarted the Nagios service and it restarts no problem. I've restarted the httpd service and it restarts no problem. When I run ps I see that httpd is running. I'm heading home now but I think I'll do my Nuke & Repopulate tomorrow if I have time. Next week if that works better for me.

Thanks,

Joe B
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't connect to the web page

Post by tmcdonald »

Let us know how that works out. We'll keep this open for a bit.
Former Nagios employee
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: Can't connect to the web page

Post by jbruyet »

I'm working with CentOS 64-bit. Does that have any impact on a Nagios install?

Thanks,

Joe B
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Can't connect to the web page

Post by tmcdonald »

The only thing the architecture will have an impact on is if you try to use 64-bit binaries on a 32-bit system. Other than that Nagios runs just fine on either.
Former Nagios employee
Locked