This guide will help you to fix the issue when Nomad / Consul are binding jobs on the wrong interface.
Get your private interface
First, run ifconfig
to check if the interface is available and get it's name.
1enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450 2 inet 10.4.0.3 netmask 255.255.255.255 broadcast 10.4.0.3 3 inet6 fe80::8400:ff:fe74:ac5c prefixlen 64 scopeid 0x20<link> 4 ether 86:00:00:74:af:6a txqueuelen 1000 (Ethernet) 5 RX packets 8370677 bytes 1497631969 (1.4 GB) 6 RX errors 0 dropped 0 overruns 0 frame 0 7 TX packets 7785709 bytes 1158079549 (1.1 GB) 8 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
If your networking is configured correctly you will find your private interface named like ens...
, enp...
.
Fix
You can either hardcode the interface name or use the go-sockaddr/template templating language to get the private interface name.
The following example will get the name
of the first network interface in the 10.0.0.0/8
address space (this will match all ip addresses from 10.0.0.0
to 10.255.255.255
).
1client { 2 # use go-sockaddr/template 3 network_interface = "{{ GetPrivateInterfaces | include \"network\" \"10.0.0.0/8\" | attr \"name\" }}" 4 5 # hardcode the interface name 6 network_interface = "enp7s0" 7}
It's important to restart Nomad and all jobs afterwards. Only restarting Nomad will not be enough since the job will keep running in the background.
References
See Nomad network_interface
Docs
Troubleshooting
To see all configuration values and debug info, run nomad operator debug
and quit using Ctrl+C
. A .tar.gz file will be created in the current directory. Download, extract it and check the cluster/agent-self.json
file for the NetworkInterface
value to see if the value has been set correctly.
Read more...
No, you can't use your $6,299.00 Camera as a Webcam. That will be $5
$30 billion company want's you to pay $5 for using your own camera as a webcam
Fix Laravel Job Queue not processing with MaxAttemptsExceededException
Fix issues with the Laravel Job Queue not processing jobs due to max attempts exceeding.