Docker cannot connect to 172. IP from within container

  Kiến thức lập trình

I have a Scylla database running on an internal IP: 172.31.0.169. I am running Docker version 26.1.0 on Ubuntu 20.04.

From outside of the Docker container, I can connect to the database on that IP. From within the container, I am getting the following error:

Connection error: (‘Unable to connect to any servers’, {‘172.31.0.169’: IOError(2, ‘No such file or directory’)})

From the Docker config, I am running the containers on this network, which shouldn’t interfere with 172.31.0.169.

“Subnet”: “172.16.0.0/20”

Has anyone experienced this? What would help here?

LEAVE A COMMENT