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 FILEsudo nano /etc/postgresql/*/main/postgresql.confREMOVE # AND ADD '*'
listen_addresses = '*'OPEN THIS FILE
sudo nano /etc/postgresql/*/main/pg_hba.conf
ufw statusADD
host all all 0.0.0.0/0 md5 host all all ::/0 md5ALLOW PORT
sudo ufw allow 5432/tcpRESTART SERVER
sudo service postgresql restart
We always thanks to you for reading our blogs.
Dharmesh Chauhan
(Swapinfoway Founder)Hello Sir, We are brothers origin from Gujarat India, Fullstack developers working together since 2016. We have lots of skills in web development in different technologies here I mention PHP, Laravel, Javascript, Vuejs, Ajax, API, Payment Gateway Integration, Database, HTML5, CSS3, and Server Administration. So you need our service Please Contact Us
Haresh Chauhan
(Co-Founder)We Are Also Recommending You :
- Creating Droplets Digitalocean With phpMyadmin
- Error :unable to connect to server connection to the server at port 5432 failed timeout expired
- ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.
- How To Install MongoDB In Ubuntu
- How to See Pgsql Database List in Ubuntu
- Command SSH key generate in ubuntu server
- Install PostgreSQL Ubuntu 20.04 With pgAdmin4