# Traefik is not routing TCP traffic into a TCP service

**URL:** <https://community.traefik.io/t/traefik-is-not-routing-tcp-traffic-into-a-tcp-service/14868>\
**Category:** Traefik v2\
**Tags:** tcp, kubernetes-ingress, kubernetes-crd\
**Created:** [June 23, 2022, 11:23am UTC](https://community.traefik.io/t/traefik-is-not-routing-tcp-traffic-into-a-tcp-service/14868 "2022-06-23T11:23:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![technoob](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@technoob](https://community.traefik.io/u/technoob)\
**Post date:** [June 23, 2022, 11:23am UTC](https://community.traefik.io/t/traefik-is-not-routing-tcp-traffic-into-a-tcp-service/14868/1 "2022-06-23T11:23:14Z")

</div>

Hello there!

I am configuring Traefik (v2.6.6) in a Kubernetes cluster for redirecting TCP traffic to a Jenkins Kubernetes service which listen to port 50000.  
For that I have created two resources:

- An entrypoint which receives traffic through port 50000 and whose protocol is TCP
- To reach the Jenkins service I have created a TCP router which should redirect traffic from the entrypoint to the Jenkins Kubernetes service on port 50000

When I try to communicate with the service I get the following error:

```auto
Jun 23, 2022 10:03:51 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: The server rejected the connection: None of the protocols were accepted
java.lang.Exception: The server rejected the connection: None of the protocols were accepted
        at hudson.remoting.Engine.onConnectionRejected(Engine.java:864)
        at hudson.remoting.Engine.innerRun(Engine.java:804)
        at hudson.remoting.Engine.run(Engine.java:540)

```

It seems like Traefik are not accepting traffic from TCP protocol.

I don't know if I am missing something or if some resource is not configured correctly but do any of you have any idea of what could be going on?

---

<div class="post-metadata">

**Author:** ![jakubhajek](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jakubhajek/32/3389_2.png) [@jakubhajek](https://community.traefik.io/u/jakubhajek)\
**Post date:** [June 23, 2022, 12:00pm UTC](https://community.traefik.io/t/traefik-is-not-routing-tcp-traffic-into-a-tcp-service/14868/2 "2022-06-23T12:00:37Z")

</div>

Hello @technoob

Thanks for using Traefik!

Interesting use case. I also use Jenkins and [Jenkins Agent](https://www.jenkins.io/doc/book/security/services/#tcp-agent-listener-port) in one of my environments. Jenkins Agent which is running on port 50000 is an HTTP server and accepts HTTPS requests, you don't have to create a dedicated TCP entry point to reach the service.

```auto
bash-5.1# curl jenkins-jenkins-agent:50000
Jenkins-Agent-Protocols: JNLP4-connect, Ping
Jenkins-Version: 2.345
Jenkins-Session: 0b656dcd
Client: 10.233.65.193
Server: 10.233.64.205
Remoting-Minimum-Version: 3.14
bash-5.1#

```

Seems that using TCP entrypoints instead of HTTP is the root cause of the issue you are facing.

Please keep us posted once you solve your issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [June 29, 2022, 11:24am UTC](https://community.traefik.io/t/traefik-is-not-routing-tcp-traffic-into-a-tcp-service/14868/4 "2022-06-29T11:24:45Z")

</div>

Closed on June 29, 2022, 11:24am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
