# TCP Redis returning weird error

**URL:** <https://community.traefik.io/t/tcp-redis-returning-weird-error/3825>\
**Category:** Traefik v2\
**Tags:** tcp\
**Created:** [January 13, 2020, 10:33am UTC](https://community.traefik.io/t/tcp-redis-returning-weird-error/3825 "2020-01-13T10:33:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amigo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/amigo/32/2411_2.png) [@amigo](https://community.traefik.io/u/amigo)\
**Post date:** [January 13, 2020, 10:33am UTC](https://community.traefik.io/t/tcp-redis-returning-weird-error/3825/1 "2020-01-13T10:33:09Z")

</div>

I'm trying to use Redis with Traefik but am running into some issues.

I followed this issue: [https://github.com/containous/traefik/issues/4930](https://github.com/containous/traefik/issues/4930) in how they configured Redis with docker compose, but when doing so and trying to PING the redis db, I get the following error:

```auto
Error: Protocol error, got "H" as reply type byte

```

After going through some forums and StackOverFlow, it seems like this issue may come up when instead of TCP, Traefik uses HTTP (although in the dashboard it does show up as TCP).

Here is my docker compose file:

```auto
version: "3"

networks:
  proxy:
    external: true
  internal:
    external: false
services:

  hog:
    image: traefik:v2.1.2
    command:
      - --entrypoints.web.address=:80
      - --entrypoints.redis.address=:50000
      - --providers.docker
      - --api
      - --ping=true
    ports:
      - "50000:50000"
      - "80:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - proxy
    labels:
      - "traefik.http.routers.api.rule=Host(`subdomain.domain.tld`)"
      - "traefik.http.routers.api.service=api@internal"
      - "traefik.http.routers.api.middlewares=auth"
      - "traefik.http.middlewares.auth.basicauth.users=admin:password"

  redis:
    image: redis:5
    labels:
      - "traefik.tcp.routers.redis.entrypoints=redis"
      - "traefik.tcp.routers.redis.rule=HostSNI(`another-subdomain.domain.tld`)"
      - "traefik.tcp.services.redis.loadbalancer.server.port=50000"
      - "traefik.tcp.routers.redis.tls=true"
    command: ["redis-server", "/usr/local/etc/redis/redis.conf", "--appendonly", "yes", "--requirepass", "password"]
    hostname: redis
    volumes:
      - ./redis-data:/data
      - ./redis.conf:/usr/local/etc/redis/redis.conf

```

Even without a redis.conf and using the given conf, I get the same issue. Any help would be greatly appreciated.

To be clear, it seems like I'm able to connect to the DB since I get Redis' shell when I do redis-cli like the following:

```auto
redis-cli --no-auth-warning -h another-subdomain.domain.tld -p 50000 -a 'password' 

```

But when I do PING within that shell I get that error aforementioned.

---

<div class="post-metadata">

**Author:** ![gruunday](https://avatars.discourse-cdn.com/v4/letter/g/e9a140/32.png) [@gruunday](https://community.traefik.io/u/gruunday)\
**Post date:** [March 25, 2020, 3:15pm UTC](https://community.traefik.io/t/tcp-redis-returning-weird-error/3825/2 "2020-03-25T15:15:24Z")

</div>

Hi @amigo,

Did you find a solution to this, I seem to be encountering the same issue,

Thanks,
