Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Nagios setup failing connect via web Error 403

  1. #1
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Nagios setup failing connect via web Error 403

    I have a clean OS install of Leap 15 with KDE desktop with the addition of apache2 and php.

    After first boot, I install 4 updates. After that, I get prompted to install another 297 updates followed by reboot.

    After all that is done, I configure the box name and IP address. Followed by a reboot for no reason other than I feel better about it.

    At which point, I log in to GUI via KDE as root, open YaST2, and goto Software Management where I search for Nagios, and install all that is returned. At which point a bunch of extra stuff is added as well such as additional php stuff.

    Once install of nagios is complete, I set the the apache2 and nagios service to On Boot in Yast2 Service Manager.

    Run the following command;
    htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin

    Then reboot.


    And that is as far as I get to feeling like I am making progress.

    Upon reboot. I can connect to http://localhost/manual which shows all the apache2 documents. This allows me to believe (probably falsely) that apache is working correctly.
    When I try connecting to http://localhost/nagios, I am prompted with a authentication box where I give it the nagios admin creds I added to the nagios htpasswd file above, and upon hitting enter I get the following...

    Access Forbidden
    You dont have permission to access the requested directory. There is no Index document or the Directory is read only.

    Error 403
    Localhost
    Apache


    I have looked thru out all the config files I could find. Looked at and try changing the destination directories permissions. And looked at group membership.

    What am I missing?

    Thanks,
    John

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,000
    Blog Entries
    15

    Default Re: Nagios setup failing connect via web Error 403

    Hi
    Read the docs Generally you will find a SUSE Readme file....

    https://build.opensuse.org/package/v....SuSE?expand=1
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Read the docs Generally you will find a SUSE Readme file....

    https://build.opensuse.org/package/v....SuSE?expand=1
    Yeah, that was about not helpful. That is the first time I have seen that page any any searches via google or suse pages. Please dont treat me like a noob. I have spent some time RTFM and looking over the MAN files along with what few addition threads are on the topic related to SuSE and Nagios. And lets not get started on the documentation found in the config files them self.

    And many of the other threads are from installation from source. With running suse, and being able to install from Yast Software Manager, I shouldnt have to do that. Just search, add, install. It should work.


    The big bonus from it was this..
    chmod 640 SYSCONFDIR/htpasswd.users
    chown --no-dereference root:www SYSCONFDIR/htpasswd.users

    Apparently a quickstart.html file is suppose to have all the answers and after doing a locate, was no where to be found. As such, I go back to this thread to say I could use some assistance.

    John

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,000
    Blog Entries
    15

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by Johnfm3 View Post
    Yeah, that was about not helpful. That is the first time I have seen that page any any searches via google or suse pages. Please dont treat me like a noob. I have spent some time RTFM and looking over the MAN files along with what few addition threads are on the topic related to SuSE and Nagios. And lets not get started on the documentation found in the config files them self.

    And many of the other threads are from installation from source. With running suse, and being able to install from Yast Software Manager, I shouldnt have to do that. Just search, add, install. It should work.


    The big bonus from it was this..
    chmod 640 SYSCONFDIR/htpasswd.users
    chown --no-dereference root:www SYSCONFDIR/htpasswd.users

    Apparently a quickstart.html file is suppose to have all the answers and after doing a locate, was no where to be found. As such, I go back to this thread to say I could use some assistance.

    John
    Hi
    Don't shoot the messenger, just pointing it out... I'll leave you to it...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Don't shoot the messenger, just pointing it out... I'll leave you to it...
    Oh come on. You thought you could be smart by saying read the doc's and that was going to be helpful. Telling me to read the doc's is no more help to me than what i started with. Did you even read the link, or just search, copy, and paste?

    To anyone (Including Malcomlewis here) interested in assisting me in sorting out whats going on. Please, feel free to ask me for any logs or command outputs. I am more than willing to provide. Sadly, my short comings is with apache and sql. 2 items I know could be blocking this from working. As I recall my SLES 9 and 10 setup, MYSQL was needed as the backend of Nagios in the pre core days.

    Assuming this is a installation issue, how do I go about collecting the proper information to submit a bug on this? Since this is installable from Software Manager, it should be safe to assume that after installed, a user on the localhost should be able to connect to http://localhost/nagios. There was no instructions to add user to htpasswd file, google help me find that.


    Short info on me.
    I am an almost 20 yr IT career professional working in windows bases cloud platform. And been using suse in my home since the early 2000's with SuSE 6.4. I may not be a expert at linux, but I am not a noob. Just dont use linux enough day to day to have this information memorized. And suse with its gui based tools such as YaST makes any one look like a linux pro... :-)

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    25,000
    Blog Entries
    15

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by Johnfm3 View Post
    Oh come on. You thought you could be smart by saying read the doc's and that was going to be helpful. Telling me to read the doc's is no more help to me than what i started with. Did you even read the link, or just search, copy, and paste?
    Hi
    Not at all, seems a pertinent clue and from my openSUSE/SUSE experience there is generally a SUSE readme down in /usr/share/doc/packages directory.

    Looking at the spec file, the nagios systemd service should have applied those changes in the readme, I'm assuming the service is up and running without error?

    Code:
    systemctl status nagios
    Short of an install of Leap 15 (which am happy to do) and install the nagios package, can you confirm if it's the default Leap version or did you grab the later version from the server:monitoring repo?

    Anything of interest in the logs /var/log/nagios directory?

    I don't really do the experience thing, but have had a number of years experience with Solaris and Linux running nagios
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Not at all, seems a pertinent clue and from my openSUSE/SUSE experience there is generally a SUSE readme down in /usr/share/doc/packages directory.

    Looking at the spec file, the nagios systemd service should have applied those changes in the readme, I'm assuming the service is up and running without error?

    Code:
    systemctl status nagios
    Short of an install of Leap 15 (which am happy to do) and install the nagios package, can you confirm if it's the default Leap version or did you grab the later version from the server:monitoring repo?

    Anything of interest in the logs /var/log/nagios directory?

    I don't really do the experience thing, but have had a number of years experience with Solaris and Linux running nagios
    So I grabbed the full ISO (roughly just under 4GB). The image was only downloaded a few weeks ago.
    If I am not mistaken, its Build 267.2 as found in the media file found in the media.1 folder.

    I have installed this on a fullvirt VM on a XEN server on a Dell R710 2U server with.


    systemctl status nagios reports the following...
    ● nagios.service - Network Monitor Nagios
    Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
    Active: active (running) since Mon 2018-12-03 18:07:03 PST; 2h 39min ago
    Process: 1492 ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg (code=exited, status=0/SUCCESS)
    Process: 1388 ExecStartPre=/usr/lib/nagios/nagios-exec-start-pre (code=exited, status=0/SUCCESS)
    Main PID: 1499 (nagios)
    Tasks: 6 (limit: 4915)
    CGroup: /system.slice/nagios.service
    ├─1499 /usr/sbin/nagios /etc/nagios/nagios.cfg
    ├─1501 /usr/sbin/nagios --worker /var/lib/nagios/nagios.qh
    ├─1502 /usr/sbin/nagios --worker /var/lib/nagios/nagios.qh
    ├─1503 /usr/sbin/nagios --worker /var/lib/nagios/nagios.qh
    ├─1504 /usr/sbin/nagios --worker /var/lib/nagios/nagios.qh
    └─1507 /usr/sbin/nagios /etc/nagios/nagios.cfg

    Dec 03 18:07:03 nagios nagios[1499]: nerd: Fully initialized and ready to rock!
    Dec 03 18:07:03 nagios nagios[1499]: wproc: Successfully registered manager as @wproc with query handler
    Dec 03 18:07:03 nagios nagios[1499]: wproc: Registry request: name=Core Worker 1504;pid=1504
    Dec 03 18:07:03 nagios nagios[1499]: wproc: Registry request: name=Core Worker 1503;pid=1503
    Dec 03 18:07:03 nagios nagios[1499]: wproc: Registry request: name=Core Worker 1502;pid=1502
    Dec 03 18:07:03 nagios nagios[1499]: wproc: Registry request: name=Core Worker 1501;pid=1501
    Dec 03 18:07:03 nagios nagios[1499]: Successfully launched command file worker with pid 1507
    Dec 03 18:07:03 nagios nagios[1499]: Successfully launched command file worker with pid 1507
    Dec 03 19:07:03 nagios nagios[1499]: Auto-save of retention data completed successfully.
    Dec 03 20:07:03 nagios nagios[1499]: Auto-save of retention data completed successfully.



    The last couple of log entries show the following clean starts...

    [1543889223] Nagios 4.3.4 starting... (PID=1499)
    [1543889223] Local time is Mon Dec 03 18:07:03 PST 2018
    [1543889223] LOG VERSION: 2.0
    [1543889223] qh: Socket '/var/lib/nagios/nagios.qh' successfully initialized
    [1543889223] qh: core query handler registered
    [1543889223] nerd: Channel hostchecks registered successfully
    [1543889223] nerd: Channel servicechecks registered successfully
    [1543889223] nerd: Channel opathchecks registered successfully
    [1543889223] nerd: Fully initialized and ready to rock!
    [1543889223] wproc: Successfully registered manager as @wproc with query handler
    [1543889223] wproc: Registry request: name=Core Worker 1504;pid=1504
    [1543889223] wproc: Registry request: name=Core Worker 1503;pid=1503
    [1543889223] wproc: Registry request: name=Core Worker 1502;pid=1502
    [1543889223] wproc: Registry request: name=Core Worker 1501;pid=1501
    [1543889223] Successfully launched command file worker with pid 1507
    [1543892823] Auto-save of retention data completed successfully.
    [1543896423] Auto-save of retention data completed successfully.


    there were log entries of missing plug in such as check_ping, check_http, and check_ssh. As those will be things I need to resolve. I had installed the 4 monitoring plugin packages. But this would be something which I will need to research but shouldnt block the service or the connecting to the web portal.

    According to the NAGIOS.SUSE file...
    A quickstart installation guide can now be found in the
    package nagios-www. You can find the quickstart guide
    (quickstart.html) in the following subdirectory:

    /usr/share/nagios/docs/


    When I look in that folder I dont see the quickstart.html file.

    To minimize the files to only those starting with "Q"

    nagios:~ # ls /usr/share/nagios/docs/q*
    /usr/share/nagios/docs/qh.html



    I would apprechiate if you could test a install. This is for my home setup and am in no rush. My son is going to college for IT and in a linux class now with a advanced linux class next quarter. And I am just trying to put together my old college lab environment back online for him. Like I said, no rush.

  8. #8
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Re: Nagios setup failing connect via web Error 403

    and when I use locate command...

    nagios:~ # locate -i quickstart.html
    nagios:~ #

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    23,786

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by Johnfm3 View Post

    At which point, I log in to GUI via KDE as root,
    Something that should never be done!

    Read also: https://en.opensuse.org/SDB%3ALogin_as_root
    Henk van Velden

  10. #10
    Join Date
    Jul 2008
    Location
    Some place in Washington
    Posts
    258

    Default Re: Nagios setup failing connect via web Error 403

    Quote Originally Posted by hcvv View Post
    Something that should never be done!

    Read also: https://en.opensuse.org/SDB%3ALogin_as_root
    As much as I know your right and I agree with the stance in a corporate environment, this is my home setup. And I have no problems using the root account. Frankly, the system has no other accounts as I plan on getting LDAP setup again where I will store all user account information.

    In my next thread I start, I will dig into what it takes to setup LDAP. SLES 9 and 10 were cake and i had it setup with no real effort. But with SLES 11 and beyond I never could get it setup. And Open SuSE has almost no automation expecting you to know everything.

    malcolmlewis, I am at the office today and wont be home for 12hrs from the time of this post which means responses will be slow. I may create a VM at work for testing on time permitting.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •