Thursday, March 4, 2021

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

hey thanks for the response, this is actually running on the code build servers.. not locally

the proxy seems to just "be there" I did not configure it and it seems to be part of the build image

On Thu, Mar 4, 2021 at 6:37 PM 'Aref Amiri (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hi,

Is there and outbound firewall policy? If yes, you'd have to make sure it allows connections to port 3307 per this public doc.

On Thursday, March 4, 2021 at 10:53:01 AM UTC-5 rcdh wrote:
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 a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/V5rNXCL4os0/unsubscribe.
To unsubscribe from this group and all its topics, 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/356b52f5-304b-43ea-b865-c1a03293d178n%40googlegroups.com.

--
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/CAMtJjOVP%3DseJ9OR%3DXTLb37d-H97%3D1jJm6i%3DkN2_zXskOYW%3Dv6A%40mail.gmail.com.

No comments:

Post a Comment