# Nodeport service only works for the second try. Why?

**URL:** <https://discuss.kubernetes.io/t/nodeport-service-only-works-for-the-second-try-why/27108>\
**Category:** General Discussions\
**Tags:** network\
**Created:** [February 15, 2024, 1:10am UTC](https://discuss.kubernetes.io/t/nodeport-service-only-works-for-the-second-try-why/27108 "2024-02-15T01:10:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeHammer](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@MikeHammer](https://discuss.kubernetes.io/u/MikeHammer)\
**Post date:** [February 15, 2024, 1:10am UTC](https://discuss.kubernetes.io/t/nodeport-service-only-works-for-the-second-try-why/27108/1 "2024-02-15T01:10:36Z")

</div>

### Cluster information:

Kubernetes version: 1.28.2  
Cloud being used: bare-metal  
Installation method: def  
Host OS: CentOS 8  
CNI and version: Calico

Hi All!  
I have problem which is interesting, at least for me. But I can’t find a solution for that. I have a K8S cluster with one master and 2 worker nodes. On this cluster I use Calico CNI and deployed Traefik ingress controller exposed to outside world through a NodePort

I’ve already raised another topic about my main problem ([NodePort service is not working from Master](https://discuss.kubernetes.io/t/nodeport-service-is-not-working-from-master/27082)) but I have a second one too.

I deployed a simple `whoami` application with one replica. If I try to access the whoami pod using the Traefik ingress like this: `curl http://node1:32000/whoamitest` it always goes to time out for the first try. But when I try to access that resource targeting the other worker node: `curl http://node2:32000/whoamitest`, I get the response what I expect.

And here it comes the interesting part… If I try to access the service again from `node1`, it work fine. If I keep using any of the nodes it still works fine. But when I take a break and don’t use the service for a few minutes, the whole thing starts from the beginning. The call times out for the first try, but if I try it again on the other node it starts to work as expected again.

As I experienced, this behaviour is not depending on which node I try first, and neither depending on which node runs the `whoami` pod.

Have you ever seen this weird behaviour before? Did you manage to overcome it somehow?

**Every help is highly appreciated!**
