Skip to content

Connecting through psql not accepting unix socket #1071

@rikusen0335

Description

@rikusen0335

Question

Connecting through psql not accepting unix socket, but tcp accepts.
Did I miss something?

Additional Context

This is similar issue but I'm really sure I am not using wrong connection name.

I was also reading about this and this

Reproducing

  1. sudo mkdir /cloudsql; sudo chmod 777 /cloudsql
  2. ./cloud_sql_proxy -dir=/cloudsql shows:
2022/01/12 02:57:02 current FDs rlimit set to 524288, wanted limit is 8500. Nothing to do here.
2022/01/12 02:57:04 Using gcloud's active project: [PROJECT_ID]
2022/01/12 02:57:09 Listening on /cloudsql/PROJECT_ID:REGION:INSTANCE_NAME for PROJECT_ID:REGION:INSTANCE_NAME
2022/01/12 02:57:09 Ready for new connections
2022/01/12 02:57:10 Generated RSA key in 502.627252ms
  1. Copy and paste PROJECT_ID:REGION:INSTANCE_NAME to use psql "sslmode=disable host=/cloudsql/PROJECT_ID:REGION:INSTANCE_NAME user=DB_USER"
  2. Then got:
psql: error: could not connect to server: Not a directory
        Is the server running locally and accepting
        connections on Unix domain socket "/cloudsql/PROJECT_ID:REGION:INSTANCE_NAME/.s.PGSQL.5432"?

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions