2

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.

Scott
  • 29
  • 2

1 Answers1

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
Mike T
  • 42,095
  • 10
  • 126
  • 187