I am running nomad on ec2 instance with ubuntu image. Whenever I give host address other than localhost it throws the error Error querying node status: Get http://xx.xxx.xxx.xx:4646/v1/nodes: dial tcp xx.xxx.xxx.xx:4646: connect: connection refused
Here is my server.hcl
log_level = “DEBUG”
Hi @shoryavj if you’re running on EC2, there’s a couple things you’ll need to be sure of:
Make sure the bind_addr is set to the correct interface. You may want to use a sockaddr expression like "{{ GetInterfaceIP \"eth0\" }}. (The interface may be something like ens5 on a machine with systemd.)
Make sure that the NOMAD_ADDR is pointing to the public IP of the host (or the private IP if you’re connecting to your environment via a VPN).
Make sure the security group for your EC2 instance permits port 4646/tcp from your location (or the VPN endpoint, if you’re using a VPN).