mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

Failed to Connect to 127.0.0.1:2181 #81

Closed bellrav closed 8 years ago

bellrav commented 8 years ago

Hello Chris,

I am trying to run mesos-consul docker image using following command:

docker run -e "--zk=zk://myip:2181/mesos" -t ciscocloud/mesos-consul

docker instances is trying to connect to 127.0.0.1:2181 instead of myip:2181. I wonder if i am passing zk parameter in the right way(i tried zk=zk://myip:2181/mesos which didnt work either). please let me know if anything need to be updated.

thanks

ChrisAubuchon commented 8 years ago

Is myip a host name or is it the actual IP?

bellrav commented 8 years ago

its an actual IP of my AWS server which hosts mesos, marathon and zookeeper

ChrisAubuchon commented 8 years ago

The command line should be: docker run -t ciscocloud/mesos-consul --zk=zk://myip:2181/mesos The -e option to docker sets an environment variable which the container doesn't know anything about,

bellrav commented 8 years ago

Ah my bad, i passed zookeeper details as environment variable instead of a parameter. it worked now

Thanks for quick response :)