3dcitydb / 3dcitydb-qgis-explorer

QGIS Plugin for working the the 3DCityDB
GNU General Public License v2.0
7 stars 5 forks source link

Not able to connect to PostGIS DB #5

Open larsgrobe opened 2 years ago

larsgrobe commented 2 years ago

Dear authors,

this extension appears to be a fantastic interface to access 3D model data from within QGIS. Unfortunately, I get a connection error from the widget. Has the plugin been tested with recent QGIS-releases? I am using QGIS 3.20 with the latest Extension installed as ZIP from Github. I am accessing my DB via a ssh tunnel, forwarding to the remote PostGIS port. This works well anywhere else in QGIS. I have 3DCityDB 4 installed on the PostGIS-Server.

Best, Lars.

dokgeppo commented 2 years ago

Hi,

I just tried QGIS 3.20 with a local PostgreSQL and everything is working fine. Have you got more details of your error? Thanks

larsgrobe commented 2 years ago

Hi,

I am on MacOS with QGis 3.20.2. I am connecting to a remote postgresql via an ssh tunnel (local port 60000). I can open the db in the connections panel as well as the db manager, which shows me 3 schemata: public, citydb, and city_pkg.

The widget gives me nothing but an „Error connecting to database“. I could not find any other output to the console.

Best, Lars.

Am 14.08.2021 um 21:14 schrieb dokgeppo @.***>:

Hi,

I just tried QGIS 3.20 with a local PostgreSQL and everything is working fine. Have you got more details of your error? Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-qgis-explorer/issues/5#issuecomment-898947340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIT26HWFWGNG3I7TAKUDDLT426CBANCNFSM5BXLM2TA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

Swahhillie commented 2 years ago

Hello,

I had this problem. My workaround was to use basic authentication in QGIS for the PostGIS connection. Using a configuration in the QGIS credential database did now allow me to connect.

Greetings, David

muratkendir commented 2 years ago

@larsgrobe Did you ever tried to make a connection from QGIS with similar configuration, but with SSLmode = allow or prefer option? Maybe default mode for sslmode parameter is "disabled" in your system.

Stinkender commented 1 year ago

Hi, I am on MacOS with QGis 3.20.2. I am connecting to a remote postgresql via an ssh tunnel (local port 60000). I can open the db in the connections panel as well as the db manager, which shows me 3 schemata: public, citydb, and city_pkg. The widget gives me nothing but an „Error connecting to database“. I could not find any other output to the console. Best, Lars. Am 14.08.2021 um 21:14 schrieb dokgeppo @.***>: Hi, I just tried QGIS 3.20 with a local PostgreSQL and everything is working fine. Have you got more details of your error? Thanks — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#5 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIT26HWFWGNG3I7TAKUDDLT426CBANCNFSM5BXLM2TA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

I'm having the same issue (I'm currently on Windows, QGIS 3.26.0-Buenos Aires). I can open the db in the connections panel as well as in the db manager. The widget gives me the "Error connecting to database" message. Also noticed that closing and re-opening the widget during one QGIS session won't work, I have to restart QGIS in order to be able to open the widget again.

clausnagel commented 1 year ago

Please check out an alternative QGIS plugin for the 3DCityDB here: https://github.com/tudelft3d/3DCityDB-QGIS-Loader. It comes with a comprehensive user guide.

Stinkender commented 1 year ago

Please check out an alternative QGIS plugin for the 3DCityDB here: https://github.com/tudelft3d/3DCityDB-QGIS-Loader. It comes with a comprehensive user guide.

Thanks! Took some fiddling and head-scratching, but managed to get it to work. I had to store my db username and pw in the connection settings to get the plugin's admin mode to work properly, though (or at least that's how I got rid of the " ERROR: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied" message).