Customer sees UnknownHostException in app logs.
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://availability-api.example.com/v2/inventoryapis/searchinventory": availability-api.example.com: Name or service not known; nested exception is java.net.UnknownHostException: availability-api.example.com: Name or service not known
Although there is no reason to believe this is a bug in bosh-dns, the customer observed that after identifying the Diego cells on which the application instances were running and restarting the bosh-dns service on those VMs, the error was eliminated.
TAS 4.0.21
Restarting bosh-dns may simply cause DNS lookups to hit a different DNS resolver.
Performing general networking troubleshooting should be the first step. Problems with the functionality or data available to DNS servers are the most common cause for a "name or service not known" error.
If no problems are found in infrastructure DNS, then another workaround is to restart the bosh-dns job on the affected diego cell(s).
cf app <app_name> --guid
. It shows the app_guid.cf curl /v2/apps/<app_guid>/stats
or
cf curl /v3/processes/<app_guid>
/stats . It shows the host
IP
address and port of the Diego cell in which the app instance is running.bosh vms | grep <host>
to retrieve the diego_cell
name where host is the IP address listed in step b.If you want to gather more information and possible report the issue to R&D, you can collect a packet capture:
sudo tcpdump -i any port 53 -w dns_capture.pcap