Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fix PostgreSQL Connection Issues from Remote Host
#1


    Fix PostgreSQL Connection Issues from Remote Host

   

A misconfigured connection policy may cause remote host issues that prevent you from accessing the PostgreSQL server. To solve it, open your pg_hba.conf file and add the access policy from every client’s IP address:


   
host all all 0.0.0.0/0 md5

   

Then, check the listen_address value in your postgres.conf configuration file. Ensure it has an asterisk to ensure PostgreSQL can listen to all IP addresses.


   

If that doesn’t work, check if your firewall closes the PostgreSQL listening port. For Ubuntu server, run the ufw command:


   
sudo ufw status verbose

   

If the connection from and to port 5432 is disabled, open it using the following command:


   
sudo ufw allow 5432/tcp

   

   

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)