Page 1 of 2

Check For Updates Failed (new install with no proxy)

Posted: Fri Mar 22, 2024 10:25 am
by lveitch
Hey everyone! I am very new to this product so please pardon my lack of knowledge on certain things but I had a question.

I have Nagios2024R1.0.2 freshly installed on an Ubuntu 22 VM. Everything is setup and working nicely however I keep getting this 'Check for Updates failed' notification. I have read the other posts here and everyone keeps asking or talking about a proxy setup. In my scenario, I do not need a proxy as the machine has full access to the internet as I registered my license, I can do Ubuntu updates, I can ping external sites, wget and everything works. I have checked the following log files:

/usr/local/nagiosxi/tmp/upgrade.log - does not exist
/var/log/httpd - directory doesnt exist so there is no error.log or access.log

The only reference I can find to an error is in the /usr/local/nagiosxi/var folder and a log called load_url.log and it has this error which doesn't really tell me much of anything other than me wondering about it trying to go out HTTPS/443 but I haven't loaded an SSL cert yet so i'm still using HTTP/80 but that could just be nothing.

Can anyone point me in a better direction on where to look to get that working?

Code: Select all

CURL ERROR
TIME: 2024-03-22T08:13:41-07:00
Array
(
    [url] => https://api.nagios.com/versioncheck/?product=nagiosxi&version=2024R1.0.2&build=1708011339&stableonly=1&output=xml&k5=41ff980012640f0720450a954eec2e3c&h=70&s=678&ostype=Ubuntu22&installtype=source&uuid=0fa49c54-177b-4c5c-b61d-0b56216a3873&arch=64
    [content_type] =>
    [http_code] => 0
    [header_size] => 0
    [request_size] => 332
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 15.000549
    [namelookup_time] => 0.000454
    [connect_time] => 0.049449
    [pretransfer_time] => 0.222507
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => 0
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] =>
    [primary_ip] => 50.116.21.73
    [certinfo] => Array
        (
        )

    [primary_port] => 443
    [local_ip] => <local nagiosxi server ip>
    [local_port] => 56068
    [http_version] => 0
    [protocol] => 2
    [ssl_verifyresult] => 0
    [scheme] => HTTPS
    [appconnect_time_us] => 222475
    [connect_time_us] => 49449
    [namelookup_time_us] => 454
    [pretransfer_time_us] => 222507
    [redirect_time_us] => 0
    [starttransfer_time_us] => 0
    [total_time_us] => 15000549
)

URL: https://api.nagios.com/versioncheck/?product=nagiosxi&version=2024R1.0.2&build=1708011339&stableonly=1&output=xml&k5=41ff980012640f0720450a954eec2e3c&h=70&s=678&ostype=Ubuntu22&installtype=source&uuid=0fa49c54-177b-4c5c-b61d-0b56216a3873&arch=64
OPTIONS: Array
(
    [return_info] => 1
    [method] => get
    [timeout] => 15
)

END LOGENTRY

Re: Check For Updates Failed (new install with no proxy)

Posted: Mon Mar 25, 2024 12:56 pm
by jmichaelson
Since this is a fresh install it is expected the upgrade.log doesn't exist. Check install.log instead.

On Ubuntu, the Apache logs should be under /var/log/apache2 instead of /var/log/httpd.

Re: Check For Updates Failed (new install with no proxy)

Posted: Tue Mar 26, 2024 12:00 pm
by lveitch
Jason - appreciate the feedback.

Where would this install.log file be located? I dont see any reference to it in the NagiosXI documentation. I have checked all the following locations and no file (also the nagiosxi/tmp directory doesnt exist):

/usr/local/nagios/var
/usr/local/nagiosxi/tmp
/usr/local/nagiosxi/var
/var/lib
/var/log

As far as the Apache log, this is the only error that appears:

Code: Select all

[Tue Mar 26 09:52:35.787473 2024] [php:notice] [pid 39248] [client <client_ip_address>:51952] Operation timed out after 15000 milliseconds with 0 bytes received, referer: http://<nagios_server_name>/nagiosxi/admin/
[Tue Mar 26 09:53:28.197278 2024] [php:notice] [pid 29511] [client <client_ip_address>:51977] Operation timed out after 15000 milliseconds with 0 bytes received, referer: http://<nagios_server_name>/nagiosxi/admin/updates.php
/code]

Any ideas?

Re: Check For Updates Failed (new install with no proxy)

Posted: Wed Mar 27, 2024 10:32 am
by lveitch
I also confirmed that external access for this server is completely open for ports 80 and 443 (both from a server perspective and from a ufw perspective) so there is nothing blocking access to the site.

Re: Check For Updates Failed (new install with no proxy)

Posted: Thu Mar 28, 2024 12:12 pm
by lveitch
Ran through my setup completely and everything is solid. I can ping google.com just fine so external access is good; just dont know why I am unable to run the update

Code: Select all

root@nagiosxi:/etc/netplan# ping www.google.com
PING www.google.com (142.250.217.68) 56(84) bytes of data.
64 bytes from sea09s29-in-f4.1e100.net (142.250.217.68): icmp_seq=1 ttl=113 time=7.42 ms
64 bytes from sea09s29-in-f4.1e100.net (142.250.217.68): icmp_seq=2 ttl=113 time=7.46 ms
64 bytes from sea09s29-in-f4.1e100.net (142.250.217.68): icmp_seq=3 ttl=113 time=7.42 ms
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 7.418/7.432/7.457/0.017 ms

Re: Check For Updates Failed (new install with no proxy)

Posted: Thu Mar 28, 2024 1:32 pm
by kg2857
Use curl or wget to fetch the upgrade check URL.

Re: Check For Updates Failed (new install with no proxy)

Posted: Thu Mar 28, 2024 1:35 pm
by jmichaelson
The install log would be wherever you ran ./install from initially.

What does your connectivity to api.nagios.com port 443 look like?

Re: Check For Updates Failed (new install with no proxy)

Posted: Thu Mar 28, 2024 6:18 pm
by lveitch
jmichaelson wrote: Thu Mar 28, 2024 1:35 pm The install log would be wherever you ran ./install from initially.
I ran this command from my home directory to install NagiosXI and there is no install.log file. I followed the steps from the guide https://nagiosenterprises.my.site.com/s ... 4-5d1c3f10

Code: Select all

curl https://assets.nagios.com/downloads/nagiosxi/install.sh | sh
jmichaelson wrote: Thu Mar 28, 2024 1:35 pm What does your connectivity to api.nagios.com port 443 look like?
My connection to the api site is good (showed a few other external pings as well for good measure - api is the last ping check)

Code: Select all

root@nagiosxi:# ping www.google.com
PING www.google.com (142.251.33.68) 56(84) bytes of data.
64 bytes from sea09s28-in-f4.1e100.net (142.251.33.68): icmp_seq=1 ttl=113 time=7.83 ms
64 bytes from sea09s28-in-f4.1e100.net (142.251.33.68): icmp_seq=2 ttl=113 time=7.77 ms
64 bytes from sea09s28-in-f4.1e100.net (142.251.33.68): icmp_seq=3 ttl=113 time=7.97 ms
64 bytes from sea09s28-in-f4.1e100.net (142.251.33.68): icmp_seq=4 ttl=113 time=8.05 ms
^C
--- www.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 7.766/7.904/8.050/0.112 ms
root@nagiosxi:# ping cnn.com
PING cnn.com (151.101.195.5) 56(84) bytes of data.
64 bytes from 151.101.195.5 (151.101.195.5): icmp_seq=1 ttl=54 time=3.71 ms
64 bytes from 151.101.195.5 (151.101.195.5): icmp_seq=2 ttl=54 time=3.61 ms
64 bytes from 151.101.195.5 (151.101.195.5): icmp_seq=3 ttl=54 time=3.79 ms
^C
--- cnn.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.607/3.701/3.786/0.073 ms
root@nagiosxi:# ping api.nagios.com
PING vs1.nagios.com (50.116.21.73) 56(84) bytes of data.
64 bytes from newvs1.nagios.com (50.116.21.73): icmp_seq=1 ttl=46 time=51.9 ms
64 bytes from newvs1.nagios.com (50.116.21.73): icmp_seq=2 ttl=46 time=52.0 ms
64 bytes from newvs1.nagios.com (50.116.21.73): icmp_seq=3 ttl=46 time=52.0 ms
64 bytes from newvs1.nagios.com (50.116.21.73): icmp_seq=4 ttl=46 time=52.5 ms
^C
--- vs1.nagios.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 51.888/52.079/52.497/0.243 ms
root@nagiosxi:#
I do understand that I can manually download and install the update which I am completely fine with. I am just really trying to figure out why from the GUI it does not work

Code: Select all

Available Updates
Update Check Problem: Last update check failed.
Latest Available Version:	
Installed Version:	2024R1.0.2
Last Update Check:	2024-03-28 16:15:26
Last Updated: 2024-03-28 16:16:00

Re: Check For Updates Failed (new install with no proxy)

Posted: Fri Mar 29, 2024 9:27 am
by cnorell
Do you have an active license on the XI server you're trying to upgrade?

Re: Check For Updates Failed (new install with no proxy)

Posted: Fri Mar 29, 2024 10:32 am
by lveitch
Yes my Nagios is licensed, still has 350 days on this current one and is presently only using 38% of the license.