Skip site navigation (1) Skip section navigation (2)

Remote / network connection fails

From: Nils Zierath <nils(dot)zierath(at)uni-bonn(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Remote / network connection fails
Date: 2008-04-16 17:05:51
Message-ID: 480631EF.6020402@uni-bonn.de (view raw or flat)
Thread:
Lists: pgsql-novice
Dear list,
I am trying to connect to my database over the network. When trying to connect to the 
server from a Windows client via psql with

#-> psql -h pg_server_ip -d postgres -U postgres OR
#-> psql -h pg_server_ip -d cms -U cmsuser

I get the following error (same with pgAdmin3)

psql: could not connect to server: Connection refused (0x0000274D/10061)
	Is the server running on host "pg_server_ip" and accepting
	TCP/IP connections on port 5432?

****
- I am using PostgreSQL 8.3 on Debian Etch.
- The server is up and running on host "pg_server_ip" on Port 5432.
- The Postgres server process is running as UNIX user 'postgres'.
- I can connect to the postgres-server locally via PSQL.
- A CMS is running fine with a Postgres data base 'cms' as backend on the same machine.
- I changed 'listen_address' to '*' in postgresql.conf
- iptables allows connections on ports 22, 80 and 5432.
- pg_hba.conf looks as follows:

#	LOCAL CONNECTIONS
	local	all	postgres		ident	sameuser
	local	all	cmsuser			md5
	local	all	all			ident	sameuser

#       IPv4
#	TYPE	DBASE	USER	CIDR-ADDRESS	METHOD	[OPTION]
         host	all	all	131.220.0.0/16	md5
         host	all	all	127.0.0.1/32	md5

- I restarted the Postgres server process / reloaded the config files after modification.

Since the CMS with 'cmsuser' is running fine, I suspect it is connecting locally. What do 
I have to change at the IPv4 connections?

Thanks in advance,
Nils

Responses

pgsql-novice by date

Next:From: Andrej Ricnik-BayDate: 2008-04-16 21:38:04
Subject: Re: Remote / network connection fails
Previous:From: Guido BarosioDate: 2008-04-16 13:55:36
Subject: Re: Inserting a record returned from a function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group