Thread: Connection refused (0x0000274D/10061)

Connection refused (0x0000274D/10061)

From
"Pietro Laranci"
Date:
 Good morning to everybody
 
I have a pg9 db to wich i can connect to by local but not from remote. In the properties of the postgres db , the port is set to 5300 (not the default 5432).
I tried to connect in remote with pgadmin3 and quantum gis, both give the error Connection refused (0x0000274D/10061).
This is the complet message in quantum gis (but is silimar in pgadmin3)
 

"could not connect to server: Connection refused (0x0000274D/10061)

Is the server running on host "95.110.201.74" and accepting

TCP/IP connections on port 5300?"

 

Whit both the programs installed on the same pc of the db, i can connect without problem to the db.

 

I already did these settings:

 

- in postgresql.conf : listen_addresses = '*' and port = 5300 (in the place of the default 5432)

 

- in pg_hba.conf: 

host   [dbname]   all     0.0.0.0/0      md5

host   [dbname]  all      127.0.0.1/32         md5

 

- restarted postgres

 

 

I also tried to substitute on the db properties "host=localhost" with "host=95.110.201.74"

 

On the machines are not active firewalls.

 

Have you any clue of what's wrong?

 

Grazie

 

Thanks

 

Re: Connection refused (0x0000274D/10061)

From
Adrian Klaver
Date:
On Friday, September 30, 2011 3:17:51 am Pietro Laranci wrote:
>  Good morning to everybody
>
> I have a pg9 db to wich i can connect to by local but not from remote. In
> the properties of the postgres db , the port is set to 5300 (not the
> default 5432). I tried to connect in remote with pgadmin3 and quantum gis,
> both give the error Connection refused (0x0000274D/10061). This is the
> complet message in quantum gis (but is silimar in pgadmin3)
>
> "could not connect to server: Connection refused (0x0000274D/10061)
>
> Is the server running on host "95.110.201.74" and accepting
>
> TCP/IP connections on port 5300?"
>
>
>
> Whit both the programs installed on the same pc of the db, i can connect
> without problem to the db.
>
>
>
> I already did these settings:
>
>
>
> - in postgresql.conf : listen_addresses = '*' and port = 5300 (in the place
> of the default 5432)
>
>
>
> - in pg_hba.conf:
>
> host   [dbname]   all     0.0.0.0/0      md5
>
> host   [dbname]  all      127.0.0.1/32         md5
>
>
>
> - restarted postgres
>
>
>
>
>
> I also tried to substitute on the db properties "host=localhost" with
> "host=95.110.201.74"
>
>
>
> On the machines are not active firewalls.
>
>
>
> Have you any clue of what's wrong?

You did not say what OS you are running Postgres on, at a guess I am going to go
with Windows. Are you sure the Windows firewall is not blocking port 5300?

>
>
>
> Grazie
>
>
>
> Thanks

--
Adrian Klaver
adrian.klaver@gmail.com

Re: Connection refused (0x0000274D/10061)

From
Craig Ringer
Date:
On 09/30/2011 06:17 PM, Pietro Laranci wrote:

> On the machines are not active firewalls.

Most likely there _is_ a firewall involved, maybe just not one you're
aware of. As Adrian said, check the settings in the standard Windows
Firewall if you're on Windows.

For more troubleshooting: Check netstat to see if PostgreSQL is actually
listening on the port you've configured. Use Wireshark to capture
incoming tcp/ip traffic and see if (a) SYN packets to open the
connection actually reach the server, and (b) whether the server
actually replies with an RST to reject the connection or if something
else happens.

--
Craig Ringer