lookup konnek-db on 127.0.0.11:53: no such host POSTGRES DOCKER WSL2 not connected error

3.1k views Asked by At

i'm relatively new to windows development enviroment used to use ubuntu before and decided to use windows to try to get best of both world game and development, after follow and research i'm able to setup wsl2, docker and golang since it is my default development needs,

but when i run my docker everything was fine except for the moment where i found that postgres were not connected like this in my docker logs

[00] 2020/10/03 10:42:08 host=konnek-db port=5432 user=postgres dbname=konnek password=postgres sslmode=disable
[00] 2020/10/03 10:42:09 dial tcp: lookup konnek-db on 127.0.0.11:53: no such host
[00] panic: runtime error: invalid memory address or nil pointer dereference
[00] [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa0400e]

again in my other machine where i used to work were using ubuntu and it runs perfectly without any issue the docker yaml that i'm using were also basicly the same that i used to run in my other machine

i also test this using my datagrip and it also shown the same error enter image description here

0

There are 0 answers