Traefik Docker container raises Provider connection error #642

Closed
opened 2024-10-14 15:19:44 +00:00 by scls19fr · 7 comments

Hello,

I'm new to Coop-Cloud. I have some (small) Docker skills (but not Swarm).
I'm following this guide https://docs.coopcloud.tech/operators/tutorial/#web-proxy-setup to install Traefik

Unfortunately when browsing to https://traefik.coopcloud.local.domain.tld I'm getting this error

Ce site est inaccessible
Il se peut que la page Web à l'adresse https://traefik.coopcloud.local.domain.tld soit temporairement inaccessible ou qu'elle ait été déplacée de façon permanente à une autre adresse Web.
ERR_SSL_UNRECOGNIZED_NAME_ALERT

My install is on top of Proxmox VE with 3 LXC containers with Docker installed (following https://gist.github.com/Drallas/e03eb5a4f68bb526f920a423455bc0c9 )

I tried to understand why I can't see Traefik dashboard despite I have

DASHBOARD_ENABLED=true

in ~/.abra/servers/coopcloud.local.domain.tld/traefik.coopcloud.local.domain.tld.env

I did

root@docker-1:~# docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED          STATUS                    PORTS     NAMES
11d96e8a204b   traefik:v2.11.10   "/custom-entrypoint.…"   10 minutes ago   Up 10 minutes (healthy)   80/tcp    traefik_coopcloud_local_domain_tld_app.1.3v9bf56mfz1fj93nxxj078jr3
root@docker-1:~# docker logs 11d96e8a204b
...
time="2024-10-14T15:05:51Z" level=error msg="Provider connection error Get \"http://socket-proxy:2375/v1.24/version\": dial tcp 10.0.2.2:2375: i/o timeout, retrying in 674.64616ms" providerName=docker

Any idea?

Hello, I'm new to Coop-Cloud. I have some (small) Docker skills (but not Swarm). I'm following this guide https://docs.coopcloud.tech/operators/tutorial/#web-proxy-setup to install Traefik Unfortunately when browsing to https://traefik.coopcloud.local.domain.tld I'm getting this error Ce site est inaccessible Il se peut que la page Web à l'adresse https://traefik.coopcloud.local.domain.tld soit temporairement inaccessible ou qu'elle ait été déplacée de façon permanente à une autre adresse Web. ERR_SSL_UNRECOGNIZED_NAME_ALERT My install is on top of Proxmox VE with 3 LXC containers with Docker installed (following https://gist.github.com/Drallas/e03eb5a4f68bb526f920a423455bc0c9 ) I tried to understand why I can't see Traefik dashboard despite I have DASHBOARD_ENABLED=true in ~/.abra/servers/coopcloud.local.domain.tld/traefik.coopcloud.local.domain.tld.env I did ``` root@docker-1:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 11d96e8a204b traefik:v2.11.10 "/custom-entrypoint.…" 10 minutes ago Up 10 minutes (healthy) 80/tcp traefik_coopcloud_local_domain_tld_app.1.3v9bf56mfz1fj93nxxj078jr3 root@docker-1:~# docker logs 11d96e8a204b ... time="2024-10-14T15:05:51Z" level=error msg="Provider connection error Get \"http://socket-proxy:2375/v1.24/version\": dial tcp 10.0.2.2:2375: i/o timeout, retrying in 674.64616ms" providerName=docker ``` Any idea?
Member

Hi,
could you also check the logs in the socket-proxy container`:

abra app logs traefik.coopcloud.local.domain.tld socket-proxy
Hi, could you also check the logs in the `socket-proxy` container`: ``` abra app logs traefik.coopcloud.local.domain.tld socket-proxy ```
Member

Hey @scls19fr and welcome to coop-cloud :)
It would help if you could change the system locale to english or translate the error message.
But from ERR_SSL_UNRECOGNIZED_NAME_ALERT I think it's something about the SSL/TLS certificate. Is traefik.coopcloud.local.domain.tld the domain you use? That could be the problem, because traefik can only get TLS certificates for domains with public DNS records. I think people were able getting treafik to run in a local environment, but this requires a special setup.
Another thing I see is that the socket-proxy container is not running.
Can you provide some abra logs:
abra app logs traefik.domain.tld socket-proxy
abra app logs traefik.domain.tld app

Hey @scls19fr and welcome to coop-cloud :) It would help if you could change the system locale to english or translate the error message. But from `ERR_SSL_UNRECOGNIZED_NAME_ALERT` I think it's something about the SSL/TLS certificate. Is `traefik.coopcloud.local.domain.tld` the domain you use? That could be the problem, because traefik can only get TLS certificates for domains with public DNS records. I think people were able getting treafik to run in a local environment, but this requires a special setup. Another thing I see is that the socket-proxy container is not running. Can you provide some abra logs: `abra app logs traefik.domain.tld socket-proxy` `abra app logs traefik.domain.tld app`
Author

Hi @p4u1 and @moritz

Sorry for not answering earlier but I didn't received email from this forge.
I end up restarting (rebuilding in fact) my Docker Swarm from scratch using this time Ubuntu VM (inside Proxmox VE) instead of LXC containers (this will probably be a more usual configuration)

socket-proxy is now running fine.

# abra app logs traefik.coopcloud.local.domain.tld socket-proxy
2024-10-15T14:18:41.818382487Z 10.0.2.4 - - [15/Oct/2024:14:18:41 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1"
2024-10-15T14:18:41.819250658Z 10.0.2.4 - - [15/Oct/2024:14:18:41 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client/1.1"
2024-10-15T14:18:50.661110313Z 10.0.2.4 - - [15/Oct/2024:14:18:50 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1"
2024-10-15T14:18:50.662359927Z 10.0.2.4 - - [15/Oct/2024:14:18:50 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client/1.1"
2024-10-15T14:18:51.110531822Z 10.0.2.4 - - [15/Oct/2024:14:18:51 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1"
2024-10-15T14:18:51.111204087Z 10.0.2.4 - - [15/Oct/2024:14:18:51 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client

but I don't see it using

root@docker-1:/home/scelles# docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED         STATUS                   PORTS     NAMES
850d39c1ec50   traefik:v2.11.10   "/custom-entrypoint.…"   8 minutes ago   Up 8 minutes (healthy)   80/tcp    traefik_coopcloud_local_domain_tld_app.1.0a3ni661lx4v1r8643z94q3s0

moreover

abra app logs traefik.coopcloud.local.domain.tld app
2024-10-15T14:19:50.515786928Z time="2024-10-15T14:19:50Z" level=error msg="Provider connection error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager., retrying in 9.450736083s" providerName=docker
d2024-10-15T14:19:59.974133708Z time="2024-10-15T14:19:59Z" level=error msg="Failed to list services for docker swarm mode, error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager." providerName=docker
d2024-10-15T14:19:59.974215009Z time="2024-10-15T14:19:59Z" level=error msg="Provider connection error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager., retrying in 16.427069176s" providerName=dock
# docker node ls
ID                            HOSTNAME   STATUS    AVAILABILITY   MANAGER STATUS   ENGINE VERSION
jycmv7ew2545nwcfjfkjip0ko *   docker-1   Ready     Active         Leader           27.3.1
k33y2jghsq6jgqzvqcbwoqo8y     docker-2   Ready     Active                          27.3.1
7mj9m4z03uh7vssbwh0mh0q4d     docker-3   Ready     Active                          27.3.1

Any idea?

Hi @p4u1 and @moritz Sorry for not answering earlier but I didn't received email from this forge. I end up restarting (rebuilding in fact) my Docker Swarm from scratch using this time Ubuntu VM (inside Proxmox VE) instead of LXC containers (this will probably be a more usual configuration) socket-proxy is now running fine. ``` # abra app logs traefik.coopcloud.local.domain.tld socket-proxy 2024-10-15T14:18:41.818382487Z 10.0.2.4 - - [15/Oct/2024:14:18:41 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1" 2024-10-15T14:18:41.819250658Z 10.0.2.4 - - [15/Oct/2024:14:18:41 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client/1.1" 2024-10-15T14:18:50.661110313Z 10.0.2.4 - - [15/Oct/2024:14:18:50 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1" 2024-10-15T14:18:50.662359927Z 10.0.2.4 - - [15/Oct/2024:14:18:50 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client/1.1" 2024-10-15T14:18:51.110531822Z 10.0.2.4 - - [15/Oct/2024:14:18:51 +0000] "GET /v1.24/version HTTP/1.1" 200 822 "-" "Go-http-client/1.1" 2024-10-15T14:18:51.111204087Z 10.0.2.4 - - [15/Oct/2024:14:18:51 +0000] "GET /v1.24/services HTTP/1.1" 503 192 "-" "Go-http-client ``` but I don't see it using ``` root@docker-1:/home/scelles# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 850d39c1ec50 traefik:v2.11.10 "/custom-entrypoint.…" 8 minutes ago Up 8 minutes (healthy) 80/tcp traefik_coopcloud_local_domain_tld_app.1.0a3ni661lx4v1r8643z94q3s0 ``` moreover ``` abra app logs traefik.coopcloud.local.domain.tld app 2024-10-15T14:19:50.515786928Z time="2024-10-15T14:19:50Z" level=error msg="Provider connection error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager., retrying in 9.450736083s" providerName=docker d2024-10-15T14:19:59.974133708Z time="2024-10-15T14:19:59Z" level=error msg="Failed to list services for docker swarm mode, error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager." providerName=docker d2024-10-15T14:19:59.974215009Z time="2024-10-15T14:19:59Z" level=error msg="Provider connection error Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager., retrying in 16.427069176s" providerName=dock ``` ``` # docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION jycmv7ew2545nwcfjfkjip0ko * docker-1 Ready Active Leader 27.3.1 k33y2jghsq6jgqzvqcbwoqo8y docker-2 Ready Active 27.3.1 7mj9m4z03uh7vssbwh0mh0q4d docker-3 Ready Active 27.3.1 ``` Any idea?
Member

So it seems like you have 3 nodes. Note the that using coopcloud with multi node swarm setup is not really supported (or at least I don't know anyone running such a setup). If you still wasn't to continue on that road you need to adjust the traefik recipe and make sure the socket proxy container gets deployed on a manager. This can be done in the deploy config

So it seems like you have 3 nodes. Note the that using coopcloud with multi node swarm setup is not really supported (or at least I don't know anyone running such a setup). If you still wasn't to continue on that road you need to adjust the traefik recipe and make sure the socket proxy container gets deployed on a manager. This can be done in the deploy config
Author

Sorry for my newbie question but what is interest of using Docker Swarm with only one node ?
I will not continue on that road (because I'm not skilled enough on this kind of configuration) and will use only one node.

Sorry for my newbie question but what is interest of using Docker Swarm with only one node ? I will not continue on that road (because I'm not skilled enough on this kind of configuration) and will use only one node.
Owner

@scls19fr in practice, single node is really "good enough" for most small/medium-scale things and it saves cash. with some effort on the backups solution, you are still resilient. migrating a single swarm is easy ("just bring /var/lib/docker/ with you"). a lot of Co-op Cloud is just making it easy/cost-effective to do hosting (which few are willing to pay much for...)

@scls19fr in practice, single node is really "good enough" for most small/medium-scale things and it saves cash. with some effort on the backups solution, you are still resilient. migrating a single swarm is easy ("just bring `/var/lib/docker/` with you"). a lot of Co-op Cloud is just making it easy/cost-effective to do hosting (which few are willing to pay much for...)
Author

Ok so let's close it as it working fine now with one node.
Thanks @p4u1 @moritz and @decentral1se

Ok so let's close it as it working fine now with one node. Thanks @p4u1 @moritz and @decentral1se
Sign in to join this conversation.
No description provided.