Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Other computers are having trouble even finding the running Postgresql 9.1 on my Windows 7 machine. Local connections work just fine of course.

In my pg_hba.conf I have:

#office subnets
host    all             all             192.168.##.0/24            md5
host    all             all             192.168.##.0/24            md5

In postgresql.conf I have (Yes, port 5433 is intentional):

listen_addresses = '*'      # what IP address(es) to listen on;
                # comma-separated list of addresses;
                # defaults to 'localhost', '*' = all
                # (change requires restart)
port = 5433             # (change requires restart)

Upon running netstat -a -b in the cmd I find:

 Can not obtain ownership information
   TCP           XXXXX-PC:0           LISTENING

Heck, I even made a firewall exception:

Protocols and Ports:
   Local port: Specific Ports, 5433
   Remote port:  All Ports
Scope: Any IP Address
Advanced: Profiles: Private, Public
Programs and Services:  Apply to this service:  postgresql-x64-9.1

The typical response from pgAdmin is always the dreaded:

Server doesn't listen

could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "...." and accepting TCP/IP connections on port 5433?

Any ideas?

share|improve this question

migrated from Dec 20 '12 at 9:20

This question came from our site for professional and enthusiast programmers.

That all looks reasonable. pg_hba.conf isn't your issue, since you're not even establishing a successful connection. Consider using wireshark to verify that the packets are actually reaching the server. – Craig Ringer Dec 15 '12 at 3:27
I am able to ping the machine from the other machine and observe that in Wireshark. However, I don't see any tcp.dstport == 5433 or tcp.srcport == 5433 in the records. This absence is also observed when I make a request from pgAdmin to both my local windows machine, but also to another linux server with pg. However, whenever there is a request from the Tomcat on this windows machine it doesn't show for the local pg (even though the query works), but it does show in Wireshark with the linux pg. Very confused. – DJStroky Dec 15 '12 at 4:07
Router redirect rules or iptables rules remapping things from the client end or midway along? Something not honouring the non-default port you've set? – Craig Ringer Dec 15 '12 at 4:33
I imagine that you have multiple PostgreSQL servers on this machine (because you have changed the port). Are you sure about the service name configured in the firewall exception? – Houari Dec 16 '12 at 21:43
Sounds like a Firewall issue to me. – a_horse_with_no_name Dec 16 '12 at 22:04

Here are the steps of troubleshooting I would recommend:

  1. From the local machine try the following. If they work you know the issue is not PostgreSQL. If they don't work then you know your issue is local to the machine.

    • psql -h localhost -p 5433
    • psql -h [external ip] -p 5433
    • If the latter fails, try temporarily disabling all firewalls and trying again
  2. Now if that works the next step is to troubleshoot the network. Traceroute may be helpful here. Also try connecting to any other open ports using other software and make sure that works. From there, you may be able to figure out exactly where the packets are being dropped.

share|improve this answer
In cmd it says 'psql' in not recognized as in internal or external command. – Desolator Feb 21 '14 at 4:40

I faced the same problem, it was resolved by turning off my Win Firewall and Antivirus
They were blocking the DB server connection

share|improve this answer
Can't you just disable filtering the DB connections? – dezso May 6 '13 at 11:04

Make sure PostgreSQL Server is allowed through the firewall:

On the server machine, go to

Control Panel > System and Security > Windows Firewall > Allow an app through Windows Firewall

Scroll through Allowed apps and features, make sure 'PostgreSQL Server' is checked.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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