origin icon indicating copy to clipboard operation
origin copied to clipboard

DNS service lookup failed for first 5 mins in container

Open jagadeeshops opened this issue 9 years ago • 8 comments

When a container started it failed to resolve the service name for about 3 times in first 5 minutes. It succeeded in the fourth attempt.

Version

oc v1.4.1 kubernetes v1.4.0+776c994 features: Basic-Auth GSSAPI Kerberos SPNEGO openshift v1.4.1 kubernetes v1.4.0+776c994

Steps To Reproduce
  1. Occurred only once. Unable to reproduce
Additional Information

zookeeper is the service name:

May 25th 2017, 11:29:14.552 maas-consumer-mssql Caused by: java.net.UnknownHostException: zookeeper: Name does not resolve May 25th 2017, 11:26:51.673 maas-consumer-mssql Caused by: java.net.UnknownHostException: zookeeper: Name does not resolve May 25th 2017, 11:25:56.361 maas-consumer-mssql Caused by: java.net.UnknownHostException: zookeeper: Name does not resolve

Fourth time it resolved and connected successfully.

/etc/resolv.conf contents: node ip only

At the same time zookeeper was running. Since its unable to resolve the hostname, Service is up or down doesnt matter.

jagadeeshops avatar May 30 '17 05:05 jagadeeshops

The networking team owns the networking to get to the DNS service... but not the resolver. Passing over to the Kube team.

knobunc avatar May 30 '17 15:05 knobunc

This issue occurs only in one Alpine based java container. Today again that issue surfaced. But after two to three restarts, Pods settled down

jagadeeshops avatar Jun 13 '17 14:06 jagadeeshops

@derekwaynecarr @knobunc Can you provide the trouble shooting steps or pointers regarding this issue

jagadeeshops avatar Jun 14 '17 05:06 jagadeeshops

I think that the initial request is taking that long to timeout, and then getting marked as offline by dnsmasq and then that server is no longer queried. Can we get the /etc/resolv.conf from inside the pod, and then we can go from there? A tcpdump of the dns traffic from inside the pod would give some credence to the theory too.

knobunc avatar Jun 14 '17 17:06 knobunc

@jagadeeshops - is this a single node cluster? can you handle this with a liveness or readiness check as well?

derekwaynecarr avatar Jun 14 '17 19:06 derekwaynecarr

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Feb 12 '18 10:02 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Mar 15 '18 23:03 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Apr 15 '18 05:04 openshift-bot