# Traefik route two entrypoints on same Hostname

**URL:** <https://community.traefik.io/t/traefik-route-two-entrypoints-on-same-hostname/14209>\
**Category:** Traefik v2\
**Tags:** tcp, docker, docker-swarm\
**Created:** [April 20, 2022, 1:17pm UTC](https://community.traefik.io/t/traefik-route-two-entrypoints-on-same-hostname/14209 "2022-04-20T13:17:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![izhocell](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@izhocell](https://community.traefik.io/u/izhocell)\
**Post date:** [April 20, 2022, 1:17pm UTC](https://community.traefik.io/t/traefik-route-two-entrypoints-on-same-hostname/14209/1 "2022-04-20T13:17:15Z")

</div>

Hello

I am using Docker Swarm to deploy a application stack and use traefik as reverse proxy for many services.  
It's working well, however i'm stuck for my RabbitMQ service.

Here is the service config :

```auto
rabbitmq-obmq:
    image: Internal_IP:5000/rabbitmq
    hostname: rabbitmq-obmq
    deploy:
      labels:
        - traefik.enable=true
        - traefik.http.routers.rabbitmq-obmq.rule=Host(`imsobmq02.rabbitmq.domain.local`)
        - traefik.http.routers.rabbitmq-obmq.entrypoints=rabbitmq
        - traefik.http.routers.rabbitmq-obmq.service=rabbitmq-obmq@docker
        - traefik.http.services.rabbitmq-obmq.loadbalancer.server.port=15672
        - traefik.http.services.rabbitmq-obmq.loadbalancer.passhostheader=true
        - traefik.tcp.routers.rabbitmq-OBMq.rule=HostSNI(`imsobmq02.rabbitmq.domain.local`)
        - traefik.tcp.routers.rabbitmq-OBMq.entrypoints=rabbitmq-int
        - traefik.tcp.routers.rabbitmq-OBMq.service=rabbitmq-OBMq@docker
        - traefik.tcp.services.rabbitmq-OBMq.loadbalancer.server.port=5672
        - traefik.docker.network=ims-infra
    ports:
      - "5672"
      - "15672"

```

The HTTP labels works well, RabbitMQ management console is reachable from outside, but it doesn't work for the TCP ones.

I don't understand what is wrong on my set up.

Someone could help me ?

Izhocell

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [April 20, 2022, 7:18pm UTC](https://community.traefik.io/t/traefik-route-two-entrypoints-on-same-hostname/14209/2 "2022-04-20T19:18:28Z")

</div>

I'm not 100% sure but the http service name and the tcp service name are the same(ignoring case).  
Try changing the name on this line

```auto
        - traefik.tcp.services.rabbitmq-OBMq.loadbalancer.server.port=5672

```

---

<div class="post-metadata">

**Author:** ![izhocell](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@izhocell](https://community.traefik.io/u/izhocell)\
**Post date:** [April 21, 2022, 7:19am UTC](https://community.traefik.io/t/traefik-route-two-entrypoints-on-same-hostname/14209/3 "2022-04-21T07:19:43Z")

</div>

I just tried but still the same  
My rabbitmq consumer wont connect while if I set up the rabbitmq docker service name instead, it is working.  
Is that possible to log TCP requests on Traefik ?
