eriksjolund / podman-traefik-socket-activation

Apache License 2.0
4 stars 0 forks source link

Socket activation listeners must have one and only one listener per name #2

Closed thyeestes closed 5 days ago

thyeestes commented 1 month ago

Hi Erik,

I want to implement your example to my environment, however I run into issues with Traefikv3.1. I want the socket to listen to both port 80 and 443, so I created the following socket file: `[Socket]

ListenStream=0.0.0.0:80 ListenStream=0.0.0.0:443 FileDescriptorName=http:https

[Install] WantedBy=sockets.target`

When I connect to my whoami container I get this error in my traefik log file: Socket activation listeners must have one and only one listener per name

Do you know how to solve this?

Thanks, Martijn

eriksjolund commented 1 month ago

Hi Martijn, I haven't tried that out but I think it should be possible. You need to use two socket unit files instead of one socket unit file, for example myhttp.socket and myhttps.socket

Add lines to the top of the file mytraefik.container

[Service] Sockets=myhttp.socket myhttps.socket

Also remove the file mytraefik.socket

(Writing this from my mobile so I'm not able to test this)

thyeestes commented 1 month ago

Thanks. I found the same suggestion on https://github.com/traefik/traefik/issues/9891

I am experiencing other strange things, but I will post an issues in the Traefik repository.

eriksjolund commented 5 days ago

I modified example1 to use two sockets, one for port 80 and one for port 443. (Example1 does not currently support HTTPS because no configuration for that has been added)