-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Failure to connect to postgres database defined as service in DB manager #22415
Comments
Author Name: Luigi Pirelli (@luipir) please check if connection is set-up correctly with the target DB name |
Author Name: Admire Nyakudya (@NyakudyaA) When I click on Add postgis layers and define my service configuration I can access the database tables. It is only when I try to access the database using DB manager that it fails to connect |
Author Name: Luigi Pirelli (@luipir) again... try to setup dbname in the connection con figuration. dbname is not set in the screenshot you sent. |
Author Name: Admire Nyakudya (@NyakudyaA) If I define a dbname it works. But I thought the point of using service files is to have the whole database configuration defined in the service file and then just connect. So this way does it mean the port,user name,password are the only parameters that are read from the service file when using DB Manager. When using service files with the Add postgis layers you can just specify service file and no other parameters and it still works. |
Author Name: Luigi Pirelli (@luipir) I don't think this is a but... but a feature request when you add a db layer you connect to a specified db+table (otherwise default is tablename=username)... also just testing connection need a db... if not set it test on postgres db that is the administrative db always present. if need db metadata... eg list of tables in a db, you have to connect to postgresdb and query relative tables. I feel that this have to be changed to feature request or removed as bug. |
Author Name: Tim Sutton (Tim Sutton) Hi Luigi. For me it is a regression - the behaviour changed from how it worked before in < 2.14 and if you are using a service file then you should not need to set the db name or other connection information since these are specified in the service file. |
Author Name: Luigi Pirelli (@luipir) Sorry I didn't know was a regression due to my lack of user experience @Admire, just a question. your DB connection is set-up using basic authentication with user and pwd? or do you use any of the "new" authentication features storing credentials in auth-db? (settings->options->authentication). The answer is useful to me to replicate the problem |
Author Name: Admire Nyakudya (@NyakudyaA) I currently use basic authentication. I have uploaded a sample service file. [[http://www.postgresql.org/docs/9.1/static/libpq-pgservice.html]]
|
Author Name: Luigi Pirelli (@luipir) sorry for my late... we are really busy on testing plugins stuffs. I'll be back on this issue in some days |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Alessandro Pasotti (@elpaso)
|
Author Name: Anónimo (Anónimo) Fixed in changeset "212b125a2c2eba93f2c8e3b991ea4be4fdc57623".
|
Author Name: Luigi Pirelli (@luipir) tnx elpaso |
Author Name: Paolo Cavallini (@pcav) Could you please backport it? Thanks. |
Author Name: Paolo Cavallini (@pcav) Great, thanks. |
Author Name: Sandro Santilli (@strk)
|
Author Name: Sandro Santilli (@strk)
|
Author Name: Admire Nyakudya (@NyakudyaA)
Original Redmine Issue: 14436
Affected QGIS version: 2.14.0
Redmine category:db_manager
Assignee: Alessandro Pasotti
I have set-up a new database connection in QGIS that uses service connection. I can connect successfully but when I try to connect to the same database it fails to connect. The error seems to be centred on DB manager not reading the service files correctly. It reads the user-name as database name and this causes it not to connect
Related issue(s): #22210 (duplicates), #24525 (relates), #24526 (relates)
Redmine related issue(s): 14208, 16625, 16626
The text was updated successfully, but these errors were encountered: