Docker Community Forums

Share and learn in the Docker community.

The docker can not assess Swarm because of URL not found

docker

(Klaus1982) #1

I’m using Docker 1.8.2 and Swarm 0.5.0 to build a cluster; but it seems the docker can not access Swarm because URL mismatch.

Docker is trying to access ‘/v1.20/containers/create’, but in Swarm’s log, there is only ‘/containers/create’ endpoint.

Here is the detail information of Docker & Swarm:

root@mesosStagingController:~/swarm_mesos/swarm# /usr/local/gocode/bin/swarm -v
swarm version 0.5.0-dev (HEAD)
root@mesosStagingController:~/swarm_mesos/swarm# docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
root@mesosStagingController:~/swarm_mesos/swarm# docker -H mesosStagingController1:4375 run hello-world
Post http://mesosStagingController1:4375/v1.20/containers/create: dial tcp: lookup mesosStagingController1: no such host.

  • Are you trying to connect to a TLS-enabled daemon without TLS?
  • Is your docker daemon up and running?

(Ranjandas) #2

Hi,

Is the name mesosStagingController1 defined in /etc/hosts or in DNS? Looks like a name resolution issue.

Regards


(Klaus1982) #3

It can be found in /etc/hosts; if I corrected it, it will report the following error:

root@mesosStagingController:~/swarm_mesos/swarm# docker -H tcp://mesosStagingController:4375 info
Error response from daemon: 404 page not found


(Klaus1982) #4

Just correct the issue; it seems a configuration issue.