Parallels / docker-machine-parallels

Parallels driver for Docker Machine https://github.com/docker/machine
MIT License
471 stars 35 forks source link

The connection attempt failed #103

Closed santarinto closed 3 years ago

santarinto commented 3 years ago

Hello, I can't connect to the container via a shared port, in this case we are talking about a Postgresql container

➜  ~ docker-machine ls
NAME   ACTIVE   DRIVER      STATE     URL                      SWARM   DOCKER      ERRORS
mname    *        parallels   Running   tcp://10.211.55.3:2376           v19.03.12
➜  ~

And docker output

➜  ~ docker ps
CONTAINER ID   IMAGE                                                         COMMAND                  CREATED          STATUS          PORTS                                                 NAMES
---//// -----
100692d8a461   xxxxxxxx.ru/postgres:12                       "docker-entrypoint.s…"   16 minutes ago   Up 16 minutes   0.0.0.0:5435->5432/tcp                                mname-test_postgres_1
➜  ~

Before all work on vbox driver. In just time connection error pgsql [08001] conn error

I apologize in advance if I take you away from work. May be i need setup shared port on paralles gui ?

legal90 commented 3 years ago

How do you try to connect?

If you want to connect from your Mac host, then you should use the VM's IP: 10.211.55.3:5435 or $(docker-machine ip mname):5435

Ref: https://github.com/Parallels/docker-machine-parallels/issues/89#issuecomment-623611523

santarinto commented 3 years ago

Yes, i connect by ip 10.211.55.3. after some time, everything worked.