Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011

    Unanswered: Postgres won't talk

    Hi All,

    Hoping for help on this one. I have a new 9.1 Postgresql installation up and running on RHEL 6 (call it '').

    I've edited the pg_hba.conf to add:
    host all all trust

    I've edited the postgresql.conf to add:
    listen_addresses = '*'

    The service was the restarted.

    When I check the ports, I get:

    root$ netstat -nlp | grep 5432
    tcp 0 0* LISTEN 13761/postmaster
    tcp 0 0 :::5432 :::* LISTEN 13761/postmaster
    unix 2 [ ACC ] STREAM LISTENING 58223 13761/postmaster /tmp/.s.PGSQL.5432

    However, when I try to connect from it's sister server, like so:

    $ psql -h -U postgres -d test
    psql: could not connect to server: No route to host
    Is the server running on host " " and accepting
    TCP/IP connections on port 5432?

    There are no firewalls in the picture. iptables is not running on either machine. resolves to the correct IP. In fact, I can ssh from one to the other just fine.

    I've run out of ideas at this point, so very much hoping someone can enlighten me!

    Last edited by blackfrancis; 11-27-11 at 15:07. Reason: To clarify

  2. #2
    Join Date
    Nov 2011


    Sorry, it was iptables after all. I thought I had tested shutting it down entirely and connecting, but for some reason, when I repeated the experiment, it now works!

  3. #3
    Join Date
    Nov 2011
    A further note for anyone finding this - if you're using RHEL (as I am), use the 'setup' command to configure iptables. Following normal instructions for configuring it did not work to allow 5432 traffic.

  4. #4
    Join Date
    Oct 2010
    Orlando, FL
    Provided Answers: 1
    Yes. RHEL always restricts with IPTables and SELinux. I use:

    This allows me to disable both SElinux & IPtables on new systems and make sure I don't spend hours searching configuration files for the problem. Once I have everything the way I like it, I enable it and test.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts