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”
Setup data dir
data_dir = “/etc/nomad”
bind_addr = “xx.xxx.xxx.xx”
advertise {
Defaults to the first private IP address.
http = “xx.xxx.xxx.xx”
rpc = “xx.xxx.xxx.xx”
serf = “xx.xxx.xxx.xx”:4648" # non-default ports may be specified
}
Enable the server
server {
enabled = true
# Self-elect, should be 3 or 5 for production
bootstrap_expect = 1
}