# Bad MAC error when trying to setup cert

**URL:** https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228
**Category:** Traefik v2
**Tags:** docker, letsencrypt-acme
**Created:** [January 23, 2023, 2:38am UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228 "2023-01-23T02:38:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![saitoh183](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/saitoh183/32/6541_2.png) [@saitoh183](https://community.traefik.io/u/saitoh183)
#### Post date: [January 23, 2023, 2:38am UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/1 "2023-01-23T02:38:45Z")

</div>

Hey all, im trying to get treafik to work on my remote server and im stumped on this error `msg="http: TLS handshake error from :34020: local error: tls: bad record MAC"

```auto
msg="http: TLS handshake error from <IP>:34020: local error: tls: bad record MAC"
msg="http: TLS handshake error from <IP>:34020: local error: tls: bad record MAC"
msg="Serving default certificate for request: \"domain.com\""
msg="Serving default certificate for request: \"overseerr.domain.com\""
msg="Serving default certificate for request: \"overseerr.domain.com\"" 

```

my setup is based on  
[Ultimate Traefik Docker Compose Guide [2022] with LetsEncrypt | SHB](https://www.smarthomebeginner.com/traefik-docker-compose-guide-2022/) I used the same docker compose on my local machine and it setup fine.  
docker-compose: [docker-compose treafik - Pastebin.com](https://pastebin.com/AxVZjZdy) (edited)

The box im doing this on is a SoYouStart box from OVH

---

<div class="post-metadata">

### Author: ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)
#### Post date: [January 23, 2023, 7:55am UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/2 "2023-01-23T07:55:50Z")

</div>

When you [search the Internet](https://www.google.com/search?q=tls+%22bad+record+mac%22), it seems that this is often blamed on faulty hardware, software or network connection.

I would try to spin up a new node with fresh install and newly downloaded certs (if you use paid ones).

---

<div class="post-metadata">

### Author: ![saitoh183](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/saitoh183/32/6541_2.png) [@saitoh183](https://community.traefik.io/u/saitoh183)
#### Post date: [January 23, 2023, 12:43pm UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/3 "2023-01-23T12:43:21Z")

</div>

Thanks for the reply! If you mean start a new server by spinning a new node, that is not really a possibility. I am using the swag container from linuxserver for years on this machine and have never had a issue with getting a new cert or renewing one.

---

<div class="post-metadata">

### Author: ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)
#### Post date: [January 23, 2023, 12:46pm UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/4 "2023-01-23T12:46:48Z")

</div>

Was it a single error, just a flipped bit during a connection, or is it happen regularly?

---

<div class="post-metadata">

### Author: ![saitoh183](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/saitoh183/32/6541_2.png) [@saitoh183](https://community.traefik.io/u/saitoh183)
#### Post date: [January 23, 2023, 12:48pm UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/5 "2023-01-23T12:48:32Z")

</div>

It just keeps repeating as soon as a spin up the container.

---

<div class="post-metadata">

### Author: ![saitoh183](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/saitoh183/32/6541_2.png) [@saitoh183](https://community.traefik.io/u/saitoh183)
#### Post date: [January 23, 2023, 1:01pm UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/6 "2023-01-23T13:01:55Z")

</div>

Also this is this in the staging mode

---

<div class="post-metadata">

### Author: ![mrDavid](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@mrDavid](https://community.traefik.io/u/mrDavid)
#### Post date: [February 8, 2023, 9:52am UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/7 "2023-02-08T09:52:13Z")

</div>

I had this error occur when I created a docker container using traefik router/service names already in use by another container (i.e. lazy compose copy/paste)

Check this before replacing your network infrastructure 😉

---

<div class="post-metadata">

### Author: ![saitoh183](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/saitoh183/32/6541_2.png) [@saitoh183](https://community.traefik.io/u/saitoh183)
#### Post date: [February 10, 2023, 12:53am UTC](https://community.traefik.io/t/bad-mac-error-when-trying-to-setup-cert/17228/8 "2023-02-10T00:53:01Z")

</div>

Yeah i manage to get everything working once i took a step back and looked at what i was doing.
