Nomad v0.4.0
Ubuntu Xenial
The consul services published by nomad set the service address to the advertise address. This is expected behavior, however the health check which is registered against that service is also registered against the service address.
This is unexpected because often times the service address is unreachable from the localhost. Since the Consul agent is expected to run locally, and the default address is on the loopback adapter, it makes sense for the default endpoint of all associated ServiceChecks to be configured against the bind address as opposed to the advertise address. Additionally, the address for the ServiceCheck is not configurable.
Registered consul checks will fail against unreachable service address, even though Nomad is healthy.
Configure all ServiceChecks with endpoint address and port equal to the bind address (config.Addresses.HTTP and so on)
@diptanu @dadgar do you have any plan to address this, if its not soon enough (we need this before september end), will you be open to a patch from our side?
Thanks for the PR
Most helpful comment
@diptanu @dadgar do you have any plan to address this, if its not soon enough (we need this before september end), will you be open to a patch from our side?