Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB Manager in 3.11 Master can't connect to PostGIS Enabled database #34132

Closed
northrivergeo opened this issue Jan 30, 2020 · 4 comments · Fixed by #34171
Closed

DB Manager in 3.11 Master can't connect to PostGIS Enabled database #34132

northrivergeo opened this issue Jan 30, 2020 · 4 comments · Fixed by #34171
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore

Comments

@northrivergeo
Copy link

postgresql -> 12
PostGIS -> 3
QGIS -> 3.11 Rev: 50514b9
Ubuntu Linux 19.10

If I use the Data Source Manager I can successfully connect to any of my Postgresql/postgis connections.

I can't connect through DB Manager on any of the databases. No Crashing results.

Connecting through dbmanager results in this:
Screenshot from 2020-01-29 18-56-58

Starting QGIS in a terminal QGIS gives me this error log (tried connecting to 3 databases):

../../src/core/qgsdatasourceuri.cpp:158 : (QgsDataSourceUri) [0ms] connection timeout ignored
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [17285ms] 2020-01-29T18:48:37 PostGIS[1] Connection to database failed
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

../../src/providers/postgres/qgspostgresconn.cpp:2185 : (connUri) [11535ms] theConnName = henrycounty
../../src/providers/postgres/qgspostgresconn.cpp:222 : (QgsPostgresConn) [0ms] New PostgreSQL connection for port=5432
../../src/core/qgsdatasourceuri.cpp:158 : (QgsDataSourceUri) [1ms] connection timeout ignored
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [13252ms] 2020-01-29T18:49:02 PostGIS[1] Connection to database failed
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

../../src/providers/postgres/qgspostgresconn.cpp:2185 : (connUri) [5206ms] theConnName = tristate
../../src/providers/postgres/qgspostgresconn.cpp:222 : (QgsPostgresConn) [0ms] New PostgreSQL connection for port=5432
../../src/core/qgsdatasourceuri.cpp:158 : (QgsDataSourceUri) [1ms] connection timeout ignored
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [18788ms] 2020-01-29T18:49:25 PostGIS[1] Connection to database failed
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

@northrivergeo northrivergeo added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 30, 2020
@gioman
Copy link
Contributor

gioman commented Jan 30, 2020

Confirmed also here with older PostgreSQL endpoints (don't think it matters).

@gioman gioman added Regression Something which used to work, but doesn't anymore DB Manager Relating to the DB Manager core plugin labels Jan 30, 2020
@elpaso elpaso self-assigned this Jan 31, 2020
@FelisPimeja
Copy link
Contributor

Can also confirm on Windows with different Postgresql versions (9.5, 9.6, 10, 12)

@elpaso
Copy link
Contributor

elpaso commented Jan 31, 2020

@FelisPimeja @gioman @rjhale1971

Can you please test this PR? https://github.com/qgis/QGIS/pull/34171/files

You can manually patch python code on your installation to test it, it's just a few lines of code.

@FelisPimeja
Copy link
Contributor

@elpaso
It works - all is Ok for me now! Good job. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants