checkURL HEAD request failed, dial tcp 192.168.12.1:80: connect: no route to host
I'm running stprov like this:
stprov remote static -H foo -i 192.168.12.42/24 -g 192.168.12.1 -r http://user:pass@192.168.12.1/ospkgs/foo.json
The configuration looks good, but the final checkURL fails because no route to host. If I do a wget
on the cmdline towards the same host right after stprov failing, then the wget fetch succeeds.
At that time ip r
says:
default via 192.168.12.1 dev eth0 proto boot metric 0
192.168.12.0/24 dev eth0 proto kernel scope link src 192.168.12.42 metric 0
If I put a 3 second sleep just before the call to checkURL
, then the call succeeds. So it seems like at least the route to the /24-network might not have appeared when that HTTP request happens. Perhaps not having any DNS to resolve (taking time) is what provokes this.
Edited by Daniel Lublin