I am new to traefik. Have been trying to set it up. But getting the following errors.
time="2021-01-02T11:02:04+04:00" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=websecure
time="2021-01-02T11:02:04+04:00" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=websecure
time="2021-01-02T11:02:04+04:00" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=traefik
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=web
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=web
time="2021-01-02T11:02:04+04:00" level=error msg="Error while starting server: http: Server closed" entryPointName=traefik
time="2021-01-02T11:02:05+04:00" level=error msg="close tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2021-01-02T11:02:05+04:00" level=error msg="close tcp [::]:80: use of closed network connection" entryPointName=web
time="2021-01-02T11:02:05+04:00" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik
I can access the docker locally even through the domain however not from an external IP. Pleas help
1 Like
Having the exact same issue. Have you found a solution @whitewizard ?
Hello @whitewizard
Would you please share the Traefik configuration files? Thank you,
Hi I'm having the same exact issue.
config.yml
http:
middlewares:
https-redirect:
redirectScheme:
scheme: https
default-headers:
headers:
frameDeny: true
sslRedirect: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
traefik.yml
api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
https:
address: ":443"
http:
middlewares:
- default-headers@file
tls:
certResolver: cloudflare
domains:
- main: domain
sans:
- "*.domain"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /config.yml
certificatesResolvers:
cloudflare:
acme:
email: gmail
storage: acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
docker-compose.yaml
version: '3'
services:
traefik:
image: traefik:v2.4
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- 80:80
- 443:443
environment:
- CF_API_EMAIL=Email
- CF_API_KEY=APIKEY
volumes:
- /etc/localtime:/etc/localtime
- /var/run/docker.sock:/var/run/docker.sock
- ./data/traefik.yml:/traefik.yml
- ./data/acme.json:/acme.json
- ./data/config.yml:/config.yml
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=user:password"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.routers.traefik.service=api@internal"
networks:
proxy:
external: true
I followed some guides by containero on Medium to make it use wildcardcerts and global entrypoints
Let me know if there's anymore information you need