Closed gilbert closed 9 months ago
To help us debug, could you produce the logs from 3189bce66164
container while supabase db diff
is running?
Here you go:
% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
98890b01c110 public.ecr.aws/supabase/postgres:15.1.0.117 "sh -c 'cat <<'EOF' …" 3 seconds ago Up 2 seconds (health: starting) 0.0.0.0:54320->5432/tcp, :::54320->5432/tcp
This is the same problem that I faced but after uninstalling supabase and installing again, it finally got resolved.
uninstalling and reinstalling did not work for me
it's the same probleme for me, not changes after uninstalling and reinstalling :/
I'm experiencing this too... any updates @sweatybridge ?
Edit:
I am able to run supabase db push
no problem; here's my stack dump from running supabase db diff --linked -f diff
(the initial connection to the remote database succeeds, but then fails on the step trying to diff the schemas):
supabase db diff --linked -f diff
Connecting to remote database...
Creating shadow database...
Setting up initial schema...
Applying migration 20240129203320_diff.sql...
Applying migration 20240129224506_diff.sql...
Applying migration 20240129224939_diff.sql...
Applying migration 20240129225049_diff.sql...
Applying migration 20240129225949_diff.sql...
Applying migration 20240129230626_diff.sql...
Applying migration 20240129233053_diff.sql...
Applying migration 20240129233215_diff.sql...
Applying migration 20240129234646_diff.sql...
Applying migration 20240129234905_diff.sql...
Applying migration 20240129235646_diff.sql...
Applying migration 20240130052914_diff.sql...
Diffing schemas: extensions,public
error diffing schema: error running container: exit 1:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/schemainspect/misc.py", line 9, in connection_from_s_or_c
s_or_c.engine
AttributeError: 'Session' object has no attribute 'engine'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
self._dbapi_connection = engine.raw_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3293, in raw_connection
return self.pool.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 452, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 1269, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 170, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
self.__connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 903, in __connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 645, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 616, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "db.echqtnprrbihnlvckhyw.supabase.co" (2600:1f18:2e13:9d04:b2e2:a45d:c0cf:71db), port 5432 failed: Network unreachable
Is the server running on that host and accepting TCP/IP connections?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/migra", line 8, in <module>
sys.exit(do_command())
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 121, in do_command
status = run(args)
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 86, in run
m = Migration(
File "/usr/local/lib/python3.9/site-packages/migra/migra.py", line 39, in __init__
self.changes.i_target = get_inspector(
File "/usr/local/lib/python3.9/site-packages/schemainspect/get.py", line 14, in get_inspector
c = connection_from_s_or_c(x)
File "/usr/local/lib/python3.9/site-packages/schemainspect/misc.py", line 14, in connection_from_s_or_c
return s_or_c.connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2031, in connection
return self._connection_for_bind(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2047, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
File "<string>", line 2, in _connection_for_bind
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1143, in _connection_for_bind
conn = bind.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3269, in connect
return self._connection_cls(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 147, in __init__
Connection._handle_dbapi_exception_noconnection(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2431, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
self._dbapi_connection = engine.raw_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3293, in raw_connection
return self.pool.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 452, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 1269, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 170, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
self.__connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 903, in __connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 645, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 616, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "db.echqtnprrbihnlvckhyw.supabase.co" (2600:1f18:2e13:9d04:b2e2:a45d:c0cf:71db), port 5432 failed: Network unreachable
Is the server running on that host and accepting TCP/IP connections?
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Seems like migra cannot connect to IPv6 address. I will take a closer look today
Is there a way around while this gets worked out?
@honeybread they just use migra under the hood, so if it's a huge road block, you could just use the connection strings for your local and remote supabase instances and manually invoke migra: https://github.com/djrobstep/migra
@nbarrow-inspire-labs thank you!
Is there a way around while this gets worked out?
Yes the workaround is to pass in the pooler url via --db-url
flag which resolves to IPv4 address.
Is there a way around while this gets worked out?
Yes the workaround is to pass in the pooler url via
--db-url
flag which resolves to IPv4 address.
got the same error on db pull
today. ~this solved it.~
spoke too soon, now I have this issue: https://github.com/supabase/cli/issues/1574
updated the cli to the newest version. still an issue, although error message a bit more verbose.
system: System Version: macOS 14.3 (23D56) Kernel Version: Darwin 23.3.0
This should be resolved in beta release v1.141.2
npx supabase@beta db pull
This should be resolved in beta release v1.141.2
npx supabase@beta db pull
maybe I am doing something wrong, but neither npx supabase@beta db pull
nor npx supabase@beta db pull --db-url postgres://...
work for me.
@simicvm do you mind sharing the logs with --debug
flag?
@sweatybridge 👍
npx supabase@beta db pull --debug --db-url postgres://...
This one manages to connect and authenticate but fails during migration. Output bellow is only the last part before the error, the whole thing has more than 1000 lines.
2024/02/02 18:26:39 Sent Header: Host [api.moby.localhost]
2024/02/02 18:26:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:26:39 Send Done
2024/02/02 18:26:39 Recv First Byte
2024/02/02 18:26:39 Sent Header: Host [api.moby.localhost]
2024/02/02 18:26:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:26:39 Sent Header: Content-Length [2524]
2024/02/02 18:26:39 Sent Header: Content-Type [application/json]
2024/02/02 18:26:39 Send Done
2024/02/02 18:26:39 Recv First Bytec
2024/02/02 18:26:39 Sent Header: Host [api.moby.localhost]
2024/02/02 18:26:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:26:39 Sent Header: Content-Length [0]
2024/02/02 18:26:39 Sent Header: Content-Type [text/plain]
2024/02/02 18:26:39 Send Done
2024/02/02 18:26:39 Recv First Byte
2024/02/02 18:26:39 Sent Header: Host [api.moby.localhost]
2024/02/02 18:26:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:26:39 Send Done
2024/02/02 18:26:39 Recv First Byte
2024/02/02 18:26:51 Sent Header: Host [api.moby.localhost]
2024/02/02 18:26:51 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:26:51 Send Done
2024/02/02 18:26:51 Recv First Byte
2024/02/02 18:26:51 PG Send: {"Type":"Terminate"}
error diffing schema: error running container: exit 1:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/schemainspect/misc.py", line 9, in connection_from_s_or_c
s_or_c.engine
AttributeError: 'Session' object has no attribute 'engine'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
self._dbapi_connection = engine.raw_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3293, in raw_connection
return self.pool.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 452, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 1269, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 170, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
self.__connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 903, in __connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 645, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 616, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: server didn't return client encoding
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/migra", line 8, in <module>
sys.exit(do_command())
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 121, in do_command
status = run(args)
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 86, in run
m = Migration(
File "/usr/local/lib/python3.9/site-packages/migra/migra.py", line 39, in __init__
self.changes.i_target = get_inspector(
File "/usr/local/lib/python3.9/site-packages/schemainspect/get.py", line 14, in get_inspector
c = connection_from_s_or_c(x)
File "/usr/local/lib/python3.9/site-packages/schemainspect/misc.py", line 14, in connection_from_s_or_c
return s_or_c.connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2031, in connection
return self._connection_for_bind(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2047, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
File "<string>", line 2, in _connection_for_bind
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1143, in _connection_for_bind
conn = bind.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3269, in connect
return self._connection_cls(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 147, in __init__
Connection._handle_dbapi_exception_noconnection(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2431, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
self._dbapi_connection = engine.raw_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3293, in raw_connection
return self.pool.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 452, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 1269, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 170, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
self.__connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 903, in __connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 645, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 616, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) server didn't return client encoding
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Using npx supabase@beta db pull --debug
results in something like this
Pooler URL is not configured
Supabase CLI 1.142.0
2024/02/02 18:50:46 Sent Header: Host [api.moby.localhost]
2024/02/02 18:50:46 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/02/02 18:50:46 Send Done
2024/02/02 18:50:46 Recv First Byte
Connecting to remote database...
2024/02/02 18:50:48 Connect Start: tcp ...
2024/02/02 18:50:48 Connect Error: tcp ...
...: connect: connection refused
failed to connect to postgres: failed to connect to `host=....supabase.co user=postgres database=postgres`: dial error (dial tcp ... connect: connection refused)
Pooler URL is not configured
I believe the second error can be resolved by running supabase link
again. That will configure the pooler url locally for your project.
I will ping our internal team regarding the first error. It seems like the pooler response may not be fully compliant.
thanks, that actually worked. I re-linked the project andnpx supabase@beta db pull
worked fine.
Yup, re-linking worked for me too. Thanks a lot!
Any solution with this please when i run supabase push and enter my password i get the above error. i reset db password and also link project yet if fails
when i run supabase push and enter my password i get the above error. i reset db password and also link project yet if fails
This should have been a new issue.
@emmyduruc Sorry to be the bearer of bad news but it looks like your network does not support IPv6. Check here: https://test-ipv6.com Or from the command line: curl -6 https://ifconfig.co/ip You should see an IPv6 address in your connection settings, not just an IPv4.
If not: Try another network, maybe share your phone's hotspot, a neighbor, or public access point.
You're gonna want to read this, you may need to opt into the IPv4 add on if you cannot resolve your local network IPv6 issue. https://supabase.com/docs/guides/database/connecting-to-postgres
From this issue: PGBouncer and IPv4 Deprecation #17817 ):
Do I need to make any changes if I am using the CLI?
If you are using a version before 1.136.3, please upgrade to a later version of the CLI and run supabase link. If you haven’t run supabase link since 1st January 2024, please run it again after upgrading. This will enable the CLI to communicate to the database from IPv4 only environments because the communication happens via Supavisor. This change is required if you are using from the CLI from an environment without IPv6 support, like Github actions or possibly from your home network.
However, this did not work for me. I had to break down and finally setup IPv6 on my home firewall. I was able to use my phone's hotspot to push db migrations in the interim.
To this date, running Supabase 1.142.2, I can relink on an IPv6 network, stop/start supabase local, but still cannot perform any action that attempts to connect to the remote db when on an IPv4 only network.
npx supabase@beta db push --db-url ...
worked for me, even though test-ipv6.com showed "No IPv6 address detected".
npx supabase@beta db push --db-url ...
worked for me, even though test-ipv6.com showed "No IPv6 address detected".
Thank's @Greyvend, I'll have to give that a go on another project. Definitely do not want to pull the beta on a production project.
Update: Went ahead and tried this out using a command with no side-effects and it does work for me as well. (disabled IPv6 for the test) Thank you Serge!
pnpx supabase@beta migration list --db-url postgres://[USER].[PROJ-REF]:[PASSWORD]@aws-0-us-west-1.pooler.supabase.com:[PORT]/[DB-NAME]
i tried with supabase@beta version 1.144.2 and still getting the same error "Network unreachable" while running the db diff command:
npx supabase db diff --linked -f new_migrations
Things already tried
npx supabase link
npx supabase@beta migration list --db-url MY_DB_URL
npx supabase db diff --linked -f file
:
Connecting to remote database...
Creating shadow database... Failed to remove container: bbdd6bece84049e71a42894119f5fb5a7de7fbf326a802df210c2b35a506edb3 Error response from daemon: No such container: bbdd6bece84049e71a42894119f5fb5a7de7fbf326a802df210c2b35a506edb3 database is not healthy
Bug log
error diffing schema: error running container: exit 1:During handling of the above exception, another exception occurred:
Traceback (most recent call last):
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "db.skmwflowcvlfbmpqzcug.supabase.co" (2600:1f18:2e13:9d02:ace6:43f:445a:3a49), port 5432 failed: Network unreachable
Is the server running on that host and accepting TCP/IP connections?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/migra", line 8, in
sys.exit(do_command())
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 121, in do_command
status = run(args)
File "/usr/local/lib/python3.9/site-packages/migra/command.py", line 86, in run
m = Migration(
File "/usr/local/lib/python3.9/site-packages/migra/migra.py", line 39, in init
self.changes.i_target = get_inspector(
File "/usr/local/lib/python3.9/site-packages/schemainspect/get.py", line 14, in get_inspector
c = connection_from_s_or_c(x)
File "/usr/local/lib/python3.9/site-packages/schemainspect/misc.py", line 14, in connection_from_s_or_c
return s_or_c.connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2031, in connection
return self._connection_for_bind(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2047, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
File "
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, kw)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1143, in _connection_for_bind
conn = bind.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3269, in connect
return self._connection_cls(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 147, in init
Connection._handle_dbapi_exception_noconnection(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2431, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 145, in init
self._dbapi_connection = engine.raw_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3293, in raw_connection
return self.pool.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 452, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 1269, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 170, in _do_get
self._dec_overflow()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in exit
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 678, in init
self.connect()
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 903, in connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 146, in exit
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py", line 645, in connect
return dialect.connect(*cargs, *cparams)
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 616, in connect
return self.loaded_dbapi.connect(cargs, cparams)
File "/usr/local/lib/python3.9/site-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "db.skmwflowcvlfbmpqzcug.supabase.co" (2600:1f18:2e13:9d02:ace6:43f:445a:3a49), port 5432 failed: Network unreachable
Is the server running on that host and accepting TCP/IP connections?
(Background on this error at: https://sqlalche.me/e/20/e3q8)
This should be resolved in beta release v1.141.2
npx supabase@beta db pull
This solution works for:
failed to connect to host=localhost user=postgres database=postgres
: failed to receive message (unexpected EOF) - Try rerunning the command with --debug to troubleshoot the error.
Bug Report
Describe the bug
Running
supabase db diff
throws a "failed to connect" error:To Reproduce
Steps to reproduce the behavior:
supabase db reset
supabase db diff
Expected behavior
Produce output as the command usually would.
System Info
Additional context
In case it's helpful: When I run
docker ps
in another terminal while runningsupabase db diff
, during itsCreating shadow database...
output / waiting time, I can see the target process running:Here's the full debug output:
Full debug output
``` % supabase db diff --debug | pbcopy Supabase CLI 1.106.1 Connecting to local database... 2023/10/29 15:31:35 Connect Start: tcp [::1]:54322 2023/10/29 15:31:35 Connect Error: tcp [::1]:54322 dial tcp [::1]:54322: connect: connection refused 2023/10/29 15:31:35 Connect Start: tcp 127.0.0.1:54322 2023/10/29 15:31:35 Connect Done: tcp 127.0.0.1:54322 2023/10/29 15:31:35 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}} 2023/10/29 15:31:35 PG Recv: {"Type":"AuthenticationSASL","AuthMechanisms":["SCRAM-SHA-256"]} 2023/10/29 15:31:35 PG Send: {"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"n,,n=,r=wXSRHl7QZKN1F7h9VxR3g9EW"} 2023/10/29 15:31:35 PG Recv: {"Type":"AuthenticationSASLContinue","Data":"r=wXSRHl7QZKN1F7h9VxR3g9EWGFxi27bdYXvKRBGoN+ihfZ5F,s=V6sB21EybtDJi/QvHZevGQ==,i=4096"} 2023/10/29 15:31:35 PG Send: {"Type":"SASLResponse","Data":"c=biws,r=wXSRHl7QZKN1F7h9VxR3g9EWGFxi27bdYXvKRBGoN+ihfZ5F,p=Gpu1pmTIJ78DWushWXy27fSDZtrv0Ms8RgPSIZdkDng="} 2023/10/29 15:31:35 PG Recv: {"Type":"AuthenticationSASLFinal","Data":"v=Km4X5HTphFn4pCOkMM0/ALXoTVwDjmhHQ00yh3hb+v4="} 2023/10/29 15:31:35 PG Recv: {"Type":"AuthenticationOK"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"application_name","Value":""} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"client_encoding","Value":"UTF8"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"DateStyle","Value":"ISO, MDY"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"default_transaction_read_only","Value":"off"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"in_hot_standby","Value":"off"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"integer_datetimes","Value":"on"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"IntervalStyle","Value":"postgres"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"is_superuser","Value":"off"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"server_encoding","Value":"UTF8"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"server_version","Value":"15.1 (Ubuntu 15.1-1.pgdg20.04+1)"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"session_authorization","Value":"postgres"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"standard_conforming_strings","Value":"on"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterStatus","Name":"TimeZone","Value":"UTC"} 2023/10/29 15:31:35 PG Recv: {"Type":"BackendKeyData","ProcessID":16432,"SecretKey":1954759019} 2023/10/29 15:31:35 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"} 2023/10/29 15:31:35 PG Send: {"Type":"Parse","Name":"lrupsc_1_0","Query":"SELECT schema_name FROM information_schema.schemata WHERE NOT schema_name LIKE ANY($1) ORDER BY schema_name","ParameterOIDs":null} 2023/10/29 15:31:35 PG Send: {"Type":"Describe","ObjectType":"S","Name":"lrupsc_1_0"} 2023/10/29 15:31:35 PG Send: {"Type":"Sync"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParseComplete"} 2023/10/29 15:31:35 PG Recv: {"Type":"ParameterDescription","ParameterOIDs":[1009]} 2023/10/29 15:31:35 PG Recv: {"Type":"RowDescription","Fields":[{"Name":"schema_name","TableOID":13330,"TableAttributeNumber":2,"DataTypeOID":19,"DataTypeSize":64,"TypeModifier":-1,"Format":0}]} 2023/10/29 15:31:35 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"} 2023/10/29 15:31:35 PG Send: {"Type":"Bind","DestinationPortal":"","PreparedStatement":"lrupsc_1_0","ParameterFormatCodes":[1],"Parameters":[{"binary":"00000001000000000000001900000018000000010000000461757468000000097067626f756e636572000000087265616c74696d650000000a5c5f7265616c74696d650000000773746f726167650000000b5c5f616e616c79746963730000001373757061626173655c5f66756e6374696f6e730000001473757061626173655c5f6d6967726174696f6e7300000013696e666f726d6174696f6e5c5f736368656d610000000570675c5f250000000463726f6e000000076772617068716c0000000f6772617068716c5c5f7075626c6963000000036e6574000000087067736f6469756d0000000f7067736f6469756d5c5f6d61736b73000000057067746c650000000672657061636b0000000574696765720000000b74696765725c5f646174610000000e74696d657363616c6564625c5f25000000105c5f74696d657363616c6564625c5f2500000008746f706f6c6f6779000000057661756c74"}],"ResultFormatCodes":[1]} 2023/10/29 15:31:35 PG Send: {"Type":"Describe","ObjectType":"P","Name":""} 2023/10/29 15:31:35 PG Send: {"Type":"Execute","Portal":"","MaxRows":0} 2023/10/29 15:31:35 PG Send: {"Type":"Sync"} 2023/10/29 15:31:35 PG Recv: {"Type":"BindComplete"} 2023/10/29 15:31:35 PG Recv: {"Type":"RowDescription","Fields":[{"Name":"schema_name","TableOID":13330,"TableAttributeNumber":2,"DataTypeOID":19,"DataTypeSize":64,"TypeModifier":-1,"Format":1}]} 2023/10/29 15:31:35 PG Recv: {"Type":"DataRow","Values":[{"text":"app_admin"}]} 2023/10/29 15:31:35 PG Recv: {"Type":"DataRow","Values":[{"text":"dramatiq"}]} 2023/10/29 15:31:35 PG Recv: {"Type":"DataRow","Values":[{"text":"extensions"}]} 2023/10/29 15:31:35 PG Recv: {"Type":"DataRow","Values":[{"text":"public"}]} 2023/10/29 15:31:35 PG Recv: {"Type":"CommandComplete","CommandTag":"SELECT 4"} 2023/10/29 15:31:35 PG Recv: {"Type":"ReadyForQuery","TxStatus":"I"} Creating shadow database... 2023/10/29 15:31:35 PG Send: {"Type":"Terminate"} 2023/10/29 15:31:35 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:35 Send Done 2023/10/29 15:31:35 Recv First Byte 2023/10/29 15:31:35 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:35 Sent Header: Content-Length [306] 2023/10/29 15:31:35 Sent Header: Content-Type [application/json] 2023/10/29 15:31:35 Send Done 2023/10/29 15:31:35 Recv First Byte 2023/10/29 15:31:35 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:35 Sent Header: Content-Length [11863] 2023/10/29 15:31:35 Sent Header: Content-Type [application/json] 2023/10/29 15:31:35 Send Done 2023/10/29 15:31:35 Recv First Byte 2023/10/29 15:31:35 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:35 Sent Header: Content-Length [0] 2023/10/29 15:31:35 Sent Header: Content-Type [text/plain] 2023/10/29 15:31:35 Send Done 2023/10/29 15:31:36 Recv First Byte 2023/10/29 15:31:36 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:36 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:36 Send Done 2023/10/29 15:31:36 Recv First Byte 2023/10/29 15:31:37 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:37 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:37 Send Done 2023/10/29 15:31:37 Recv First Byte 2023/10/29 15:31:38 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:38 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:38 Send Done 2023/10/29 15:31:38 Recv First Byte 2023/10/29 15:31:39 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:39 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:39 Send Done 2023/10/29 15:31:39 Recv First Byte 2023/10/29 15:31:40 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:40 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:40 Send Done 2023/10/29 15:31:40 Recv First Byte 2023/10/29 15:31:41 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:41 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:41 Send Done 2023/10/29 15:31:41 Recv First Byte 2023/10/29 15:31:42 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:42 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:42 Send Done 2023/10/29 15:31:42 Recv First Byte 2023/10/29 15:31:43 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:43 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:43 Send Done 2023/10/29 15:31:43 Recv First Byte 2023/10/29 15:31:44 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:44 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:44 Send Done 2023/10/29 15:31:44 Recv First Byte 2023/10/29 15:31:45 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:45 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:45 Send Done 2023/10/29 15:31:45 Recv First Byte 2023/10/29 15:31:46 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:46 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:46 Send Done 2023/10/29 15:31:46 Recv First Byte 2023/10/29 15:31:47 Sent Header: Host [api.moby.localhost] 2023/10/29 15:31:47 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)] 2023/10/29 15:31:47 Send Done 2023/10/29 15:31:47 Recv First Byte 2023/10/29 15:31:47 Connect Start: tcp [::1]:54320 2023/10/29 15:31:47 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:47 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:47 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:47 Connect Start: tcp [::1]:54320 2023/10/29 15:31:47 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:47 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:47 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:48 Connect Start: tcp [::1]:54320 2023/10/29 15:31:48 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:48 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:48 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:48 Connect Start: tcp [::1]:54320 2023/10/29 15:31:48 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:48 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:48 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:49 Connect Start: tcp [::1]:54320 2023/10/29 15:31:49 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:49 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:49 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:49 Connect Start: tcp [::1]:54320 2023/10/29 15:31:49 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:49 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:49 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:50 Connect Start: tcp [::1]:54320 2023/10/29 15:31:50 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:50 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:50 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:50 Connect Start: tcp [::1]:54320 2023/10/29 15:31:50 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:50 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:50 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:51 Connect Start: tcp [::1]:54320 2023/10/29 15:31:51 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:51 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:51 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:51 Connect Start: tcp [::1]:54320 2023/10/29 15:31:51 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:51 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:51 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:52 Connect Start: tcp [::1]:54320 2023/10/29 15:31:52 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:52 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:52 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:52 Connect Start: tcp [::1]:54320 2023/10/29 15:31:52 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:52 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:52 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:53 Connect Start: tcp [::1]:54320 2023/10/29 15:31:53 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:53 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:53 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:53 Connect Start: tcp [::1]:54320 2023/10/29 15:31:53 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:53 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:53 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:54 Connect Start: tcp [::1]:54320 2023/10/29 15:31:54 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:54 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:54 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:54 Connect Start: tcp [::1]:54320 2023/10/29 15:31:54 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:54 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:54 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:55 Connect Start: tcp [::1]:54320 2023/10/29 15:31:55 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:55 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:55 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:55 Connect Start: tcp [::1]:54320 2023/10/29 15:31:55 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:55 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:55 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:56 Connect Start: tcp [::1]:54320 2023/10/29 15:31:56 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:56 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:56 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused 2023/10/29 15:31:56 Connect Start: tcp [::1]:54320 2023/10/29 15:31:56 Connect Error: tcp [::1]:54320 dial tcp [::1]:54320: connect: connection refused 2023/10/29 15:31:56 Connect Start: tcp 127.0.0.1:54320 2023/10/29 15:31:56 Connect Error: tcp 127.0.0.1:54320 dial tcp 127.0.0.1:54320: connect: connection refused failed to connect to `host=localhost user=postgres database=postgres`: dial error (dial tcp 127.0.0.1:54320: connect: connection refused) ```