Hello. I can’t understand why nomad node status
is empty when all peers available by api? Thanks for any responses.
# curl http://10.0.15.2:4646/v1/agent/health?type=server
{"server":{"message":"ok","ok":true}}
# curl http://10.0.15.2:4646/v1/status/leader
"10.0.15.144:4647"
# curl http://10.0.15.2:4646/v1/status/peers
["10.0.15.50:4647","10.0.15.144:4647","10.0.15.2:4647"]
# curl http://10.0.15.2:4646/v1/nodes
[]
# nomad node status
#
My nomad cluster bootstrapping via consul.
curl http://10.0.15.192:8500/v1/agent/services | jq
{
"_nomad-server-257zxynpwwo72xwul4waggudxtxe5y6p": {
"ID": "_nomad-server-257zxynpwwo72xwul4waggudxtxe5y6p",
"Service": "nomad-servers",
"Tags": [
"http"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4646,
"Address": "10.0.15.2",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-3au7gyp32cqshfolntomr4edckoxupij": {
"ID": "_nomad-server-3au7gyp32cqshfolntomr4edckoxupij",
"Service": "nomad-servers",
"Tags": [
"http"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4646,
"Address": "10.0.15.50",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-4ifpi2sjouyuoyqor3g5lw4hnr25tdpe": {
"ID": "_nomad-server-4ifpi2sjouyuoyqor3g5lw4hnr25tdpe",
"Service": "nomad-servers",
"Tags": [
"rpc"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4647,
"Address": "10.0.15.2",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-5pocvm3xlvghdxkvf52faqkbnhmnvbcq": {
"ID": "_nomad-server-5pocvm3xlvghdxkvf52faqkbnhmnvbcq",
"Service": "nomad-servers",
"Tags": [
"serf"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4648,
"Address": "10.0.15.2",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-67vo7zjrcnzv2uf5mxj2unsm57jvghtr": {
"ID": "_nomad-server-67vo7zjrcnzv2uf5mxj2unsm57jvghtr",
"Service": "nomad-servers",
"Tags": [
"rpc"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4647,
"Address": "10.0.15.144",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-7mbxmvaezeg5dqkltyqh2zfwvrzbane3": {
"ID": "_nomad-server-7mbxmvaezeg5dqkltyqh2zfwvrzbane3",
"Service": "nomad-servers",
"Tags": [
"http"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4646,
"Address": "10.0.15.144",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-cbo46vzsx7tz2ljnuon55rnumr6kues6": {
"ID": "_nomad-server-cbo46vzsx7tz2ljnuon55rnumr6kues6",
"Service": "nomad-servers",
"Tags": [
"serf"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4648,
"Address": "10.0.15.144",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-naeump42jytincxz3m2tyan3lsoyrlpm": {
"ID": "_nomad-server-naeump42jytincxz3m2tyan3lsoyrlpm",
"Service": "nomad-servers",
"Tags": [
"serf"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4648,
"Address": "10.0.15.50",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
},
"_nomad-server-v3oww4banlushdezlxku5g2ho5f24cir": {
"ID": "_nomad-server-v3oww4banlushdezlxku5g2ho5f24cir",
"Service": "nomad-servers",
"Tags": [
"rpc"
],
"Meta": {
"external-source": "nomad"
},
"Port": 4647,
"Address": "10.0.15.50",
"Weights": {
"Passing": 1,
"Warning": 1
},
"EnableTagOverride": false
}
}
/etc/nomad.d/base.hcl
name = "nomad-stage-01"
region = "london"
datacenter = "dc1"
enable_debug = true
disable_update_check = false
bind_addr = "10.0.15.50"
advertise {
http = "10.0.15.50:4646"
rpc = "10.0.15.50:4647"
serf = "10.0.15.50:4648"
}
ports {
http = 4646
rpc = 4647
serf = 4648
}
consul {
# The address to the Consul agent.
address = "10.0.15.192:8500"
token = "myToken"
# The service name to register the server and client with Consul.
server_service_name = "nomad-servers"
client_service_name = "nomad-clients"
tags = {}
# Enables automatically registering the services.
auto_advertise = true
# Enabling the server and client to bootstrap using Consul.
server_auto_join = true
client_auto_join = true
}
data_dir = "/var/nomad"
log_level = "DEBUG"
enable_syslog = true
leave_on_terminate = true
leave_on_interrupt = false
acl {
enabled = false
token_ttl = "30s"
policy_ttl = "30s"
replication_token = ""
}
/etc/nomad.d/server.hcl
server {
enabled = true
bootstrap_expect = 3
rejoin_after_leave = false
enabled_schedulers = ["service","batch","system"]
num_schedulers = 2
node_gc_threshold = "24h"
eval_gc_threshold = "1h"
job_gc_threshold = "4h"
encrypt = ""
}