Are the consul and docker swarm configuration backends compatible?
My requirement is that I need to start N traefik containers as a docker service, where they get their dynamic frontends/backends via docker swarm but I also need all N of the traefik containers to use a shared ACME config (i.e. sourced from consul).
I'd like it so that Frontends/backends info should come from the docker swarm, while the ACME config should come from consul. As far as any other static traefik configs, i'm fine if it comes from a static file, but this really won't work for the ACME.json as a file via a volumne because how would locks for writes be managed? The only option I see is the consul KV store for that.
The issue i see is that this kind of setup is not possible?
Traefik version v1.3.0 built on 2017-05-31_05:48:42PM
Uploaded my TOML config into consul KV which looks like this: (stored under "traefik-stage" root in consul KV)
defaultEntryPoints = ["http", "https"]
debug=true
logLevel="DEBUG"
InsecureSkipVerify=true
[web]
address = ":8080"
[web.statistics]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
acmeLogging=true
onDemand=true
entryPoint="https"
OnHostRule=true
caServer="https://acme-v01.api.letsencrypt.org/directory"
email="obgt.letsencrypt#my-domain.com"
storage="traefik-stage/acme/account"
# TRIED BOTH WITH AND WITHOUT
# THE DOCKER CONFIG LOADED INTO CONSUL
# AND AS command line flags.... to no avail
[docker]
swarmmode=true
domain="traefik"
watch=true
[[acme.domains]]
main = "local1.com"
[[acme.domains]]
main = "myapp1.my-domain.com"
sans = ["myapp1-stage.my-domain.com"]
[[acme.domains]]
main = "myapp2.my-domain.com"
sans = ["myapp2-stage.my-domain.com"]
Started traefik with:
docker service create \
--name traefik \
--constraint=node.role==manager \
--publish 80:80 \
--publish 8080:8080 \
--publish 443:443 \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--network my-net \
-e "CONSUL_HTTP_TOKEN=xxxxxx" \
traefik \
--consul \
--consul.endpoint=my-consul.my-domain.com:8500 \
--consul.watch=true \
--consul.prefix="traefik-stage"
NOTE! tried both with and without the docker flags in either consul or as command line flags to no avail:
--docker \
--docker.swarmmode \
--docker.domain=traefik \
--docker.watch
Next started my N other docker services that I want traefik to proxy, each started w/ the relevant flags as such
...
--publish :9000
--label traefik.protocol=https
--label traefik.port=9000
--label traefik.frontend.rule='Host:myapp1.my-domain.com,myapp1-stage.my-domain.com'
--label traefik.docker.network=my-net
--network my-net
...
Note this above setup (with traefik config fully in TOML file, not in consul) works fine
What I you expect to see?
When I go to http://localhost:8080/dashboard/#/ I see my 2 frontends/backends appropriately discovered via traefik and setup properly as they work w/out consul
What did I see instead?
Nothing in the UI, however the logs show evidence that traefik is indeed getting the frontend/backend info from docker and wiring it up. But nothing shows in the UI nor does any of the actual routing work for those hosts.
Log output
2017-06-09T16:22:38.049816971Z time="2017-06-09T16:22:38Z" level=info msg="Traefik version v1.3.0 built on 2017-05-31_05:48:42PM"
2017-06-09T16:22:38.056705032Z time="2017-06-09T16:22:38Z" level=debug msg="Global configuration loaded {"GraceTimeOut":10000000000,"Debug":true,"CheckNewVersion":true,"AccessLogsFile":"","TraefikLogsFile":"","LogLevel":"DEBUG","EntryPoints":{"http":{"Network":"","Address":":80","TLS":null,"Redirect":null,"Auth":null,"Compress":false},"https":{"Network":"","Address":":443","TLS":{"MinVersion":"","CipherSuites":null,"Certificates":null,"ClientCAFiles":null},"Redirect":null,"Auth":null,"Compress":false}},"Cluster":{"Node":"1ae7b5d5-9382-4a67-b608-1e39e6fba1e5","Store":{"Store":{},"Prefix":"traefik-stage"}},"Constraints":[],"ACME":{"Email":"letsencrypt#my-domain.com","Domains":[{"Main":"local1.com","SANs":null},{"Main":"myapp1.my-domain.com","SANs":["myapp1-stage.my-domain.com"]},{"Main":"myapp2.my-domain.com","SANs":["myapp2-stage.my-domain.com"]}],"Storage":"","StorageFile":"/var/run/acme.json","OnDemand":true,"OnHostRule":true,"CAServer":"https://acme-v01.api.letsencrypt.org/directory","EntryPoint":"https","DNSProvider":"","DelayDontCheckDNS":0,"ACMELogging":true,"TLSConfig":null},"DefaultEntryPoints":["http","https"],"ProvidersThrottleDuration":2000000000,"MaxIdleConnsPerHost":200,"IdleTimeout":180000000000,"InsecureSkipVerify":true,"Retry":null,"HealthCheck":{"Interval":30000000000},"Docker":{"Watch":true,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"traefik","TLS":null,"ExposedByDefault":true,"UseBindPortIP":false,"SwarmMode":true},"File":null,"Web":{"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Path":"","Auth":null},"Marathon":null,"Consul":{"Watch":true,"Filename":"","Constraints":[],"Endpoint":"my-consul.my-domain.com:8500","Prefix":"traefik-stage","TLS":null,"Username":"","Password":""},"ConsulCatalog":null,"Etcd":null,"Zookeeper":null,"Boltdb":null,"Kubernetes":null,"Mesos":null,"Eureka":null,"ECS":null,"Rancher":null,"DynamoDB":null}"
2017-06-09T16:22:38.056793712Z time="2017-06-09T16:22:38Z" level=info msg="Preparing server https &{Network: Address::443 TLS:0xc420065260 Redirect:<nil> Auth:<nil> Compress:false}"
2017-06-09T16:22:38.303980631Z time="2017-06-09T16:22:38Z" level=warning msg="ACME.StorageFile is deprecated, use ACME.Storage instead"
2017-06-09T16:22:38.304036333Z time="2017-06-09T16:22:38Z" level=info msg="Preparing server http &{Network: Address::80 TLS:<nil> Redirect:<nil> Auth:<nil> Compress:false}"
2017-06-09T16:22:38.304047560Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *docker.Provider {"Watch":true,"Filename":"","Constraints":null,"Endpoint":"unix:///var/run/docker.sock","Domain":"traefik","TLS":null,"ExposedByDefault":true,"UseBindPortIP":false,"SwarmMode":true}"
2017-06-09T16:22:38.304056909Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *server.WebProvider {"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":{"RecentErrors":10},"Metrics":null,"Path":"","Auth":null}"
2017-06-09T16:22:38.304063376Z time="2017-06-09T16:22:38Z" level=info msg="Starting server on :443"
2017-06-09T16:22:38.304067569Z time="2017-06-09T16:22:38Z" level=info msg="Starting provider *consul.Provider {"Watch":true,"Filename":"","Constraints":[],"Endpoint":"myconsul.my-domain.com:8500","Prefix":"traefik-stage","TLS":null,"Username":"","Password":""}"
2017-06-09T16:22:38.304086381Z time="2017-06-09T16:22:38Z" level=info msg="Starting server on :80"
2017-06-09T16:22:38.304091503Z time="2017-06-09T16:22:38Z" level=debug msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 running for election"
2017-06-09T16:22:38.304095943Z time="2017-06-09T16:22:38Z" level=info msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 elected slave ♝"
2017-06-09T16:22:38.305221709Z time="2017-06-09T16:22:38Z" level=debug msg="Provider connection established with docker 17.03.1-ce (API 1.27)"
2017-06-09T16:22:38.316537086Z time="2017-06-09T16:22:38Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:22:38.318032177Z time="2017-06-09T16:22:38Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:38.318079837Z time="2017-06-09T16:22:38Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:38.318543316Z time="2017-06-09T16:22:38Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:22:38.318768669Z time="2017-06-09T16:22:38Z" level=debug msg="Last docker config received more than 2s, OK"
2017-06-09T16:22:38.318851649Z time="2017-06-09T16:22:38Z" level=debug msg="Creating frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com"
2017-06-09T16:22:38.318862832Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:38.318870901Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:38.318885668Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318890613Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.318894858Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:38.318899165Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:38.318903534Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:38.318964111Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318969668Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.318974033Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:38.318978435Z time="2017-06-09T16:22:38Z" level=debug msg="Creating frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com"
2017-06-09T16:22:38.318982839Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:38.318987264Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:38.318991884Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.318996168Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.319385909Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:38.319427537Z time="2017-06-09T16:22:38Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:38.319449626Z time="2017-06-09T16:22:38Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:38.319461465Z time="2017-06-09T16:22:38Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:38.319476110Z time="2017-06-09T16:22:38Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:38.319484326Z time="2017-06-09T16:22:38Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:38.319499644Z time="2017-06-09T16:22:38Z" level=info msg="Server configuration reloaded on :443"
2017-06-09T16:22:38.319505207Z time="2017-06-09T16:22:38Z" level=info msg="Server configuration reloaded on :80"
2017-06-09T16:22:38.617268318Z time="2017-06-09T16:22:38Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:38.735038061Z time="2017-06-09T16:22:38Z" level=info msg="Node 1ae7b5d5-9382-4a67-b608-1e39e6fba1e5 elected leader ♚"
2017-06-09T16:22:38.735155690Z time="2017-06-09T16:22:38Z" level=info msg="Starting ACME renew job..."
2017-06-09T16:22:38.832338566Z time="2017-06-09T16:22:38Z" level=debug msg="Transaction aac18cfa-9e66-44c1-9ca4-0433e6d6e0bc begins"
2017-06-09T16:22:38.832743436Z time="2017-06-09T16:22:38Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:38.832775050Z time="2017-06-09T16:22:38Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:38.922562919Z time="2017-06-09T16:22:38Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:39.079982533Z time="2017-06-09T16:22:39Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:39.080049684Z time="2017-06-09T16:22:39Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:39.103499147Z time="2017-06-09T16:22:39Z" level=error msg="Error calling Leadership listener: failed to acquire lock: Invalid key. Key must not begin with a '/': /var/run/acme.json/lock"
2017-06-09T16:22:39.166044562Z time="2017-06-09T16:22:39Z" level=debug msg="Cannot get key traefik-stage/alias Key not found in store, setting default traefik-stage"
2017-06-09T16:22:39.370791846Z time="2017-06-09T16:22:39Z" level=debug msg="Configuration received from provider consul: {}"
2017-06-09T16:22:39.370938439Z time="2017-06-09T16:22:39Z" level=debug msg="Last consul config received less than 2s, waiting..."
2017-06-09T16:22:41.374581362Z time="2017-06-09T16:22:41Z" level=debug msg="Waited for consul config, OK"
2017-06-09T16:22:41.374643174Z time="2017-06-09T16:22:41Z" level=debug msg="Creating frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com"
2017-06-09T16:22:41.374688194Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:41.374695851Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:41.374702925Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.374733438Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.374741833Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:41.374839405Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:41.374854017Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"
2017-06-09T16:22:41.375226321Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375243069Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375250166Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.3:9000 with weight 0"
2017-06-09T16:22:41.375256492Z time="2017-06-09T16:22:41Z" level=debug msg="Creating frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com"
2017-06-09T16:22:41.375262419Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint http"
2017-06-09T16:22:41.375272098Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:41.375278891Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375284443Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375335382Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:41.375344359Z time="2017-06-09T16:22:41Z" level=debug msg="Wiring frontend frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com to entryPoint https"
2017-06-09T16:22:41.375350512Z time="2017-06-09T16:22:41Z" level=debug msg="Creating route route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"
2017-06-09T16:22:41.375356724Z time="2017-06-09T16:22:41Z" level=debug msg="Creating backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl"
2017-06-09T16:22:41.375362361Z time="2017-06-09T16:22:41Z" level=debug msg="Creating load-balancer wrr"
2017-06-09T16:22:41.375367938Z time="2017-06-09T16:22:41Z" level=debug msg="Creating server server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1 at https://10.0.3.7:9000 with weight 0"
2017-06-09T16:22:41.375373661Z time="2017-06-09T16:22:41Z" level=info msg="Server configuration reloaded on :443"
2017-06-09T16:22:41.375379195Z time="2017-06-09T16:22:41Z" level=info msg="Server configuration reloaded on :80"
2017-06-09T16:22:53.337794486Z time="2017-06-09T16:22:53Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:22:53.339047817Z time="2017-06-09T16:22:53Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:53.339101405Z time="2017-06-09T16:22:53Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:22:53.339251375Z time="2017-06-09T16:22:53Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:22:53.339299039Z time="2017-06-09T16:22:53Z" level=info msg="Skipping same configuration for provider docker"
2017-06-09T16:23:08.335094957Z time="2017-06-09T16:23:08Z" level=debug msg="Filtering container without port and no traefik.port label traefik.1"
2017-06-09T16:23:08.336505132Z time="2017-06-09T16:23:08Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:23:08.336551553Z time="2017-06-09T16:23:08Z" level=debug msg="Validation of load balancer method for backend backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl failed: invalid load-balancing method ''. Using default method wrr."
2017-06-09T16:23:08.336675752Z time="2017-06-09T16:23:08Z" level=debug msg="Configuration received from provider docker: {"backends":{"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.3:9000","weight":0}},"loadBalancer":{"method":"wrr"}},"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl":{"servers":{"server-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl-1":{"url":"https://10.0.3.7:9000","weight":0}},"loadBalancer":{"method":"wrr"}}},"frontends":{"frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp1-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp1-my-domain-com-myapp1-stage-my-domain-com":{"rule":"Host:myapp1.my-domain.com,myapp1-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]},"frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"entryPoints":["http","https"],"backend":"backend-ddd-myapp2-stage-2-2-0-2-0-0-0-ssl","routes":{"route-frontend-Host-myapp2-my-domain-com-myapp2-stage-my-domain-com":{"rule":"Host:myapp2.my-domain.com,myapp2-stage.my-domain.com"}},"passHostHeader":true,"priority":0,"basicAuth":[]}}}"
2017-06-09T16:23:08.336718473Z time="2017-06-09T16:23:08Z" level=info msg="Skipping same configuration for provider docker"
If the above is not possible.... what is the recommended setup for such a requirement? i.e. N traefik instances, using shared configs, shared ACME, but frontend/backend sourced from docker.
Note this was due to an issue in the UI that was fixed by: https://github.com/containous/traefik/pull/1757
Related
I've got a error in docker starting process
Error initializing network controller: Error creating default "bridge"
network: failed to check bridge interface existence: no buffer space
available
below is the error tracking:
INFO[2021-06-11T04:11:19.243123905Z] Starting up
INFO[2021-06-11T04:11:19.244395780Z] parsed scheme: "unix" module=grpc
INFO[2021-06-11T04:11:19.244560010Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-06-11T04:11:19.244707290Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-06-11T04:11:19.244885240Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-06-11T04:11:19.246091201Z] parsed scheme: "unix" module=grpc
INFO[2021-06-11T04:11:19.246243462Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-06-11T04:11:19.246383162Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-06-11T04:11:19.246511172Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-06-11T04:11:19.252291567Z] [graphdriver] using prior storage driver: overlay2
INFO[2021-06-11T04:11:19.253495388Z] Loading containers: start.
INFO[2021-06-11T04:11:19.284746098Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: failed to check bridge interface existence: no buffer space available
I found nothing by using google and internet, maybe nobody met this error before?
ok guys, finally I found the solution, that is ipv6, yes
when u enabled ipv6 in ur vmware linux that will occur this error if u didnt configure the ipv6 settings of docker # /etc/docker/daemon.json and didnt set the ipv6 cidr
there are two places that must be configured with ipv6 options, ipv.disable=false in
/boot/grub2/grub.cfg and ipv6 switch in /etc/sysconfig/network-scripts/ifcfg-xxx
done
I have install Docker version 20.10.4 on Windows Server 2016 (10.0 14393) to be able to run Windows Container (Linux container is not in my scope).
I try to pull image "mcr.microsoft.com/windows/nanoserver:sac2016" but it failed (after download) when extracting with following error :
C:\Windows\system32>docker pull mcr.microsoft.com/windows/nanoserver:sac2016
sac2016: Pulling from windows/nanoserver
bce2fbc256ea: Extracting [==================================================>] 252.7MB/252.7MB
6f2071dcd729: Download complete
failed to register layer: re-exec error: exit status 1:
output: hcsshim::ProcessBaseLayer \\?\D:\DockerData\windowsfilter\4fba31d282f754bb1d6207bd0395cb02b580a75c495
414058b56b401bad40026:Access is denied.
I have start dockerd manually (via command dockerd --exec-opt isolation=process -D --log-level=debug --data-root="D:\DockerData") and last line is :
output: hcsshim::ProcessBaseLayer \\\\?\\D:\\DockerData\\windowsfilter\\f967f....47766: Access is denied.
complete output :
time="2021-05-04T22:50:46.230069500-04:00" level=info msg="Starting up"
time="2021-05-04T22:50:46.234070000-04:00" level=debug msg="Listener created for HTTP on npipe (//./pipe/docker_engine)"time="2021-05-04T22:50:46.239070000-04:00" level=info msg="Windows default isolation mode: process"
time="2021-05-04T22:50:46.239070000-04:00" level=debug msg="Stackdump - waiting signal at Global\\stackdump-8008"
time="2021-05-04T22:50:46.240070800-04:00" level=debug msg="Using default logging driver json-file"
time="2021-05-04T22:50:46.240070800-04:00" level=debug msg="[graphdriver] trying provided driver: windowsfilter"
time="2021-05-04T22:50:46.240070800-04:00" level=debug msg="WindowsGraphDriver InitFilter at D:\\DockerData\\windowsfilter"
time="2021-05-04T22:50:46.240070800-04:00" level=debug msg="Initialized graph driver windowsfilter"
time="2021-05-04T22:50:46.240070800-04:00" level=debug msg="No quota support for local volumes in D:\\DockerData\\volumes: Filesystem does not support, or has not enabled quotas"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Max Concurrent Downloads: 3"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Max Concurrent Uploads: 5"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Max Download Attempts: 5"
time="2021-05-04T22:50:46.250074100-04:00" level=info msg="Loading containers: start."
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Option Experimental: false"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Option DefaultDriver: nat"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Option DefaultNetwork: nat"
time="2021-05-04T22:50:46.250074100-04:00" level=debug msg="Network Control Plane MTU: 1500"
time="2021-05-04T22:50:46.251073400-04:00" level=info msg="Restoring existing overlay networks from HNS into docker"
time="2021-05-04T22:50:46.251073400-04:00" level=debug msg="[GET]=>[/networks/] Request : "
time="2021-05-04T22:50:46.258075000-04:00" level=debug msg="Network Response : [ { \"CurrentEndpointCount\" : 0, \"ExternalInterfaceAddress\" : \"00-50-56-92-F7-4C\", \"ID\" : \"955f2216-b35d-44bb-8882-ff89790c3587\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-CF-7F-FF\", \"StartMacAddress\" : \"00-15-5D-CF-70-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"NATName\" : \"H955f2216-b35d-44bb-8882-ff89790c3587\", \"Name\" : \"nat\", \"Policies\" : [ ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.21.0.0/20\", \"GatewayAddress\" : \"172.21.0.1\" } ], \"SwitchGuid\" : \"f8f84d6d-20ca-48c2-b354-b8e43fa03681\", \"TotalEndpoints\" : 0, \"Type\" : \"nat\", \"Version\" : 4294967297 } ]"
time="2021-05-04T22:50:46.260075800-04:00" level=debug msg="Network nat (359449a) restored"
time="2021-05-04T22:50:46.264082600-04:00" level=debug msg="[GET]=>[/networks/] Request : "
time="2021-05-04T22:50:46.269077200-04:00" level=debug msg="Network Response : [ { \"CurrentEndpointCount\" : 0, \"ExternalInterfaceAddress\" : \"00-50-56-92-F7-4C\", \"ID\" : \"955f2216-b35d-44bb-8882-ff89790c3587\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-CF-7F-FF\", \"StartMacAddress\" : \"00-15-5D-CF-70-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"NATName\" : \"H955f2216-b35d-44bb-8882-ff89790c3587\", \"Name\" : \"nat\", \"Policies\" : [ ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.21.0.0/20\", \"GatewayAddress\" : \"172.21.0.1\" } ], \"SwitchGuid\" : \"f8f84d6d-20ca-48c2-b354-b8e43fa03681\", \"TotalEndpoints\" : 0, \"Type\" : \"nat\", \"Version\" : 4294967297 } ]"
time="2021-05-04T22:50:46.270081900-04:00" level=debug msg="Launching DNS server for network \"none\""
time="2021-05-04T22:50:46.287367700-04:00" level=debug msg="releasing IPv4 pools from network nat (359449af67f8444ab8cfba4fa4dabd849ef57eeb21f918af9e308f1fabbf5cc2)"
time="2021-05-04T22:50:46.287367700-04:00" level=debug msg="ReleaseAddress(172.21.0.0/20, 172.21.0.1)"
time="2021-05-04T22:50:46.288366100-04:00" level=debug msg="ReleasePool(172.21.0.0/20)"
time="2021-05-04T22:50:46.297123600-04:00" level=debug msg="cleanupServiceDiscovery for network:359449af67f8444ab8cfba4fa4dabd849ef57eeb21f918af9e308f1fabbf5cc2"
time="2021-05-04T22:50:46.298128800-04:00" level=debug msg="cleanupServiceBindings for 359449af67f8444ab8cfba4fa4dabd849ef57eeb21f918af9e308f1fabbf5cc2"
time="2021-05-04T22:50:46.311341600-04:00" level=debug msg="Allocating IPv4 pools for network nat (359449af67f8444ab8cfba4fa4dabd849ef57eeb21f918af9e308f1fabbf5cc2)"
time="2021-05-04T22:50:46.311341600-04:00" level=debug msg="RequestPool(LocalDefault, 172.21.0.0/20, , map[], false)"
time="2021-05-04T22:50:46.312338500-04:00" level=debug msg="RequestAddress(172.21.0.0/20, 172.21.0.1, map[RequestAddressType:com.docker.network.gateway])"
time="2021-05-04T22:50:46.312338500-04:00" level=debug msg="[GET]=>[/endpoints/] Request : "
time="2021-05-04T22:50:46.318336200-04:00" level=debug msg="Network Response : [ ]"
time="2021-05-04T22:50:46.324346600-04:00" level=debug msg="Launching DNS server for network \"nat\""
time="2021-05-04T22:50:46.324346600-04:00" level=debug msg="[GET]=>[/networks/955f2216-b35d-44bb-8882-ff89790c3587] Request : "
time="2021-05-04T22:50:46.330336400-04:00" level=debug msg="Network Response : { \"CurrentEndpointCount\" : 0, \"ExternalInterfaceAddress\" : \"00-50-56-92-F7-4C\", \"ID\" : \"955f2216-b35d-44bb-8882-ff89790c3587\", \"MacPools\" : [ { \"EndMacAddress\" : \"00-15-5D-CF-7F-FF\", \"StartMacAddress\" : \"00-15-5D-CF-70-00\" } ], \"MaxConcurrentEndpoints\" : 0, \"NATName\" : \"H955f2216-b35d-44bb-8882-ff89790c3587\", \"Name\" : \"nat\", \"Policies\" : [ ], \"Subnets\" : [ { \"AddressPrefix\" : \"172.21.0.0/20\", \"GatewayAddress\" : \"172.21.0.1\" } ], \"SwitchGuid\" : \"f8f84d6d-20ca-48c2-b354-b8e43fa03681\", \"TotalEndpoints\" : 0, \"Type\" : \"nat\", \"Version\" : 4294967297 }"
time="2021-05-04T22:50:46.330336400-04:00" level=debug msg="Binding a resolver on network nat gateway 172.21.0.1"
time="2021-05-04T22:50:46.330336400-04:00" level=error msg="Resolver Setup/Start failed for container nat, \"error in opening name server socket listen udp 172.21.0.1:53: bind: The requested address is not valid in its context.\""
time="2021-05-04T22:50:47.332425400-04:00" level=debug msg="Binding a resolver on network nat gateway 172.21.0.1"
time="2021-05-04T22:50:47.332508100-04:00" level=error msg="Resolver Setup/Start failed for container nat, \"error in opening name server socket listen udp 172.21.0.1:53: bind: The requested address is not valid in its context.\""
time="2021-05-04T22:50:48.334572000-04:00" level=debug msg="Binding a resolver on network nat gateway 172.21.0.1"
time="2021-05-04T22:50:48.334642500-04:00" level=error msg="Resolver Setup/Start failed for container nat, \"error in opening name server socket listen udp 172.21.0.1:53: bind: The requested address is not valid in its context.\""
time="2021-05-04T22:50:49.350169300-04:00" level=info msg="Loading containers: done."
time="2021-05-04T22:50:49.351166500-04:00" level=info msg="Docker daemon" commit=b24528647a graphdriver(s)=windowsfilter version=20.10.4
time="2021-05-04T22:50:49.352166600-04:00" level=info msg="starting telemetry service"
time="2021-05-04T22:50:49.352166600-04:00" level=debug msg="Docker daemon will send anonymous usage telemetry"
time="2021-05-04T22:50:49.353167400-04:00" level=info msg="Daemon has completed initialization"
time="2021-05-04T22:50:49.358166300-04:00" level=debug msg="Registering routers"
time="2021-05-04T22:50:49.358166300-04:00" level=debug msg="Registering GET, /containers/{name:.*}/checkpoints"
time="2021-05-04T22:50:49.358166300-04:00" level=debug msg="Config reload - waiting signal at Global\\docker-daemon-config-8008"
time="2021-05-04T22:50:49.359170200-04:00" level=debug msg="Registering POST, /containers/{name:.*}/checkpoints"
time="2021-05-04T22:50:49.359170200-04:00" level=debug msg="Registering DELETE, /containers/{name}/checkpoints/{checkpoint}"
time="2021-05-04T22:50:49.360165100-04:00" level=debug msg="Registering HEAD, /containers/{name:.*}/archive"
time="2021-05-04T22:50:49.360165100-04:00" level=debug msg="Registering GET, /containers/json"
time="2021-05-04T22:50:49.360165100-04:00" level=debug msg="Registering GET, /containers/{name:.*}/export"
time="2021-05-04T22:50:49.361165500-04:00" level=debug msg="Registering GET, /containers/{name:.*}/changes"
time="2021-05-04T22:50:49.363171000-04:00" level=debug msg="Registering GET, /containers/{name:.*}/json"
time="2021-05-04T22:50:49.363171000-04:00" level=debug msg="Registering GET, /containers/{name:.*}/top"
time="2021-05-04T22:50:49.364165500-04:00" level=debug msg="Registering GET, /containers/{name:.*}/logs"
time="2021-05-04T22:50:49.364165500-04:00" level=debug msg="Registering GET, /containers/{name:.*}/stats"
time="2021-05-04T22:50:49.365171100-04:00" level=debug msg="Registering GET, /containers/{name:.*}/attach/ws"
time="2021-05-04T22:50:49.365171100-04:00" level=debug msg="Registering GET, /exec/{id:.*}/json"
time="2021-05-04T22:50:49.365171100-04:00" level=debug msg="Registering GET, /containers/{name:.*}/archive"
time="2021-05-04T22:50:49.366169100-04:00" level=debug msg="Registering POST, /containers/create"
time="2021-05-04T22:50:49.366169100-04:00" level=debug msg="Registering POST, /containers/{name:.*}/kill"
time="2021-05-04T22:50:49.366169100-04:00" level=debug msg="Registering POST, /containers/{name:.*}/pause"
time="2021-05-04T22:50:49.367169100-04:00" level=debug msg="Registering POST, /containers/{name:.*}/unpause"
time="2021-05-04T22:50:49.367169100-04:00" level=debug msg="Registering POST, /containers/{name:.*}/restart"
time="2021-05-04T22:50:49.367169100-04:00" level=debug msg="Registering POST, /containers/{name:.*}/start"
time="2021-05-04T22:50:49.368168800-04:00" level=debug msg="Registering POST, /containers/{name:.*}/stop"
time="2021-05-04T22:50:49.368168800-04:00" level=debug msg="Registering POST, /containers/{name:.*}/wait"
time="2021-05-04T22:50:49.368168800-04:00" level=debug msg="Registering POST, /containers/{name:.*}/resize"
time="2021-05-04T22:50:49.369169200-04:00" level=debug msg="Registering POST, /containers/{name:.*}/attach"
time="2021-05-04T22:50:49.369169200-04:00" level=debug msg="Registering POST, /containers/{name:.*}/copy"
time="2021-05-04T22:50:49.369169200-04:00" level=debug msg="Registering POST, /containers/{name:.*}/exec"
time="2021-05-04T22:50:49.369169200-04:00" level=debug msg="Registering POST, /exec/{name:.*}/start"
time="2021-05-04T22:50:49.370167200-04:00" level=debug msg="Registering POST, /exec/{name:.*}/resize"
time="2021-05-04T22:50:49.370167200-04:00" level=debug msg="Registering POST, /containers/{name:.*}/rename"
time="2021-05-04T22:50:49.371166400-04:00" level=debug msg="Registering POST, /containers/{name:.*}/update"
time="2021-05-04T22:50:49.371166400-04:00" level=debug msg="Registering POST, /containers/prune"
time="2021-05-04T22:50:49.371166400-04:00" level=debug msg="Registering POST, /commit"
time="2021-05-04T22:50:49.372169200-04:00" level=debug msg="Registering PUT, /containers/{name:.*}/archive"
time="2021-05-04T22:50:49.375169600-04:00" level=debug msg="Registering DELETE, /containers/{name:.*}"
time="2021-05-04T22:50:49.375169600-04:00" level=debug msg="Registering GET, /images/json"
time="2021-05-04T22:50:49.375169600-04:00" level=debug msg="Registering GET, /images/search"
time="2021-05-04T22:50:49.376168500-04:00" level=debug msg="Registering GET, /images/get"
time="2021-05-04T22:50:49.376168500-04:00" level=debug msg="Registering GET, /images/{name:.*}/get"
time="2021-05-04T22:50:49.376168500-04:00" level=debug msg="Registering GET, /images/{name:.*}/history"
time="2021-05-04T22:50:49.377170500-04:00" level=debug msg="Registering GET, /images/{name:.*}/json"
time="2021-05-04T22:50:49.377170500-04:00" level=debug msg="Registering POST, /images/load"
time="2021-05-04T22:50:49.377170500-04:00" level=debug msg="Registering POST, /images/create"
time="2021-05-04T22:50:49.378172800-04:00" level=debug msg="Registering POST, /images/{name:.*}/push"
time="2021-05-04T22:50:49.378172800-04:00" level=debug msg="Registering POST, /images/{name:.*}/tag"
time="2021-05-04T22:50:49.379169700-04:00" level=debug msg="Registering POST, /images/prune"
time="2021-05-04T22:50:49.379169700-04:00" level=debug msg="Registering DELETE, /images/{name:.*}"
time="2021-05-04T22:50:49.379169700-04:00" level=debug msg="Registering OPTIONS, /{anyroute:.*}"
time="2021-05-04T22:50:49.380172100-04:00" level=debug msg="Registering GET, /_ping"
time="2021-05-04T22:50:49.380172100-04:00" level=debug msg="Registering HEAD, /_ping"
time="2021-05-04T22:50:49.380172100-04:00" level=debug msg="Registering GET, /events"
time="2021-05-04T22:50:49.381170900-04:00" level=debug msg="Registering GET, /info"
time="2021-05-04T22:50:49.381170900-04:00" level=debug msg="Registering GET, /version"
time="2021-05-04T22:50:49.381170900-04:00" level=debug msg="Registering GET, /system/df"
time="2021-05-04T22:50:49.382170900-04:00" level=debug msg="Registering POST, /auth"
time="2021-05-04T22:50:49.382170900-04:00" level=debug msg="Registering GET, /volumes"
time="2021-05-04T22:50:49.382170900-04:00" level=debug msg="Registering GET, /volumes/{name:.*}"
time="2021-05-04T22:50:49.383170200-04:00" level=debug msg="Registering POST, /volumes/create"
time="2021-05-04T22:50:49.383170200-04:00" level=debug msg="Registering POST, /volumes/prune"
time="2021-05-04T22:50:49.383170200-04:00" level=debug msg="Registering DELETE, /volumes/{name:.*}"
time="2021-05-04T22:50:49.384167400-04:00" level=debug msg="Registering POST, /build"
time="2021-05-04T22:50:49.386170600-04:00" level=debug msg="Registering POST, /build/prune"
time="2021-05-04T22:50:49.386170600-04:00" level=debug msg="Registering POST, /build/cancel"
time="2021-05-04T22:50:49.386170600-04:00" level=debug msg="Registering POST, /session"
time="2021-05-04T22:50:49.387170600-04:00" level=debug msg="Registering POST, /swarm/init"
time="2021-05-04T22:50:49.387170600-04:00" level=debug msg="Registering POST, /swarm/join"
time="2021-05-04T22:50:49.387170600-04:00" level=debug msg="Registering POST, /swarm/leave"
time="2021-05-04T22:50:49.388167100-04:00" level=debug msg="Registering GET, /swarm"
time="2021-05-04T22:50:49.388167100-04:00" level=debug msg="Registering GET, /swarm/unlockkey"
time="2021-05-04T22:50:49.388167100-04:00" level=debug msg="Registering POST, /swarm/update"
time="2021-05-04T22:50:49.389168300-04:00" level=debug msg="Registering POST, /swarm/unlock"
time="2021-05-04T22:50:49.389168300-04:00" level=debug msg="Registering GET, /services"
time="2021-05-04T22:50:49.389168300-04:00" level=debug msg="Registering GET, /services/{id}"
time="2021-05-04T22:50:49.390171400-04:00" level=debug msg="Registering POST, /services/create"
time="2021-05-04T22:50:49.390171400-04:00" level=debug msg="Registering POST, /services/{id}/update"
time="2021-05-04T22:50:49.390171400-04:00" level=debug msg="Registering DELETE, /services/{id}"
time="2021-05-04T22:50:49.391169900-04:00" level=debug msg="Registering GET, /services/{id}/logs"
time="2021-05-04T22:50:49.391169900-04:00" level=debug msg="Registering GET, /nodes"
time="2021-05-04T22:50:49.391169900-04:00" level=debug msg="Registering GET, /nodes/{id}"
time="2021-05-04T22:50:49.392168700-04:00" level=debug msg="Registering DELETE, /nodes/{id}"
time="2021-05-04T22:50:49.392168700-04:00" level=debug msg="Registering POST, /nodes/{id}/update"
time="2021-05-04T22:50:49.392168700-04:00" level=debug msg="Registering GET, /tasks"
time="2021-05-04T22:50:49.393171500-04:00" level=debug msg="Registering GET, /tasks/{id}"
time="2021-05-04T22:50:49.393171500-04:00" level=debug msg="Registering GET, /tasks/{id}/logs"
time="2021-05-04T22:50:49.393171500-04:00" level=debug msg="Registering GET, /secrets"
time="2021-05-04T22:50:49.394172700-04:00" level=debug msg="Registering POST, /secrets/create"
time="2021-05-04T22:50:49.394172700-04:00" level=debug msg="Registering DELETE, /secrets/{id}"
time="2021-05-04T22:50:49.395171100-04:00" level=debug msg="Registering GET, /secrets/{id}"
time="2021-05-04T22:50:49.397171900-04:00" level=debug msg="Registering POST, /secrets/{id}/update"
time="2021-05-04T22:50:49.397171900-04:00" level=debug msg="Registering GET, /configs"
time="2021-05-04T22:50:49.397171900-04:00" level=debug msg="Registering POST, /configs/create"
time="2021-05-04T22:50:49.398171900-04:00" level=debug msg="Registering DELETE, /configs/{id}"
time="2021-05-04T22:50:49.398171900-04:00" level=debug msg="Registering GET, /configs/{id}"
time="2021-05-04T22:50:49.398171900-04:00" level=debug msg="Registering POST, /configs/{id}/update"
time="2021-05-04T22:50:49.399172000-04:00" level=debug msg="Registering GET, /plugins"
time="2021-05-04T22:50:49.399172000-04:00" level=debug msg="Registering GET, /plugins/{name:.*}/json"
time="2021-05-04T22:50:49.399172000-04:00" level=debug msg="Registering GET, /plugins/privileges"
time="2021-05-04T22:50:49.400172000-04:00" level=debug msg="Registering DELETE, /plugins/{name:.*}"
time="2021-05-04T22:50:49.400172000-04:00" level=debug msg="Registering POST, /plugins/{name:.*}/enable"
time="2021-05-04T22:50:49.400172000-04:00" level=debug msg="Registering POST, /plugins/{name:.*}/disable"
time="2021-05-04T22:50:49.401172800-04:00" level=debug msg="Registering POST, /plugins/pull"
time="2021-05-04T22:50:49.401172800-04:00" level=debug msg="Registering POST, /plugins/{name:.*}/push"
time="2021-05-04T22:50:49.401172800-04:00" level=debug msg="Registering POST, /plugins/{name:.*}/upgrade"
time="2021-05-04T22:50:49.402173600-04:00" level=debug msg="Registering POST, /plugins/{name:.*}/set"
time="2021-05-04T22:50:49.402173600-04:00" level=debug msg="Registering POST, /plugins/create"
time="2021-05-04T22:50:49.402173600-04:00" level=debug msg="Registering GET, /distribution/{name:.*}/json"
time="2021-05-04T22:50:49.404171600-04:00" level=debug msg="Registering POST, /grpc"
time="2021-05-04T22:50:49.405170900-04:00" level=debug msg="Registering GET, /networks"
time="2021-05-04T22:50:49.405170900-04:00" level=debug msg="Registering GET, /networks/"
time="2021-05-04T22:50:49.405170900-04:00" level=debug msg="Registering GET, /networks/{id:.+}"
time="2021-05-04T22:50:49.406174800-04:00" level=debug msg="Registering POST, /networks/create"
time="2021-05-04T22:50:49.408180700-04:00" level=debug msg="Registering POST, /networks/{id:.*}/connect"
time="2021-05-04T22:50:49.408180700-04:00" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
time="2021-05-04T22:50:49.408180700-04:00" level=debug msg="Registering POST, /networks/prune"
time="2021-05-04T22:50:49.409171300-04:00" level=debug msg="Registering DELETE, /networks/{id:.*}"
time="2021-05-04T22:50:49.409171300-04:00" level=info msg="API listen on //./pipe/docker_engine"
time="2021-05-04T22:54:11.890828600-04:00" level=debug msg="Calling POST /v1.41/images/create?fromImage=mcr.microsoft.com%2Fwindows%2Fnanoserver&tag=sac2016"
time="2021-05-04T22:54:11.896828600-04:00" level=debug msg="hostDir: C:\\ProgramData\\docker\\certs.d\\mcr.microsoft.com"
time="2021-05-04T22:54:11.896828600-04:00" level=debug msg="Trying to pull mcr.microsoft.com/windows/nanoserver from https://mcr.microsoft.com v2"
time="2021-05-04T22:54:12.377035700-04:00" level=debug msg="Pulling ref from V2 registry: mcr.microsoft.com/windows/nanoserver:sac2016"
time="2021-05-04T22:54:12.755671000-04:00" level=debug msg="pulling blob \"sha256:6f2071dcd7294537bba55b3061704ef1370748e91982193b9e0fa4ebc114589b\""
time="2021-05-04T22:54:12.755671000-04:00" level=debug msg="pulling blob \"sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277\""
time="2021-05-04T22:54:12.940594400-04:00" level=debug msg="Pulling sha256:6f2071dcd7294537bba55b3061704ef1370748e91982193b9e0fa4ebc114589b from foreign URL https://go.microsoft.com/fwlink/?linkid=2028818"
time="2021-05-04T22:54:12.976594200-04:00" level=debug msg="Pulling sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277 from foreign URL https://go.microsoft.com/fwlink/?linkid=837858"
time="2021-05-04T22:54:23.000554300-04:00" level=debug msg="Downloaded 6f2071dcd729 to tempfile D:\\DockerData\\tmp\\GetImageBlob523969534"
time="2021-05-04T22:54:32.564759000-04:00" level=debug msg="Downloaded bce2fbc256ea to tempfile D:\\DockerData\\tmp\\GetImageBlob782090565"
time="2021-05-04T22:54:32.613761100-04:00" level=debug msg="unpigz binary not found, falling back to go gzip library"
time="2021-05-04T22:54:54.814671900-04:00" level=debug msg="Cleaning up layer f967f2aa860368344d788ebf8102f3043b4b2b58366e874b595e64df4bd47766: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \\\\?\\D:\\DockerData\\windowsfilter\\f967f2aa860368344d788ebf8102f3043b4b2b58366e874b595e64df4bd47766: Access is denied."
time="2021-05-04T22:55:00.663189700-04:00" level=info msg="Attempting next endpoint for pull after error: failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \\\\?\\D:\\DockerData\\windowsfilter\\f967f2aa860368344d788ebf8102f3043b4b2b58366e874b595e64df4bd47766: Access is denied."
I have trace file system activity with ProcMon.exe and I wondering if issue appear when LayerID folder is create ?
Docker info return this :
C:\Windows\system32>docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker Application (Docker Inc., v0.8.0)
cluster: Manage Mirantis Container Cloud clusters (Mirantis Inc., v1.9.0)
registry: Manage Docker registries (Docker Inc., 0.1.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.4
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.4350.amd64fre.rs1_release.210407-2154)
Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.4350)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 48GiB
Name: cdopwd-260
ID: SE6C:3RLY:MBCR:MU2D:ODS3:HTIM:PHSS:HOYC:FFNT:5VMB:LTR4:3EH7
Docker Root Dir: D:\DockerData
Debug Mode: true
File Descriptors: -1
Goroutines: 20
System Time: 2021-05-04T22:58:30.0953192-04:00
EventsListeners: 0
HTTP Proxy: http://fastweb.int.bell.ca
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Info about my Windows and Virtual Machine is available (=Yes):
Some points :
My Windows server is a VMWare instance.
I have admin right and dockerd+docker is running on my credential
Hyper V is not install.
Container feature is installed.
Docker is install using powershell
Install-Package -Name docker -ProviderName DockerMsftProvider
Docker Compose is install using powershell
Invoke-WebRequest "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\Docker\docker-compose.exe
I follow this article that describe the same issue but without success.
I try to setup docker on 2 differents server (same os, same VM environment) and I got same error...
At this point, no idea what I can do, any suggestion please...
Philippe
I'm building a PHP web app based on micro-services, and currently, the routes into my app are on different ports. This is fine for development, but isn't going to be so reliable once I have launched. I have:
SPA frontend on port 10001
HTTP API on port 10000
Web Socket on 10002
I would like these all to be on the same port. I recently found Traefik which looks very flexible and would be able to accommodate my future needs. I appreciate I can do simple proxying with NginX but I quite like the idea of being able to tell the proxy to redirect traffic via an API (will be useful in the future).
However, I have set up a Traefik configuration and it does not seem to be proxying as I intend. I am struggling to get it to produce logs to say what it is wrong, and I am looking for a "quick win" to encourage me to persist with it further.
I have configured it with a host-to-container volume so it can explore Docker, using -v /var/run/docker.sock:/var/run/docker.sock). I don't really understand why it needs to know about my containers, since I was intending to set up all the configuration in my traefik.toml.
So, as I (dimly) understand it, I need to set up entrypoints (where traffic comes in), frontends (decisions on how to route it) and backends (servers that do stuff). My initial attempt looks like this:
# Entrypoints definition
#
# It looks like we have one entry point, and use
# frontends to filter WS/HTTP
[entryPoints]
[entryPoints.everything]
address = ":10005"
# Frontends definition
[frontends]
[frontends.http]
backend = "backend-spa"
[frontends.http-api]
backend = "backend-http-api"
rule = "PathPrefix: /v1/captcha"
[frontends.ws]
backend = "backend-ws"
# Backends definition
[backends]
[backends.backend-spa]
url = "http://missive-interface:80"
[backends.backend-http-api]
url = "http://missive-controller:8080"
[backends.backend-ws]
url = "http://missive-controller:8081"
Presently I have just one container per service. I am differentiating the HTTP API on a pattern matcher, and I guess I would match the socket server on something as well (perhaps the Upgrade header).
So, when I visit http://localhost:10005/ I get 404 page not found. Well, fair enough, I've probably misconfigured something. So I reset the loglevel to INFO and I get this:
time="2017-09-06T13:45:35Z" level=info msg="Using TOML configuration file /etc/traefik/traefik.toml"
time="2017-09-06T13:45:35Z" level=info msg="Traefik version v1.4.0-rc1 built on 2017-08-29_08:35:24AM"
time="2017-09-06T13:45:35Z" level=info msg="Preparing server everything &{Network: Address::10005 TLS:<nil> Redirect:<nil> Auth:<nil> WhitelistSourceRange:[] Compress:false ProxyProtocol:false} with readTimeout=0s writeTimeout=0s idleTimeout=3m0s"
time="2017-09-06T13:45:35Z" level=info msg="Starting provider *docker.Provider {"Watch":true,"Filename":"","Constraints":null,"Trace":false,"DebugLogGeneratedTemplate":false,"Endpoint":"unix:///var/run/docker.sock","Domain":"","TLS":null,"ExposedByDefault":true,"UseBindPortIP":false,"SwarmMode":false}"
time="2017-09-06T13:45:35Z" level=info msg="Starting provider *web.Provider {"Address":":8080","CertFile":"","KeyFile":"","ReadOnly":false,"Statistics":null,"Metrics":null,"Path":"","Auth":null,"Debug":false,"CurrentConfigurations":{},"Stats":{"Uptime":"2017-09-06T13:45:35.383750945Z","Pid":1,"ResponseCounts":{},"TotalResponseCounts":{},"TotalResponseTime":"0001-01-01T00:00:00Z"},"StatsRecorder":null}"
time="2017-09-06T13:45:35Z" level=info msg="Starting server on :10005"
time="2017-09-06T13:45:35Z" level=error msg="No entrypoint defined for frontend frontend-Host-missive-controller-app, defaultEntryPoints:[]"
time="2017-09-06T13:45:35Z" level=error msg="Skipping frontend frontend-Host-missive-controller-app..."
time="2017-09-06T13:45:35Z" level=error msg="No entrypoint defined for frontend frontend-Host-missive-interface-app, defaultEntryPoints:[]"
time="2017-09-06T13:45:35Z" level=error msg="Skipping frontend frontend-Host-missive-interface-app..."
time="2017-09-06T13:45:35Z" level=error msg="No entrypoint defined for frontend frontend-Host-missive-storage-app, defaultEntryPoints:[]"
time="2017-09-06T13:45:35Z" level=error msg="Skipping frontend frontend-Host-missive-storage-app..."
time="2017-09-06T13:45:35Z" level=error msg="No entrypoint defined for frontend frontend-Host-missive-transmitter-app, defaultEntryPoints:[]"
time="2017-09-06T13:45:35Z" level=error msg="Skipping frontend frontend-Host-missive-transmitter-app..."
time="2017-09-06T13:45:35Z" level=info msg="Server configuration reloaded on :10005"
However, when triggering the 404, no extra logs are output on stdout, so I cannot tell what the issue is. I don't think it is one of my services that is producing this.
I am guessing that maybe my backends should indicate the name of the container that handles that service, so I can remove the "Skipping" errors? I should note also that I am not using Kubernetes or anything like that - it's just plain Docker Compose for now.
What thing am I not spotting that would move me forward?
Update
Traefik seems to be very unhappy if I don't give it access to my Docker config. If I remove the -v volume switch on docker run then I get this added to logs, every second or so:
time="2017-09-06T17:18:20Z" level=error msg="Failed to retrieve information of the docker client and server host: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
time="2017-09-06T17:18:20Z" level=error msg="Provider connection error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?, retrying in 443.292653ms"
I have also found how to turn on [accessLogs] in config, and I get this written to stdout. These show my requests are hitting the proxy, but they don't give any information as to how they are being routed, nor whether my frontend and backend definitions are recognised as valid.
172.17.0.1 - - [06/Sep/2017:17:57:44 +0000] "GET / HTTP/1.1" %!d(<nil>) %!d(<nil>) - "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0" 1 - - 0ms
172.17.0.1 - - [06/Sep/2017:17:57:49 +0000] "GET /index.php HTTP/1.1" %!d(<nil>) %!d(<nil>) - "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0" 2 - - 0ms
172.17.0.1 - - [06/Sep/2017:17:58:09 +0000] "GET /index.php HTTP/1.1" %!d(<nil>) %!d(<nil>) - "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0" 3 - - 0ms
OK, so first if you don't use Docker configuration then you don't need to provide the socket to it even if your services are running in containers (but when you are more comfortable with Traefik you should look into it as it's really useful)
The second thing is that the logs tells you exactly the issue, none of your frontends are actually used as they are not specifying the entrypoint. You can either add
defaultEntryPoints = ["everything"]
above your entrypoints definition or add
entrypoints = ["everything"]
to each of your frontends.
Another issue is that you have 2 frontends without any rules so it probably won't work because there's no way to tell them apart. You can either use a host rule or add a path prefix to the WS frontend.
Finally, you need to let Traefik know which configuration system to use. Put this before your [frontends]:
[file]
The schema on the basics page describe well how everything works together.
I was trying to configure the Docker daemon port as mentioned in a link:
cat /etc/docker/daemon.json
{
"debug": "true",
"hosts": "tcp://127.0.0.1:5000"
}
# Service docker status
docker stop/waiting
# service docker start
start: Job failed to start
Docker version: 17.04
I enabled the debug logs to check the issue for starting the Docker service and got to know from logs at /var/log/upstart/docker.log:
Waiting for /var/run/docker.sock
unable to configure the Docker daemon with file /etc/docker/daemon.json: json: cannot unmarshal string into Go value of type bool
What is causing the issue for the Docker container to start? Is anything wrong in the configuration file daemon.json?
The issues after suggested changes:
cat /etc/docker/daemon.json
{
"debug": true,
"hosts": "tcp://127.0.0.1:5000"
}
ERROR:
Waiting for /var/run/docker.sock
unable to configure the Docker daemon with file /etc/docker/daemon.json: json: cannot unmarshal string into Go value of type []string
So I changed it to:
cat /etc/docker/daemon.json
{
"debug": true,
"hosts": ["tcp://127.0.0.1:5000"]
}
And the debug log:
# cat /var/log/upstart/docker.log
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:39.082025019+05:30" level=warning msg="[!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]"
time="2017-04-29T21:49:39.087462580+05:30" level=debug msg="Listener created for HTTP on tcp (127.0.0.1:5000)"
time="2017-04-29T21:49:39.091623380+05:30" level=info msg="libcontainerd: new containerd process, pid: 28412"
DEBU[0000] containerd: read past events count=0
DEBU[0000] containerd: supervisor running cpus=1 memory=3953 runtime=docker-runc runtimeArgs=[] stateDir="/var/run/docker/libcontainerd/containerd"
DEBU[0000] containerd: grpc api on /var/run/docker/libcontainerd/docker-containerd.sock
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:39.594179140+05:30" level=debug msg="libcontainerd: containerd health check returned error: rpc error: code = 14 desc = grpc: the connection is unavailable"
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:40.093473005+05:30" level=debug msg="libcontainerd: containerd health check returned error: rpc error: code = 14 desc = grpc: the connection is unavailable"
time="2017-04-29T21:49:40.103148602+05:30" level=debug msg="Using default logging driver json-file"
time="2017-04-29T21:49:40.104791557+05:30" level=debug msg="Golang's threads limit set to 56610"
time="2017-04-29T21:49:40.120505279+05:30" level=info msg="[graphdriver] using prior storage driver: aufs"
time="2017-04-29T21:49:40.121399341+05:30" level=debug msg="Using graph driver aufs"
time="2017-04-29T21:49:40.127259410+05:30" level=debug msg="Max Concurrent Downloads: 3"
time="2017-04-29T21:49:40.127366059+05:30" level=debug msg="Max Concurrent Uploads: 5"
time="2017-04-29T21:49:40.139747219+05:30" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2017-04-29T21:49:40.140011955+05:30" level=warning msg="Your kernel does not support swap memory limit"
time="2017-04-29T21:49:40.140100084+05:30" level=warning msg="Your kernel does not support cgroup rt period"
time="2017-04-29T21:49:40.140216600+05:30" level=warning msg="Your kernel does not support cgroup rt runtime"
time="2017-04-29T21:49:40.140342372+05:30" level=warning msg="mountpoint for pids not found"
time="2017-04-29T21:49:40.140594173+05:30" level=info msg="Loading containers: start."
time="2017-04-29T21:49:40.141501935+05:30" level=debug msg="Loaded container 0102006e71695802c5f21edbb9dc4776d4c291d28c8db21fbc30144c7ee5ac58"
time="2017-04-29T21:49:40.142853279+05:30" level=debug msg="Loaded container 01c63f92586b3e792b0bcf5c9081126c71ce816ad4d38031e2bd2019ba536461"
time="2017-04-29T21:49:40.143269945+05:30" level=debug msg="Loaded container 0523a71851447b55b18fe3c8e9ac904837bd5062cc237f7cb507a9e4e3cda410"
** REMOVED THE CONTAINERS LOADING INFO **
time="2017-04-29T21:49:40.165085939+05:30" level=debug msg="Loaded container ff01985e70fe0d14210c88b768b2ea521d4521d376e5df0e90895533e577b92e"
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:40.289009591+05:30" level=debug msg="Option Experimental: false"
time="2017-04-29T21:49:40.289131532+05:30" level=debug msg="Option DefaultDriver: bridge"
time="2017-04-29T21:49:40.289205442+05:30" level=debug msg="Option DefaultNetwork: bridge"
time="2017-04-29T21:49:40.294576340+05:30" level=info msg="Firewalld running: false"
time="2017-04-29T21:49:40.297766934+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.299341976+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]"
time="2017-04-29T21:49:40.301053126+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.302616266+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D PREROUTING]"
time="2017-04-29T21:49:40.304229207+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D OUTPUT]"
time="2017-04-29T21:49:40.305711736+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -F DOCKER]"
time="2017-04-29T21:49:40.307077262+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -X DOCKER]"
time="2017-04-29T21:49:40.308535928+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -F DOCKER]"
time="2017-04-29T21:49:40.309902224+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -X DOCKER]"
time="2017-04-29T21:49:40.311637703+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -F DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.313500303+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -X DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.315093100+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -n -L DOCKER]"
time="2017-04-29T21:49:40.316612016+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -N DOCKER]"
time="2017-04-29T21:49:40.318047831+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -n -L DOCKER]"
time="2017-04-29T21:49:40.319496142+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -n -L DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.320978680+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C DOCKER-ISOLATION -j RETURN]"
time="2017-04-29T21:49:40.322453938+05:30" level=debug msg="/sbin/iptables, [--wait -I DOCKER-ISOLATION -j RETURN]"
time="2017-04-29T21:49:40.327870386+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]"
time="2017-04-29T21:49:40.329395686+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.330870634+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -I DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.332401751+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j DROP]"
time="2017-04-29T21:49:40.333933984+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.335444643+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.337019261+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.338699953+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.340319708+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]"
time="2017-04-29T21:49:40.342595449+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]"
time="2017-04-29T21:49:40.344321469+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.345835836+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.347371940+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.348970025+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.350514996+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -j DOCKER-ISOLATION]"
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:40.354889362+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -j DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.356534823+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -j DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.358137686+05:30" level=debug msg="Network (cdd354f) restored"
time="2017-04-29T21:49:40.369466443+05:30" level=debug msg="Allocating IPv4 pools for network bridge (cdd354f255bdc31986952e845957b04baa477ed7362b4b3b7ed606c31850d68a)"
time="2017-04-29T21:49:40.369595546+05:30" level=debug msg="RequestPool(LocalDefault, 172.17.0.0/16, , map[], false)"
time="2017-04-29T21:49:40.369730759+05:30" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, 172.17.0.1, map[RequestAddressType:com.docker.network.gateway])"
time="2017-04-29T21:49:40.371387634+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]"
time="2017-04-29T21:49:40.373112693+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]"
time="2017-04-29T21:49:40.374880382+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.376591245+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -D DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.378326734+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.380015825+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.381638134+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.383258380+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -i docker0 ! -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.384970620+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.386558723+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.388624059+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.390622271+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.392615245+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.394577019+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.398027079+05:30" level=debug msg="releasing IPv4 pools from network bridge (cdd354f255bdc31986952e845957b04baa477ed7362b4b3b7ed606c31850d68a)"
time="2017-04-29T21:49:40.398174850+05:30" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.1)"
time="2017-04-29T21:49:40.398258452+05:30" level=debug msg="ReleasePool(LocalDefault/172.17.0.0/16)"
time="2017-04-29T21:49:40.400734572+05:30" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
time="2017-04-29T21:49:40.400866715+05:30" level=debug msg="Allocating IPv4 pools for network bridge (f729ff1f8c660b13bc5567d8a30cde03698b4df6a4d0fdbced201a7452fbf0f0)"
time="2017-04-29T21:49:40.400921339+05:30" level=debug msg="RequestPool(LocalDefault, 172.17.0.0/16, , map[], false)"
time="2017-04-29T21:49:40.400984209+05:30" level=debug msg="RequestAddress(LocalDefault/172.17.0.0/16, 172.17.0.1, map[RequestAddressType:com.docker.network.gateway])"
time="2017-04-29T21:49:40.401150859+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]"
time="2017-04-29T21:49:40.402745792+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -I POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE]"
time="2017-04-29T21:49:40.404360129+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.405955436+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -I DOCKER -i docker0 -j RETURN]"
time="2017-04-29T21:49:40.407494814+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j DROP]"
time="2017-04-29T21:49:40.409144994+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.410904462+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -i docker0 -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.412607157+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.414338440+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -i docker0 ! -o docker0 -j ACCEPT]"
time="2017-04-29T21:49:40.415979126+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.417726152+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2017-04-29T21:49:40.419367167+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]"
time="2017-04-29T21:49:40.421122358+05:30" level=debug msg="/sbin/iptables, [--wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]"
time="2017-04-29T21:49:40.422856895+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.424550825+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -o docker0 -j DOCKER]"
time="2017-04-29T21:49:40.426107430+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.427991143+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]"
time="2017-04-29T21:49:40.429645428+05:30" level=debug msg="/sbin/iptables, [--wait -t filter -C FORWARD -j DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.431266204+05:30" level=debug msg="/sbin/iptables, [--wait -D FORWARD -j DOCKER-ISOLATION]"
time="2017-04-29T21:49:40.432879578+05:30" level=debug msg="/sbin/iptables, [--wait -I FORWARD -j DOCKER-ISOLATION]"
Waiting for /var/run/docker.sock
time="2017-04-29T21:49:40.500868327+05:30" level=info msg="Loading containers: done."
time="2017-04-29T21:49:40.519559145+05:30" level=info msg="Daemon has completed initialization"
time="2017-04-29T21:49:40.519681055+05:30" level=info msg="Docker daemon" commit=4845c56 graphdriver=aufs version=17.04.0-ce
time="2017-04-29T21:49:40.519845570+05:30" level=debug msg="Registering routers"
time="2017-04-29T21:49:40.519892553+05:30" level=debug msg="Registering GET, /containers/{name:.*}/checkpoints"
time="2017-04-29T21:49:40.520055568+05:30" level=debug msg="Registering POST, /containers/{name:.*}/checkpoints"
time="2017-04-29T21:49:40.520182547+05:30" level=debug msg="Registering DELETE, /containers/{name}/checkpoints/{checkpoint}"
time="2017-04-29T21:49:40.520360059+05:30" level=debug msg="Registering HEAD, /containers/{name:.*}/archive"
time="2017-04-29T21:49:40.520479299+05:30" level=debug msg="Registering GET, /containers/json"
time="2017-04-29T21:49:40.520574487+05:30" level=debug msg="Registering GET, /containers/{name:.*}/export"
time="2017-04-29T21:49:40.520683367+05:30" level=debug msg="Registering GET, /containers/{name:.*}/changes"
time="2017-04-29T21:49:40.520823502+05:30" level=debug msg="Registering GET, /containers/{name:.*}/json"
time="2017-04-29T21:49:40.520936230+05:30" level=debug msg="Registering GET, /containers/{name:.*}/top"
time="2017-04-29T21:49:40.521036359+05:30" level=debug msg="Registering GET, /containers/{name:.*}/logs"
time="2017-04-29T21:49:40.521146161+05:30" level=debug msg="Registering GET, /containers/{name:.*}/stats"
time="2017-04-29T21:49:40.521313628+05:30" level=debug msg="Registering GET, /containers/{name:.*}/attach/ws"
time="2017-04-29T21:49:40.521421473+05:30" level=debug msg="Registering GET, /exec/{id:.*}/json"
time="2017-04-29T21:49:40.521516457+05:30" level=debug msg="Registering GET, /containers/{name:.*}/archive"
time="2017-04-29T21:49:40.521620140+05:30" level=debug msg="Registering POST, /containers/create"
time="2017-04-29T21:49:40.521745578+05:30" level=debug msg="Registering POST, /containers/{name:.*}/kill"
time="2017-04-29T21:49:40.521860358+05:30" level=debug msg="Registering POST, /containers/{name:.*}/pause"
time="2017-04-29T21:49:40.521964539+05:30" level=debug msg="Registering POST, /containers/{name:.*}/unpause"
time="2017-04-29T21:49:40.522067959+05:30" level=debug msg="Registering POST, /containers/{name:.*}/restart"
time="2017-04-29T21:49:40.522167019+05:30" level=debug msg="Registering POST, /containers/{name:.*}/start"
time="2017-04-29T21:49:40.522308397+05:30" level=debug msg="Registering POST, /containers/{name:.*}/stop"
time="2017-04-29T21:49:40.522414580+05:30" level=debug msg="Registering POST, /containers/{name:.*}/wait"
time="2017-04-29T21:49:40.522514975+05:30" level=debug msg="Registering POST, /containers/{name:.*}/resize"
time="2017-04-29T21:49:40.522619004+05:30" level=debug msg="Registering POST, /containers/{name:.*}/attach"
time="2017-04-29T21:49:40.522787092+05:30" level=debug msg="Registering POST, /containers/{name:.*}/copy"
time="2017-04-29T21:49:40.522894615+05:30" level=debug msg="Registering POST, /containers/{name:.*}/exec"
time="2017-04-29T21:49:40.523003923+05:30" level=debug msg="Registering POST, /exec/{name:.*}/start"
time="2017-04-29T21:49:40.523107351+05:30" level=debug msg="Registering POST, /exec/{name:.*}/resize"
time="2017-04-29T21:49:40.523264006+05:30" level=debug msg="Registering POST, /containers/{name:.*}/rename"
time="2017-04-29T21:49:40.523376319+05:30" level=debug msg="Registering POST, /containers/{name:.*}/update"
time="2017-04-29T21:49:40.523513783+05:30" level=debug msg="Registering POST, /containers/prune"
time="2017-04-29T21:49:40.523612647+05:30" level=debug msg="Registering PUT, /containers/{name:.*}/archive"
time="2017-04-29T21:49:40.523828369+05:30" level=debug msg="Registering DELETE, /containers/{name:.*}"
time="2017-04-29T21:49:40.523955417+05:30" level=debug msg="Registering GET, /images/json"
time="2017-04-29T21:49:40.524052679+05:30" level=debug msg="Registering GET, /images/search"
time="2017-04-29T21:49:40.524136911+05:30" level=debug msg="Registering GET, /images/get"
time="2017-04-29T21:49:40.524247693+05:30" level=debug msg="Registering GET, /images/{name:.*}/get"
time="2017-04-29T21:49:40.524372724+05:30" level=debug msg="Registering GET, /images/{name:.*}/history"
time="2017-04-29T21:49:40.524487290+05:30" level=debug msg="Registering GET, /images/{name:.*}/json"
time="2017-04-29T21:49:40.524597100+05:30" level=debug msg="Registering POST, /commit"
time="2017-04-29T21:49:40.524677000+05:30" level=debug msg="Registering POST, /images/load"
time="2017-04-29T21:49:40.524786382+05:30" level=debug msg="Registering POST, /images/create"
time="2017-04-29T21:49:40.524879353+05:30" level=debug msg="Registering POST, /images/{name:.*}/push"
time="2017-04-29T21:49:40.524991660+05:30" level=debug msg="Registering POST, /images/{name:.*}/tag"
time="2017-04-29T21:49:40.525104838+05:30" level=debug msg="Registering POST, /images/prune"
time="2017-04-29T21:49:40.525226759+05:30" level=debug msg="Registering DELETE, /images/{name:.*}"
time="2017-04-29T21:49:40.525335549+05:30" level=debug msg="Registering OPTIONS, /{anyroute:.*}"
time="2017-04-29T21:49:40.525435401+05:30" level=debug msg="Registering GET, /_ping"
time="2017-04-29T21:49:40.525511894+05:30" level=debug msg="Registering GET, /events"
time="2017-04-29T21:49:40.525591165+05:30" level=debug msg="Registering GET, /info"
time="2017-04-29T21:49:40.525669340+05:30" level=debug msg="Registering GET, /version"
time="2017-04-29T21:49:40.525814930+05:30" level=debug msg="Registering GET, /system/df"
time="2017-04-29T21:49:40.525897277+05:30" level=debug msg="Registering POST, /auth"
time="2017-04-29T21:49:40.525970337+05:30" level=debug msg="Registering GET, /volumes"
time="2017-04-29T21:49:40.526057298+05:30" level=debug msg="Registering GET, /volumes/{name:.*}"
time="2017-04-29T21:49:40.526163662+05:30" level=debug msg="Registering POST, /volumes/create"
time="2017-04-29T21:49:40.526353639+05:30" level=debug msg="Registering POST, /volumes/prune"
time="2017-04-29T21:49:40.526442022+05:30" level=debug msg="Registering DELETE, /volumes/{name:.*}"
time="2017-04-29T21:49:40.526546136+05:30" level=debug msg="Registering POST, /build"
time="2017-04-29T21:49:40.526623235+05:30" level=debug msg="Registering POST, /swarm/init"
time="2017-04-29T21:49:40.526737579+05:30" level=debug msg="Registering POST, /swarm/join"
time="2017-04-29T21:49:40.526819211+05:30" level=debug msg="Registering POST, /swarm/leave"
time="2017-04-29T21:49:40.526899446+05:30" level=debug msg="Registering GET, /swarm"
time="2017-04-29T21:49:40.526980042+05:30" level=debug msg="Registering GET, /swarm/unlockkey"
time="2017-04-29T21:49:40.527069861+05:30" level=debug msg="Registering POST, /swarm/update"
time="2017-04-29T21:49:40.527158981+05:30" level=debug msg="Registering POST, /swarm/unlock"
time="2017-04-29T21:49:40.527342136+05:30" level=debug msg="Registering GET, /services"
time="2017-04-29T21:49:40.527474641+05:30" level=debug msg="Registering GET, /services/{id}"
time="2017-04-29T21:49:40.527609687+05:30" level=debug msg="Registering POST, /services/create"
time="2017-04-29T21:49:40.527758523+05:30" level=debug msg="Registering POST, /services/{id}/update"
time="2017-04-29T21:49:40.527871673+05:30" level=debug msg="Registering DELETE, /services/{id}"
time="2017-04-29T21:49:40.527970912+05:30" level=debug msg="Registering GET, /services/{id}/logs"
time="2017-04-29T21:49:40.528072255+05:30" level=debug msg="Registering GET, /nodes"
time="2017-04-29T21:49:40.528151801+05:30" level=debug msg="Registering GET, /nodes/{id}"
time="2017-04-29T21:49:40.528287417+05:30" level=debug msg="Registering DELETE, /nodes/{id}"
time="2017-04-29T21:49:40.528390020+05:30" level=debug msg="Registering POST, /nodes/{id}/update"
time="2017-04-29T21:49:40.528493003+05:30" level=debug msg="Registering GET, /tasks"
time="2017-04-29T21:49:40.528572710+05:30" level=debug msg="Registering GET, /tasks/{id}"
time="2017-04-29T21:49:40.528689980+05:30" level=debug msg="Registering GET, /secrets"
time="2017-04-29T21:49:40.528796825+05:30" level=debug msg="Registering POST, /secrets/create"
time="2017-04-29T21:49:40.528884054+05:30" level=debug msg="Registering DELETE, /secrets/{id}"
time="2017-04-29T21:49:40.528992153+05:30" level=debug msg="Registering GET, /secrets/{id}"
time="2017-04-29T21:49:40.529100356+05:30" level=debug msg="Registering POST, /secrets/{id}/update"
time="2017-04-29T21:49:40.529246933+05:30" level=debug msg="Registering GET, /plugins"
time="2017-04-29T21:49:40.529333481+05:30" level=debug msg="Registering GET, /plugins/{name:.*}/json"
time="2017-04-29T21:49:40.529433799+05:30" level=debug msg="Registering GET, /plugins/privileges"
time="2017-04-29T21:49:40.529532846+05:30" level=debug msg="Registering DELETE, /plugins/{name:.*}"
time="2017-04-29T21:49:40.529640124+05:30" level=debug msg="Registering POST, /plugins/{name:.*}/enable"
time="2017-04-29T21:49:40.529776734+05:30" level=debug msg="Registering POST, /plugins/{name:.*}/disable"
time="2017-04-29T21:49:40.529884453+05:30" level=debug msg="Registering POST, /plugins/pull"
time="2017-04-29T21:49:40.529979852+05:30" level=debug msg="Registering POST, /plugins/{name:.*}/push"
time="2017-04-29T21:49:40.530083752+05:30" level=debug msg="Registering POST, /plugins/{name:.*}/upgrade"
time="2017-04-29T21:49:40.530177424+05:30" level=debug msg="Registering POST, /plugins/{name:.*}/set"
time="2017-04-29T21:49:40.530348200+05:30" level=debug msg="Registering POST, /plugins/create"
time="2017-04-29T21:49:40.530432901+05:30" level=debug msg="Registering GET, /networks"
time="2017-04-29T21:49:40.530518503+05:30" level=debug msg="Registering GET, /networks/"
time="2017-04-29T21:49:40.530599687+05:30" level=debug msg="Registering GET, /networks/{id:.+}"
time="2017-04-29T21:49:40.530751284+05:30" level=debug msg="Registering POST, /networks/create"
time="2017-04-29T21:49:40.530853286+05:30" level=debug msg="Registering POST, /networks/{id:.*}/connect"
time="2017-04-29T21:49:40.530960464+05:30" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
time="2017-04-29T21:49:40.531072661+05:30" level=debug msg="Registering POST, /networks/prune"
time="2017-04-29T21:49:40.531154778+05:30" level=debug msg="Registering DELETE, /networks/{id:.*}"
time="2017-04-29T21:49:40.531568754+05:30" level=info msg="API listen on 127.0.0.1:5000"
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
Waiting for /var/run/docker.sock
.....
Now the Docker container is waiting for an infinite period. What is causing this issue?
Able to start the same with dockerd manually:
#dockerd -H tcp://127.0.0.1:5000 &
[1] 31661
root#labadmin-VirtualBox:/etc/docker# WARN[0000] [!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]
INFO[0000] libcontainerd: new containerd process, pid: 31665
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096
INFO[0001] [graphdriver] using prior storage driver: aufs
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] Your kernel does not support swap memory limit
WARN[0001] Your kernel does not support cgroup rt period
WARN[0001] Your kernel does not support cgroup rt runtime
WARN[0001] mountpoint for pids not found
INFO[0001] Loading containers: start.
INFO[0001] Firewalld running: false
INFO[0001] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[0001] Loading containers: done.
INFO[0001] Daemon has completed initialization
INFO[0001] Docker daemon commit=4845c56 graphdriver=aufs version=17.04.0-ce
INFO[0001] API listen on 127.0.0.1:5000
# netstat -tunlp | grep -i 5000
tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 31661/dockerd
This is an addition to the answer provided by Dan Lowe.
There are two ways in configuring the Docker daemon port:
Configuring at /etc/default/docker file:
DOCKER_OPTS="-H tcp://127.0.0.1:5000 -H unix:///var/run/docker.sock"
Configuring at /etc/docker/daemon.json:
{
"debug": true,
"hosts": ["tcp://127.0.0.1:5000", "unix:///var/run/docker.sock"]
}
Restart the Docker service after configuring the port.
If the Docker default socket is not configured, the similar issue mentioned in the question may occur, i.e., Docker will wait for an infinite period.
Note: But don't configure in both the configuration files. The following error may occur:
Waiting for /var/run/docker.sock
unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [tcp://127.0.0.1:5000 unix:///var/run/docker.sock], from file: tcp://127.0.0.1:5000)
The reason for adding both the user port[ tcp://127.0.0.1:5000] and default Docker socket[unix:///var/run/docker.sock] is that the user port enables the access to the Docker APIs whereas the default socket enables the CLI. In case the default port[unix:///var/run/docker.sock] is not mentioned in the /etc/default/docker file the following error may occur:
# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
This error is not because that the Docker container is not running, but because the default Docker socket is not enabled.
This is applicable for Docker version 17.04, and it may vary with different versions of Docker.
I don't think this is valid.
"debug": "true",
"true" is a string, but the expected type here is boolean. Try this instead:
"debug": true,
This is consistent with the error you saw,
cannot unmarshal string into Go value of type bool
hosts appears to expect an array. Try this:
"hosts": ["tcp://127.0.0.1:5000"]
I have been tasked to build a production ready Swarm cluster using Zookeeper as dicovery backend. I used the official documentation for this purpose, https://docs.docker.com/swarm/install-manual/. Concerning backend discovery I used this one: https://docs.docker.com/swarm/discovery/. Now I have an issue. When I try to communicate with the swarm, I have this error: No elected primary cluster manager.
This is my setup:
I'm running on Ubuntu 16.04 with docker Client/Server version 1.12.3, with zookeeper 3.4.9 launch in the same host as my swarm manager. I'm using a two nodes architecture with one swarm manager and one swarm worker
After Docker Engine installation on each node,
$ nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
Now on the swarm manager:
$ docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise <swarm-manager-ip>:4000 zk://<swarm-manager-ip>/swarm
On the swarm worker:
$ docker run -d swarm join --advertise=<swarm-worker-ip>:2375 zk://<swarm-manager-ip>/swarm
Now when I try to see if everything is good, I hit the command below and the result follows.
$ docker -H <swarm-manager-ip>:4000 ps -a
Error response from daemon: No elected primary cluster manager
When I just do this:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
91c3864ba6ee swarm "/swarm manage -H :40" 17 hours ago Up 19 minutes 2375/tcp, 0.0.0.0:4000->4000/tcp swarm-master
I can see the swarm master and when I try to see the logs of the swarm node, I can see this:
$ docker logs 91c3864ba6ee
time="2016-12-09T20:29:39Z" level=info msg="Initializing discovery without TLS"
time="2016-12-09T20:29:39Z" level=info msg="Listening for HTTP" addr=":4000" proto=tcp
time="2016-12-09T20:29:39Z" level=info msg="Leader Election: Cluster leadership lost"
2016/12/09 20:29:40 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
time="2016-12-09T20:29:40Z" level=error msg="zk: could not connect to a server"
time="2016-12-09T20:29:40Z" level=error msg="zk: could not connect to a server"
time="2016-12-09T20:29:40Z" level=error msg="Discovery error: zk: could not connect to a server"
2016/12/09 20:29:42 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
time="2016-12-09T20:29:42Z" level=error msg="Discovery error: zk: could not connect to a server"
2016/12/09 20:29:44 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
time="2016-12-09T20:29:44Z" level=error msg="Discovery error: zk: could not connect to a server"
time="2016-12-09T20:29:44Z" level=error msg="Discovery error: Unexpected watch error"
2016/12/09 20:29:46 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
2016/12/09 20:29:48 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
time="2016-12-09T20:29:50Z" level=info msg="Leader Election: Cluster leadership lost"
2016/12/09 20:29:50 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
time="2016-12-09T20:29:50Z" level=error msg="zk: could not connect to a server"
time="2016-12-09T20:29:50Z" level=error msg="zk: could not connect to a server"
But a simple telnet command shows me that my zookeeper host is working. So how do I have a i/o timeout when the swarm try to connect to zookeeper discovery backend?
As mentioned in the comments there is a new version called Swarm mode embedded with Docker since 1.12. It includes a built-in high-available distributed object store so you don't have to setup an external KV store yourself.
Now regarding your issue with the first version of Swarm, one line caught my attention:
2016/12/09 20:29:50 Failed to connect to <swarm-manager-ip>:2181: dial tcp <swarm-manager-ip>:2181: i/o timeout
To me it seems that zookeeper is not running on your machine or that you didn't point to the right port.
First check that zookeeper is running on your machine with:
ps aux | grep zookeeper
You should see a process running.
If not, make sure you create a zoo.cfg file in the conf directory of your zookeeper installation specifying the right port, for example:
tickTime=2000
dataDir=/var/zookeeper
clientPort=2181
You can look at This Tutorial to bootstrap zookeeper.
After this you can run the zkStart.sh script to start your zookeeper instance and swarm should now be able to properly connect and register the Leader key.
If this still does not work, try downgrading to zookeeper 3.4.6 as this is the last known supported version since the switch to Docker Swarm Mode.