Cannot access localhost to WSL Rancher desktop container #7188
andrewduan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am facing issue to connect to Postgres container on WSL from DBeaver. Here is my spec
WSL 2,
Rancher desktop 1.14.2
When I enable Networking Tunnel, and run nerdctl compose with docker-compose file, I can see bunch of containers spinned up.
one of them was postgres, port config was 5432:5432. I tried to connect to it via DBerver by host: localhost, port:5432, connection timeout, but I could connect to it via my local IPV4 address or WSL IPV4 address. Not sure what I have missed. Our projects internally connected to postgres via localhost threw error too. ( flyway threw exception said cannot connect to postgres)
Further information on this, if I disable Networking Tunnel, after containers spinned up in Rancher desktop, our project could run successfully but I had no way to connect to postgres via DBeaver, only way I can do is nerdctl exec -it SERVICE_NAME bash. which is very inconvenient.
Thanks in advance for any suggestions.
I have read #6515, but seems still issue for me.
Beta Was this translation helpful? Give feedback.
All reactions