-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supabase db diff fails with: psycopg2.OperationalError: could not translate host name "localhost" to address: Try again #1574
Comments
This could be due to localhost resolving to ipv6 address on your machine. Could you give the beta version a try?
|
I think the real issue is that the meta container started during the diff use localhost as target db. In this case, localhost will resolve to the meta container itself and not the real host. Using I think one solution would be to to replace |
We use docker's host network mode to allow localhost in migra container to resolve to the host machine's ip. @ArnaudScheffler are you able to reproduce this issue using beta version? |
Yes, I have the same issue with the beta version :
I still belive there is something wrong with localhost inside the meta container. Take a look at the following tests :
Localhost doesn't resolve in container but it's ok outside :
|
Hmm my best guess is some differences between OS. As mentioned in their docs
I personally use an intel mac, and the command works
Are you perhaps on windows? |
Oh okay, it seems that host network can be tricky 😞. |
@ArnaudScheffler give https://orbstack.dev/ a try, it unifies network issues between different OSs. btw. Docker Desktop do not support ipv6 (https://docs.docker.com/desktop/troubleshoot/known-issues/) and your logs state that it indeed still tries to connect to ipv6 address. |
I have Linux as well
Le lun. 23 oct. 2023, 15:44, Kamil Ogórek ***@***.***> a
écrit :
… @ArnaudScheffler <https://github.com/ArnaudScheffler> give
https://orbstack.dev/ a try, it unifies network issues between different
OSs.
—
Reply to this email directly, view it on GitHub
<#1574 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJB5FCNWE5ZEYSASO6ANXFTYAZYFPAVCNFSM6AAAAAA552MSKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVGIZTIMRXGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks for the discovery @kamilogorek ! I've also tried 127.0.0.1, my Mac IPv4 address and it's DNS name :
I found a workaround for my specific use case : my target db is in fact in a k8s cluster. I initially used kubectl proxy to establish a connection but I found another way to expose the db so it doesn't use localhost anymore. |
Closing the issue, as it seems like the original issue has been partially resolved or there is a working solution. Please do not hesitate to ping me if it is still relevant, and I will happily reopen it. |
Hi. I'm sorry, but I didn't get the solution. |
@vixalien are you using docker desktop or just docker engine? https://docs.docker.com/desktop/install/archlinux/ I suspect host network requires docker desktop to work. |
I use docker engine. however, I don't think it's the one causing the issue
because otherwise supabase used to work correctly.
Le mar. 24 oct. 2023, 04:33, Han Qiao ***@***.***> a écrit :
… @vixalien <https://github.com/vixalien> are you using docker desktop or
just docker engine? https://docs.docker.com/desktop/install/archlinux/
I suspect host network requires docker desktop to work.
—
Reply to this email directly, view it on GitHub
<#1574 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJB5FCJVSSGQCUEMR5RG5NTYA4SI3AVCNFSM6AAAAAA552MSKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGQYDINJSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This works for me. I'm using Windows. |
Updated cli today from 1.115.4 where everything worked to 1.123.4 and received this error, using Apple silicon. Update: but now I see that 1.115.4 was released on November 27th and OP is using 1.100.1 with issue created in October so the cause might be different |
This should have been resolved by #1852 |
Hello I am getting exactly the same error word by word. It worked fine before but it just started doing this. Could it be due to the latest supabase updates ? (ipv6 migration for instance) |
@ivan-robert could you create a new issue please? The original error concerns local diff only. It's completely unrelated to IPv6 migration. |
I can and will if necessary, but my usecase is exactly the same. I am only trying to run supabase diff --linked to pull the remote in a local instance edit: I am currently writing the issue |
Yes a new issue would be good because this ticket is about diffing without As a blind shot though, you can try |
Tried the command but got the same error... Here is the issue : #1910 |
same error here on windows using |
Facing this issue when try to run project on docker: |
Describe the bug
I'm trying to do
supabase db diff
but it fails withpsycopg2.OperationalError: could not translate host name "localhost" to address: Try again
. I even tried changing the DNS resolver from native to https, but it doesn't workTo Reproduce
Steps to reproduce the behavior:
Expected behavior
Normal diff to get written
Screenshots
Logs:
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: