Unable to retrieve data from the local cache.

This support forum board is for questions relating to Nagios Fusion.
[email protected]
Posts: 5
Joined: Tue Apr 19, 2016 11:58 am

Unable to retrieve data from the local cache.

Post by [email protected] »

I recently installed a new nagios fusion server and attempted to add an existing nagios core server that is monitoring many other machines and services ..

Under the Configure->Fused Server Credentials It appears that all the entries are valid and the

I have been researching the message: Unable to retrieve data from the local cache. on google, and it appears that from most issues there was a problem with the host config - in my case this does not appears to be the case but I still don't see any data in the local cache for 2-3 hours since it has started up

I see that it attempts to get data from the cache - but it always returns with this Error Message:

Unable to retrieve data from the local cache.

I did some digging under:

/var/log/httpd/error_log on my local install and found and error message:

[error] [client 172.29.106.75] File does not exist: /opt/nagios/share/cgi-bin

/var/log/httpd/access_log on my local install and found and error message:

72.29.106.75 - nagiosadmin [19/Apr/2016:12:08:50 -0700] "GET // HTTP/1.1" 200 901 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
172.29.106.75 - - [19/Apr/2016:12:09:34 -0700] "GET / HTTP/1.1" 401 482 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
172.29.106.75 - nagiosadmin [19/Apr/2016:12:09:34 -0700] "GET // HTTP/1.1" 200 901 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
172.29.106.75 - - [19/Apr/2016:12:10:51 -0700] "GET / HTTP/1.1" 401 482 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"
172.29.106.75 - nagiosadmin [19/Apr/2016:12:10:51 -0700] "GET // HTTP/1.1" 200 901 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"

I also found out looking at the nagios fusion install

.../nagiosfusion/var/load_url.log


It has an error message that suggests a CURL error:

Code: Select all

CURL ERROR
 TIME: 2016-04-19T14:39:18-07:00
Array
(
    [url] => http://://
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)

URL:
 :///backend/?&username=&password=d41d8cd98f00b204e9800998ecf8427e&cmd=gethostgroupmembers&hostgroup_name= 
 OPTIONS: 
Array
(
    [timeout] => 15
    [return_info] => 1
    [method] => post
)



BACKTRACE:
Array
(
    [0] => Array
        (
            [file] => /usr/local/nagiosfusion/html/includes/utils-servers.inc.php
            [line] => 596
            [function] => load_url
            [args] => Array
[root@mcp-bld-lnx-236 var]# cat load_url.log 
CURL ERROR
 TIME: 2016-04-19T14:39:18-07:00
Array
(
    [url] => http://://
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0
    [namelookup_time] => 0
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
)

URL:
 :///backend/?&username=&password=d41d8cd98f00b204e9800998ecf8427e&cmd=gethostgroupmembers&hostgroup_name= 
 OPTIONS: 
Array
(
    [timeout] => 15
    [return_info] => 1
    [method] => post
)



BACKTRACE:
Array
(
    [0] => Array
        (
            [file] => /usr/local/nagiosfusion/html/includes/utils-servers.inc.php
            [line] => 596
            [function] => load_url
            [args] => Array
                (
                    [0] => :///backend/?&username=&password=d41d8cd98f00b204e9800998ecf8427e&cmd=gethostgroupmembers&hostgroup_name=
                    [1] => Array
                        (
                            [timeout] => 15
                            [return_info] => 1
                            [method] => post
                        )

                )

        )

    [1] => Array
        (
            [file] => /usr/local/nagiosfusion/html/includes/dashlets/hostgroup/hostgroup.inc.php
            [line] => 166
            [function] => get_server_data_from_url
            [args] => Array
                (
                    [0] => :///backend/?&username=&password=d41d8cd98f00b204e9800998ecf8427e&cmd=gethostgroupmembers&hostgroup_name=
                )

        )

    [2] => Array
        (
            [file] => /usr/local/nagiosfusion/html/ajaxhelper.php
            [line] => 753
            [function] => fusioncore_ajax_get_hostgroup_html
            [args] => Array
                (
                    [0] => Array
                        (
                            [sid] => 
                            [hostgroup] => 
                            [nsp] => dba3b67c0e44a5da983f89b543034ccc
                            [iframe_width] => 300
                            [iframe_height] => 80
                            [mode] => inboard
                        )

                )

        )

    [3] => Array
        (
            [file] => /usr/local/nagiosfusion/html/ajaxhelper.php
            [line] => 69
            [function] => ah_get_fusioncore_ajaxdata
            [args] => Array
                (
                )

        )

    [4] => Array
        (
            [file] => /usr/local/nagiosfusion/html/ajaxhelper.php
            [line] => 25
            [function] => route_request
            [args] => Array
                (
                )

        )

)
END LOGENTRY

Yet all the authentication seems to checkout as valid ..

Any help you can offer would be greatly appreciated

Thanks

Dave W.
Last edited by tmcdonald on Wed Apr 27, 2016 9:54 am, edited 2 times in total.
Reason: Please use [code][/code] tags around long output
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to retrieve data from the local cache.

Post by ssax »

The 401 error means unauthorized, even though it says the credentials are valid, please type them in again, save it and try it again.

Thank you
[email protected]
Posts: 5
Joined: Tue Apr 19, 2016 11:58 am

Re: Unable to retrieve data from the local cache.

Post by [email protected] »

Thanks for getting back to me about the issue ..

I suspected as much, but I just tried re-entering the credentials on the fusion page, and updated them with no change to the status - still can't get the data ..

On other piece of info is that these are running on oldish servers - RHEL 5 vintage, so I wonder if there is an issue with the version of php libs that they may be using ..

Any other help would be greatly appreciated ..

Thanks

Dave W.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to retrieve data from the local cache.

Post by tmcdonald »

I see you have a scheduled quickstart coming up - if it's alright with you I'd like to put this on pause until then so we're not doubling our coverage, then if it's still not resolved we can come back to this.
Former Nagios employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to retrieve data from the local cache.

Post by tmcdonald »

Just as a note/follow-up, it looks like the environment was used before and modified a bit, so the install might have gone through but presented errors. In particular, the 5 icons in the upper-right that are normally green were 2 orange and 3 red.

Next step is to install on a clean, minimal Cent/RHEL (preferably v6) and see if that works better. I'll leave this thread open until we hear back.
Former Nagios employee
[email protected]
Posts: 5
Joined: Tue Apr 19, 2016 11:58 am

Re: Unable to retrieve data from the local cache.

Post by [email protected] »

I have downloaded and installed a stock version of nagios fusion using the
64 bit CENTOS VM machine that you suggested ..I am wondering if it is
worthwhile setting up a Quick Start session or not as I am still having a
similar issue that I was having before ..

I started up the VM and it appeared to start the nagios fusion server just
fine .. i.e.: all the Question marks that you were questioning appear now
to have a check mark ..

I added the same nagios core server that I tried before with the custom
install. The authentication , for the server appears that it is validated
properly as it did before ..

However, when I tried to get data from the other server, I got exactly the
same results as before - "Unable to retrieve data from the local cache.²

So, at this point in time, I am thinking that this is an issue on the
remote servers, that it is missing something that the nagios fusion server
needs on the remote server that when nagios fusion is polling the nagios
core server it does not see any data/response ..

Do you have any suggestions as to where I might be able to look to find
out what might be missing on the core installs ?

I did so looking at the error log in /var/log/httpd/error_log and found
some strange error messages, which I have attached as a screen shot as I
was not able to cut/paste the text between the VM and my Mac ..

I was wondering if I should post this as well to the support forum, to see
if anyone else may have come across a similar issue ..

Thanks for any help that you can offer ..

Cheers

Dave W.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Unable to retrieve data from the local cache.

Post by rkennedy »

Can you attach the screenshot once again? I'm not seeing it here.
Former Nagios Employee
[email protected]
Posts: 5
Joined: Tue Apr 19, 2016 11:58 am

Re: Unable to retrieve data from the local cache.

Post by [email protected] »

I think those PHP errors might be onto something - can you post those in
the forum thread? I am not familiar with the IP addresses involved but
if you post to the forum thread we can get some more eyes on it. You
are welcome to re-apply for a Quickstart, but since we did the half hour
already this second session would also need to be half an hour.

If we get this resolved in the forum then you can save that other half
of the session for when things are working and we can get some real Q&A
done.

--
Trevor McDonald
Support Team Manager
Nagios Enterprises, LLC
Mod edit: wrapped quote in tags to prevent confusion - the above is a quote of an email I sent him
[email protected]
Posts: 5
Joined: Tue Apr 19, 2016 11:58 am

Re: Unable to retrieve data from the local cache.

Post by [email protected] »

Hi Trevor ..

Yes, those php errors were the key, the IP address’s are the local dhcp
address and were not important ..

However, buried in there was the key, it appears that the nagios core the
latest version has all the cgi-bin files compiled and put int the sbin
directory - where as the nagios fusion is looking for them in the cgi-bin
directory .. The fusion process was looking for a file that does not exist
under nagios core .. Hence the error ..

So, by adding a link from the share location for nagios -> ../sbin it
started to get results !! i.e. Ln -s ../sbin cgi-bin while in the share
directory

However, now that I am getting data, it appears that it may be in the
wrong format as I am getting a SQL error as attached ..

I will post my results up on the support forum as it took a really long
time to find this error ..

Cheers

Dave W


Hi Trevor ..

I found the root cause for all the issues .. It appears that the remote nagios servers cgi-bin directories had not been configured correctly, so the nagios fusion queries were not getting valid data ..

To correct the issue, I had to configure the remote system apache httpd.conf file to make sure that the cgi-bin directory was a valid Script Alias - once the cgi-bin directory was configured correctly, nagios fusion started collecting valid data ..

Nagios fusion is expecting the files to be in http://server_name/cgi-bin , however, nagios core installs them into: [install_root]/sbin - so you don't get the required cgi-bin binaries to execute and don't get a clear message that they are missing ..

The executing html php files are installed in: [install_root]/share - but if you make a link : ln -s ../sbin cgi-bin which makes a link : cgi-bin -> ../sbin which will access the cgi files but it will not execute them as post/get requests - you have to have the change in the apache httpd.conf file Script Alias file to have them executed as an acutal binary that will return correct data - other wise with a link, the binary .cgi files will just be downloaded as a data file, and cause just as many issues as not having the files in the first place ..



Cheers

Dave W.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to retrieve data from the local cache.

Post by tmcdonald »

I will need to speak to the developers about this and see if there can be a user-defined location to look for the CGI files. As it stands, Core could install them just about anywhere depending on how it was installed. I'll close this thread out now since it was resolved, and update when a feature request has been posted.
Former Nagios employee
Locked