Issue with EC2 Nagios XI AMI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
hchohan1027
Posts: 10
Joined: Fri Dec 21, 2018 2:12 pm

Issue with EC2 Nagios XI AMI

Post by hchohan1027 »

Hello,

I'm following the guide below to install and trial Nagios XI on a EC2 instance but keep getting an error message that the /nagiosxi was not found on the server.

I keep getting an error that "ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com/nagiosxi was not found on this server"

https://assets.nagios.com/downloads/nag ... -Cloud.pdf

I’m deploying in US East (N. Virginia). I’m seeing the error after the AMI instance has be launched and I try to connect to NagiosXI via the EC2 public dns followed by /nagiosxi

I have waited more than 30 minutes to try and connect. Security Groups have the proper configuration.

It was working fine when I did the initial install.

I wanted to go through the install process again and terminated the original instance to walk through the install process again and it never worked after that.

Please advise!

Thanks,
HC
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Issue with EC2 Nagios XI AMI

Post by jomann »

I'm not sure how EC2 handles this, but is the DNS that you are using the same DNS that was used for the other instance? It's a different ID and IP address so you're using the new one correct? Are you able to log into the system and navigate to /usr/local/nagiosxi/var and output the contents of that directory?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
hchohan1027
Posts: 10
Joined: Fri Dec 21, 2018 2:12 pm

Re: Issue with EC2 Nagios XI AMI

Post by hchohan1027 »

Yes, I'm using the new Public DNS and IP address.

I am not able to navigate to any directory.

Thanks,
HC
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue with EC2 Nagios XI AMI

Post by ssax »

Do you see anything if you run this tail command (and leave it running):

Code: Select all

tail -f /var/log/httpd/*.log
Then go to http://ec2-xx-xxx-xxx-xxx.compute-1.ama ... m/nagiosxi OR https://ec2-xx-xxx-xxx-xxx.compute-1.am ... m/nagiosxi in the web browser and see if apache sees the connection from the tail command output. Does it give any errors? Please post the results.

Additionally, if you can SSH into the XI server, please send me the output of these commands:

Code: Select all

curl -k -L http://127.0.0.1/nagiosxi -vvv
hchohan1027
Posts: 10
Joined: Fri Dec 21, 2018 2:12 pm

Re: Issue with EC2 Nagios XI AMI

Post by hchohan1027 »

I am unable to SSH to the XI server. When I attempt to SSH, I get the following message:

OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/nagiosxi port 22.
ssh: Could not resolve hostname ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com/nagiosxi: nodename nor servname provided, or not known

Thanks,
HC
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue with EC2 Nagios XI AMI

Post by ssax »

Did you run the command like this from the guide?

Code: Select all

ssh -i .ssh/mykey.pem ec2-user@[AWS_public_DNS]
Not this:

Code: Select all

ssh -i .ssh/mykey.pem [email protected]/nagiosxi
But like this:
- Note: Make sure you change the XX-XXX-XXX-XXX to what yours actually is

Code: Select all

ssh -i .ssh/mykey.pem [email protected]
https://assets.nagios.com/downloads/nag ... -Cloud.pdf
hchohan1027
Posts: 10
Joined: Fri Dec 21, 2018 2:12 pm

Re: Issue with EC2 Nagios XI AMI

Post by hchohan1027 »

Yes, I tried that. Here is the output of that command:

ssh -i .ssh/nagiosxi.pem [email protected]
Warning: Identity file .ssh/nagiosxi.pem not accessible: No such file or directory.
The authenticity of host 'ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com (XX.XX.XXX.XX)' can't be established.
RSA key fingerprint is SHA256:Hg4NT/2nvHesqAkvDDhsHtUg5QsO47V/UzU3QqogBTQ.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com,XX.XXX.XXX.XX' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

I'm able to ping the host:

ping ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com
PING ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com (XX.XX.XXX.XX): 56 data bytes
64 bytes from XX.XX.XXX.XX: icmp_seq=0 ttl=47 time=36.950 ms
64 bytes from XX.XX.XXX.XX: icmp_seq=1 ttl=47 time=31.214 ms
64 bytes from XX.XX.XXX.XX: icmp_seq=2 ttl=47 time=20.871 ms
64 bytes from XX.XX.XXX.XX: icmp_seq=3 ttl=47 time=69.597 ms
64 bytes from XX.XX.XXX.XX: icmp_seq=4 ttl=47 time=27.470 ms
64 bytes from XX.XX.XXX.XX: icmp_seq=5 ttl=47 time=96.216 ms
^C
--- ec2-XX-XXX-XXX-XX.compute-1.amazonaws.com ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 20.871/47.053/96.216/26.917 ms

Thanks,
HC
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue with EC2 Nagios XI AMI

Post by ssax »

Warning: Identity file .ssh/nagiosxi.pem not accessible: No such file or directory.
You will need the proper nagiosxi.pem file for it to work.

It's the one you create on page 2 of this document:

https://assets.nagios.com/downloads/nag ... -Cloud.pdf

Edit: If you continue to have issues SSHing to the server you will likely need to work with EC2 support to get it resolved.
hchohan1027
Posts: 10
Joined: Fri Dec 21, 2018 2:12 pm

Re: Issue with EC2 Nagios XI AMI

Post by hchohan1027 »

Yes, I am using the right *.pem file.

I’ve tried with the full path to the file and also by copying it to the SSH folder.

Where should the *.pem file be saved/stored?

This is so strange because it worked fine the first time I launched the instance with the Nagios XI AMI. Never worked again after I terminated the initial instance to try and go through the install process again.

Thanks,
HC
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Issue with EC2 Nagios XI AMI

Post by ssax »

From the guide:
The wizard will have you choose, or create a key pair. If
you are creating a key pair for the first time, you will be
asked to download the key before continuing.
The private
key will be required to SSH into your machine.
You would have been asked to download it to your computer, check your default downloads location on your workstation to see if you have it.

You could always delete it and spin up another one or work with EC2 support to see if they can figure out why you're unable to connect.

I assume you've restarted/rebooted the instance, right? If not, try that and then try to connect again.
Locked