Open saidur2k opened 7 years ago
Hello saidur2k, this happening because of some problems with your docker binaries, if you have docker for mac or docker for windows, you need to restart the docker application, and try to execute the script again, in case of getting the same error after restarting the docker binaries, you may need to restart the computer.
thats how i resolved those issues when appeared to me.
Hi @Crizstian,
Still getting this issue after restarting the computer:
saidur@admins-mbp:~/Development/mongo-replica-with-docker (master) $ bash < create-replica-set.sh ··························· ·· swtiching >>>> manager1 server ·· ··························· Host does not exist: "manager1" ·· creating container >>>> mongoNode1 ·· ·· configuring container >>>> mongoNode1 ·· mongo_storage Unable to find image 'mongo:latest' locally docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers). See 'docker run --help'. Error response from daemon: No such container: mongoNode1 ·· copying files to container >>>> mongoNode1 ·· no such directory no such directory no such directory Error response from daemon: No such container: mongoNode1 Error response from daemon: No such container: mongoNode1 Error response from daemon: No such container: mongoNode1 ·· removing container >>>> mongoNode1 ·· Error response from daemon: No such container: mongoNode1 Host does not exist: "manager1" Host does not exist: "worker1" Host does not exist: "worker2" ·· recreating container >>>> mongoNode1 ·· invalid argument "manager1:" for --add-host: invalid IP address in add-host: "" See 'docker run --help'. Host does not exist: "manager1" IP == PORT == 27017
waiting for mongodb
And it just sits there
This is because the docker binaries is not creating the manager1 docker-machine if you make
docker-machine ls
you will see that there will print an error in the manager1, and thats because the docker binaries is not creating it because some error happened during the creation, the solution that i encounter when this problem has presented to me was first, restarting the docker for mac binaries and try to create again the docker-machines, and if that didn't work, go the preferences of docker and reset it to the factory defaults, and try to create the machines, and if that didn't work, i restart my computer. this is more a docker binaries problem then the create-replica-set bash script.
$ bash < create-replica-set.sh ··························· ·· swtiching >>>> manager1 server ·· ··························· Host does not exist: "manager1" ·· creating container >>>> mongoNode1 ·· ·· configuring container >>>> mongoNode1 ·· mongo_storage 881e0d7644968562eed5cea3fd17967ef30449593b344e1d0a58008463b37f1c ·· copying files to container >>>> mongoNode1 ·· ·· removing container >>>> mongoNode1 ·· mongoNode1 --add-host manager1:192.168.99.100 --add-host worker1:192.168.99.101 --add-host worker2:192.168.99.102 ·· recreating container >>>> mongoNode1 ·· eb5d089344730622f749adea5b33d567315de98980eda3081d208e26e9eb895d Host does not exist: "manager1" IP == PORT == 27017