troubleshooting

How to fix connection issue with PostgreSQL when using Docker container?

I'm trying to connect to PostgreSQL running in a Docker container but getting a connection error. I've tried connecting using psql but it fails with an error message. The container logs show that the server is started on 127.0.0.1:4566. What could be the issue and how can I fix it?

Fa

Farhad Farahi

Asked on Apr 19, 2024

  • The issue might be related to the network configuration of the Docker container.
  • Adding --net=host flag to the docker run command can solve the problem.
docker run -it --name risingwave --rm --net=host risingwavelabs/risingwave:v1.8.1 single_node

This flag allows the container to share the network namespace with the host, enabling it to access services running on the host machine.

Apr 19, 2024Edited by