Skip to content

Error in dbConnect(): linux socket location moved #564

@helmingstay

Description

@helmingstay

I'm running Postgres 15 and the current CRAN RPostgres on debian 12.
When I do:

> con <- dbConnect(Postgres())

I get the following:

Error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?

I confirmed via psql that the database is running and accessible with current user.
Some poking around:
$ netstat -nlp | grep 5432
shows the socket at /var/run/postgresql/.s.PGSQL.5432

I was able to get a successful dbConnect() after doing:
$ ln -s /var/run/postgresql/.s.PGSQL.5432 /tmp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions