I am using Proxmox to host a server. I cam creating a new Alpine LXC container to place the traefik binary. I am using Ansible to build the Alpine container and I am using Ansible to install traefik in that container. I am using the latest version 2.9.6
I have all of this working. Traefik, however, is saying Error while starting server: accept tcp [::]:80: use of closed network connection entryPointName=web
for any port I use. have tried from 8081 18080 to 65080 and it always repeats the same error.
I am able to connect to port 80 however in this container from a different machine.
Proxmox server has net.ipv4.ip_forward=1
set
How do I get traefik to work?
traefik.yml.j2
---
entryPoints:
web:
address: :80
providers:
file:
directory: /etc/traefik/config
watch: true
api:
dashboard: false
insecure: false
serversTransport:
insecureSkipVerify: true
Log looks like this, I have to stop the command because nothing ever happens
INFO[0000] Configuration loaded from file: /etc/traefik/traefik.yml
^CERRO[2023-01-05T18:19:15Z] accept tcp [::]:80: use of closed network connection entryPointName=web
ERRO[2023-01-05T18:19:15Z] close tcp [::]:80: use of closed network connection entryPointName=web
I setcap with Ansible
- name: Set port binding capability on Traefik
community.general.capabilities:
path: /bin/traefik
capability: cap_net_bind_service+ep
state: present
I have also done it manually and it still does not work
setcap CAP_NET_BIND_SERVICE=+eip /bin/traefik
Additionally, I know that Traefik works this way because I've gotten it to work with k8s using this guide: k3s in LXC on Proxmox ยท GitHub
I don't understand why I can't use traefik on any port for this container I've built