• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections


    I was getting this error while trying to connect my openfire server with postgresql database. Well let
    me show you the step to fix this error.

    Error:

    Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

    Solution:

    This can happen due to following 2 reason
    • Your Firewall is blocking postgresql from making connection.
    • You have not configured your postgresql database on the server to accept connection from particular machines on the network
    For firewall rules
    # iptables -A INPUT -s 0.0.0.0/0 -p tcp --dport 5432 -j ACCEPT
    # iptables -A INPUT -s 0.0.0.0/0 -p udp --dport 5432 -j ACCEPT





    For postgresql configuration
    # vi /var/lib/pgsql/data/postgresql.conf
    Look out for this line
    listen_addresses = 'localhost'

    and change it to
    listen_addresses = '*'

    Restart the database services
    # service postgresql restart
    Stopping postgresql service:                              
    [  OK  ]
    Starting postgresql service:                               [  OK  ]

    Now try connecting to the postgresql database using openfire. Let me know your success and failure


    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections Reviewed by Deepak Prasad on Saturday, September 21, 2013 Rating: 5

    1 comment:

    Powered by Blogger.