<p>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.</p>

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

<p>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</p>

<pre class="lang-yaml prettyprint-override"><code>readinessProbe:  
        httpGet:  
          path: /&lt;path&gt; # -&gt; this works for livelinessProbe  
          port: 80  
        initialDelaySeconds: 30  
        periodSeconds: 10  
        timeoutSeconds: 10  
</code></pre>

<p>Does anyone have an idea what might be going on here.</p>

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

<p>Seems like this timeline:</p>

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

<p>More information about what that error means here: 
<a href="https://stackoverflow.com/questions/2582036/an-existing-connection-was-forcibly-closed-by-the-remote-host">An existing connection was forcibly closed by the remote host</a></p>
