No default interface found

Previously there were multiple IP on the server that could start nomad normally, but I found that it was not bound to the IP I wanted, so I disabled it and left only one IP I wanted, but when I restarted nomad, it made a mistake


Error starting agent: client setup failed: fingerprinting failed: Error while detecting network interface during fingerprinting: No default interface found

I deleted the data directory and bound the IP without any effect,Still reporting an error, I would like to consult how I should let him start normally in this situation


# cat /etc/nomad.d/nomad.hcl

datacenter = "dc1"

data_dir = "/opt/nomad"

bind_addr = "10.1.4.3"

region = "jinhusa"

telemetry {

collection_interval = "1s"

disable_hostname = true

prometheus_metrics = true

publish_allocation_metrics = true

publish_node_metrics = true

disable_dispatched_job_summary_metrics = true

}

Hi @x602, does the server have a default gateway configured? E.g. what is the output of
ip route ?

1 Like

Thanks for reminding me. It’s a network routing problem. It has been solved

Now I find that the system does not create a nomad network card. How can I troubleshoot it

Then when I started the job, I found that he reported this error

nomad: 2022-06-22T14:42:05.303+0800 [WARN]  agent: Check socket connection failed: check=_nomad-check-784b23362db476f558425f42095d7458f606d465 error="dial tcp 10.104.1.130:28207: connect: connection refused"

Is it related to the network
A:

# ip r
default via 10.104.1.129 dev bond0 
10.104.1.128/25 dev bond0 proto kernel scope link src 10.104.1.130 
169.254.0.0/16 dev bond0 scope link metric 1008 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.104.1.129    0.0.0.0         UG    0      0        0 bond0
10.104.1.128    0.0.0.0         255.255.255.128 U     0      0        0 bond0
169.254.0.0     0.0.0.0         255.255.0.0     U     1008   0        0 bond0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0

B:

# ip r
default via 10.104.1.129 dev bond0 
10.104.1.128/25 dev bond0  proto kernel  scope link  src 10.104.1.158 
169.254.0.0/16 dev bond0  scope link  metric 1008 
172.17.0.0/16 dev docker0  proto kernel  scope link  src 172.17.0.1 
172.26.64.0/20 dev nomad  proto kernel  scope link  src 172.26.64.1 

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.104.1.129    0.0.0.0         UG    0      0        0 bond0
10.104.1.128    0.0.0.0         255.255.255.128 U     0      0        0 bond0
169.254.0.0     0.0.0.0         255.255.0.0     U     1008   0        0 bond0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.26.64.0     0.0.0.0         255.255.240.0   U     0      0        0 nomad

Hi @x602 that Check failure output is originating from Consul. Is the Nomad Client agent configured to register services with a local Consul agent on the same node? Can you show as much of your Nomad job definition as you can? Seeing the network and service blocks may help.

1 Like