I tried to find a solution on the community but I cannot get what I am doing wrong!
I am trying to run Portainer on docker swarm. The traefik gui loads fine and I can see the portainer service running.
Any ideas?
level=error msg="Could not define the service name for the router: too many services" providerName=docker routerName=traefik-secure
msg="service \"portainer-agent\" error: port is missing" container=portainer-agent-wdrqj7dm5hma0yhzmrthefgz1 providerName=docker
level=debug msg="Configuration received: {\"http\":{\"routers\":{\"api\":{\"entryPoints\":[\"https\"],\"service\":\"api@internal\",\"rule\":\"Host(`traefik.example.com`)\",\"tls\":{\"certResolver\":\"main\"}},\"portainer\":{\"entryPoints\":[\"https\"],\"service\":\"portainer\",\"rule\":\"Host(`portainer.example.com`)\",\"tls\":{\"certResolver\":\"main\"}}},\"services\":{\"dummy\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.1.3:9999\"}],\"passHostHeader\":true}},\"portainer\":{\"loadBalancer\":{\"servers\":[{\"url\":\"https://10.0.1.34:9000\"}],\"passHostHeader\":true}},\"traefik\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.1.3:8080\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
msg="Skipping unchanged configuration." providerName=docker
thank you for your reply. I tried with my labels (removing the https scheme as instructed) and I also tried with your setup (adapted). Still getting Bad gateway...
I also get this in the logs:
error msg="Could not define the service name for the router: too many services" routerName=traefik-secure providerName=docker
debug msg="Filtering disabled container" providerName=docker container=portainer-agent-rxrad3e1k0mr9auxja1778gje
debug msg="Configuration received: {\"http\":{\"routers\":{\"api\":{\"entryPoints\":[\"https\"],\"service\":\"api@internal\",\"rule\":\"Host(`traefik.example.com`)\",\"tls\":{\"certResolver\":\"main\"}},\"portainer\":{\"entryPoints\":[\"https\"],\"service\":\"portainer\",\"rule\":\"Host(`portainer.example.com`)\"}},\"services\":{\"dummy\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.1.3:9999\"}],\"passHostHeader\":true}},\"portainer\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.1.7:9000\"}],\"passHostHeader\":true}},\"traefik\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://10.0.1.3:8080\"}],\"passHostHeader\":true}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
debug msg="Skipping unchanged configuration." providerName=docker
I also tried your labels from your post above (with and without the "traefik.docker.network=traefik_public" and the "traefik.http.routers.portainer.entrypoints=https"
the only way I have managed to login to portainer so far is by opening
ports:
- "9443:9443"
in the portainer service file and navigating to: portainer.example.com:9443