unable to connect to server connection to the server at port 5432 failed timeout expired ubuntu.
When you try to connect a server from another server or may you are trying to connect your local system with liver sever that time this error comes even though you did a perfect configuration.
So, in this case, we need to allow the port to our server, so in this case, when you come with 5432 posts it can allow you to access the request.
How to Fix Error Cannot Access ssh to Server network connection timed out? So check whether the port you are trying to access to allowed or not in your server you just paste the below command in your server terminal.
Allow port using the below command in your server terminal.OPEN THIS FILE
sudo nano /etc/postgresql/*/main/postgresql.confREMOVE # AND ADD '*'
listen_addresses = '*'OPEN THIS FILE
sudo nano /etc/postgresql/*/main/pg_hba.conf
host all all 0.0.0.0/0 md5 host all all ::/0 md5
sudo ufw allow 5432/tcpRESTART SERVER
sudo service postgresql restart
We always thanks to you for reading our blogs.
Dharmesh Chauhan(Swapinfoway Founder)
We Are Also Recommending You :
- Command SSH key generate in ubuntu server
- How to See Pgsql Database List in Ubuntu
- Creating Droplets Digitalocean With phpMyadmin
- How To Install MongoDB In Ubuntu
- ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.
- Error :unable to connect to server connection to the server at port 5432 failed timeout expired
- Install PostgreSQL Ubuntu 20.04 With pgAdmin4