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
# 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
# vi /var/lib/pgsql/data/postgresql.conf
Look out for this line
listen_addresses = 'localhost'
and change it to
listen_addresses = '*'
# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
Follow the below links for more tutorialsTutorial for Monitoring Tools SAR and KSAR with examples in Linux
How to configure Samba 4 Secondary Domain Controller
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux
How to auto start service after reboot in Linux