Hello,
I have the following problems maybe someone can help me? Thanks in advance
I try to start a reverse proxy service with the following compose file
version: '3.3'
services:
reverse-proxy:
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.endpoint=tcp://127.0.0.1:2377"
- "--providers.docker.swarmMode=true"
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints:
- node.role == manager
networks:
default:
external:
name: imixs-proxy-net
unfortunately the log file reports the following
- level=error msg="Failed to retrieve information of the docker client and server host: Cannot connect to the Docker daemon at tcp://127.0.0.1:2377. Is the docker daemon running?" providerName=docker,
- level=error msg="Provider connection error Cannot connect to the Docker daemon at tcp://127.0.0.1:2377. is the docker daemon running?, retrying in 8.304770066s" providerName=docker,
or when I change to " - "--providers.docker.endpoint=tcp://127.0.0.1:2375""
- level=error msg="Failed to retrieve information of the docker client and server host: Cannot connect to the Docker daemon at tcp://127.0.0.1:2375. Is the docker daemon running?" providerName=docker,
- level=error msg="Provider connection error Cannot connect to the Docker daemon at tcp://127.0.0.1:2375. is the docker daemon running?, retrying in 8.304770066s" providerName=docker,
I'm not sure which port to use? 2377? My two nodes were included with the following command
- docker swarm join --token SWMTKN-1-681fxfby12y7a62n6vj890CCCCCC 51.75.YX.ABC:2377
the documentation is different (see atachement) but I gues it should be 2377
Cluster is up and running so i think the nodes can communicate with the master over 2377
from https://docs.traefik.io/providers/docker/
The two services are started with the following commands
- sudo docker stack deploy -c ./management/traefik/docker-compose.yml reverse-proxy
- sudo docker stack deploy -c ./apps/whoami/docker-compose.yml whoami
Here is the compose file of the whoami service, which I will use to test if it works
version: '3.3'
services:
whoami:
# A container that exposes an API to show its IP address
image: containous/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.bpmspace.net`)"
- "traefik.http.services.whoami.loadbalancer.server.port=8080"
networks:
default:
external:
name: imixs-proxy-net
But first I have the upper problem, by the way, no matter with which port I try ...
Thanks rob
PS Portainer also runs on the Master.