Thursday, March 4, 2021

[google-cloud-sql-discuss] cloud proxy - in cloud build, connection?

Hi there,

recently started evaluating gcp for tooling and have a question regarding the cloud-proxy that starts automatically.

I dont seem to be able to connect to it in the documented manner on 127.0.0.1:3307 

Anyone have any experience with this?

```
Step #2 - "migrate": ---------- CONNECT CLOUDSQL ----------
Step #2 - "migrate": cloud_sql_proxy is running.
Step #2 - "migrate": Connections: hardy-clover-******:europe-west3:db-dev-mccmsdemo.
Step #2 - "migrate":
Step #2 - "migrate": ---------- EXECUTE COMMAND ----------
Step #2 - "migrate": sh .cloudbuild/django_migrate.sh
Step #2 - "migrate": 🎸 migrate postgres://*******:***********@127.0.0.1:3307/dbname
Step #2 - "migrate": Traceback (most recent call last):
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
Step #2 - "migrate": self.connect()
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
Step #2 - "migrate": return func(*args, **kwargs)
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
Step #2 - "migrate": self.connection = self.get_new_connection(conn_params)
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
Step #2 - "migrate": return func(*args, **kwargs)
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
Step #2 - "migrate": connection = Database.connect(**conn_params)
Step #2 - "migrate": File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
Step #2 - "migrate": conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
Step #2 - "migrate": psycopg2.OperationalError: could not connect to server: Connection refused
Step #2 - "migrate": Is the server running on host "127.0.0.1" and accepting
Step #2 - "migrate": TCP/IP connections on port 3307?
Step #2 - "migrate":
Step #2 - "migrate":
Step #2 - "migrate": The above exception was the direct cause of the following exception:
```

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5e8d4d79-03d7-4de4-9d6d-30fc24864a61n%40googlegroups.com.

No comments:

Post a Comment