3

I recently installed QGIS 2.0.1 and uDig 1.40b on the same computer. PostGIS (from OpenGEO Suite) is running on my server. I'm able to connect to PostGIS and access layers with uDig but not with QGIS. Any thoughts why uDig works but not QGIS? I've tried previous versions of QGIS but without success.

UPDATE:

Thanks to all of you responding to my question. I have a few items to update my original question.

Below is the parameters entered in QGIS to connect to PostGIS on a remote server (and, yes, the port for PostGIS is 54321).

enter image description here

The error message is below.

enter image description here

I have recently connected to the PostGIS database with OpenJump without problems (as well as with uDig).

Your thoughts are greatly appreciated.

Scott

UPDATE 2:

In response to recent questions: (1) uDig, OpenJump and QGIS are all on the same client computer and OpenGEO is on a separate server, (2) pg_hba.conf has the following settings: # IPv4 local connections: host all all 0.0.0.1/0 trust, (3) postgresql.conf has the following settings: listen_addresses = '*' port = 54321, (4) tables and field names are all in lower case, and (5) same credentials used for QGIS, uDig and OpenJump.

UPDATE 3:

In place of the computer name (on the local network) I entered the IP address of the server and the connection was made between QGIS and PostGIS. It appears (in my situation) I cannot enter the hostname of the server to make the connection, only the IP. Anyone else encounter this phenomena?

FINAL UPDATE:

YES! The issue with the setting for IPv6 solved the problem. I'm able to connect to the server by its hostname as well as its IP address.

  • Do you get any errors from QGIS when trying to connect? If you do, maybe update your question with those details. – SaultDon Sep 20 '13 at 21:37
  • We are a lot of people using PostGIS with QGIS without any problem since years so there must be some configurations issues on your side... – Etienne Desgagné Sep 20 '13 at 21:39
  • 2
    The only issue I'm aware of is that QGIS will always need a username+password even if the database doesn't have a password defined. – underdark Sep 20 '13 at 21:41
  • Do any of your tablenames or fieldnames include uppercase letters? Try converting them to all lowercase. See Postgresql for Qgis and Arcgis - What to do/What not to do and What does 'DBMS table not found' message mean? for additional discussion points. – RyanDalton Sep 24 '13 at 2:15
  • 1
    RE: Port Number - "That's amazing. I've got the same combination on my luggage." -from Spaceballs, the movie :) – RyanDalton Sep 24 '13 at 21:19
3

You connected to PostreSQL perfectly, but your credentials were rejected. Your issue is either with the credentials you used (bad username/password), or with the pg_hba.conf file. Is uDig installed on the same computer as QGIS? What does your pg_hba.conf file look like?


The error message shows a host name that resembles an IPv6 address "fe80::5d19:5338:ab5b:14f9%10" (except it isn't due to the "%10" part), but you appear to only have an entry for IPv4 addresses. If you have full trust of your network, try adding this line to pg_hba.conf, then reload the PostgreSQL server:

# Allow all IPv6 connections
host    all             all             ::/0                 trust

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.