2

I have a livelinessProbe configured for my pod which does a http-get on path on the same pod and a particular port. It works perfectly. But, if I use the same settings and configure a readinessProbe it fails with the below error.

Readiness probe failed: wsarecv: read tcp :50578->:80: An existing connection was forcibly closed by the remote host

Actually after certain point I even see the liveliness probes failing. not sure why . Liveliness probe succeeding should indicate that the kube-dns is working fine and we're able to reach the pod from the node. Here's the readinessProbe for my pod's spec

readinessProbe:  
        httpGet:  
          path: /<path> # -> this works for livelinessProbe  
          port: 80  
        initialDelaySeconds: 30  
        periodSeconds: 10  
        timeoutSeconds: 10  

Does anyone have an idea what might be going on here.

mdaniel
  • 31,240
  • 5
  • 55
  • 58

1 Answers1

2

I don't think it has anything to do with kube-dns or coredns. The most likely cause here is that your pod/container/application is crashing or stop serving requests.

Seems like this timeline:

  • Pod/container comes up.
  • Liveliness probe passes ok.
  • Some time passes.
  • Probably app crash or error.
  • Readiness fails.
  • Liveliness probe fails too.

More information about what that error means here: An existing connection was forcibly closed by the remote host

Rico
  • 58,485
  • 12
  • 111
  • 141
  • Thanks for your quick response :) But, without the readiness probe, livelinessprobe never failed. its only when I added the readinessProbe things started to fail. – sai guru datt manchikanti Oct 09 '18 at 01:29
  • Did you check everything is running fine in your pod? – Rico Oct 09 '18 at 01:31
  • If I don't setup the readinessProbe in the pod, everything runs fine. I'm able to call the service that I deployed, the livelinessProbes are succeeding too. but once I setup the readinessProbe, I'm not able to run my service on that pod as well. when I run wget, it keeps failing. – sai guru datt manchikanti Oct 09 '18 at 01:34
  • Actually, my readinessprobe takes around 2-3 min for the first time. So, I had the timeout to be 180. But, after a while(around 2 min) it fails with the error "wsarecv: An existing connection was forcibly closed by the remote host" – sai guru datt manchikanti Oct 09 '18 at 23:41
  • It may be an issue with your app. I would suggest you shell into the pod and check for log files, or check the stdout logs with `kubectl logs ` – Rico Oct 09 '18 at 23:50