Menu
  • Home
  • About Me
  • Blog
  • Github
  • LinkedIn

Phoenix & Elixir: Fix PostgreSQL connection refused

May 30, 2023

connection refused – :econnrefused

PostgreSQL service status

First parameter to cross-check during a psql connection refused error is the status of the PostgreSQL service.

We can confirm this by cross-checking if a Postgres process in running in the server. In a Linux like environment, we can use

ps -ef | grep postgres
service postgresql status

If the service is not running in the server, then we restart it using the command.

service postgresql restart

At times, this failure could be a result of a corrupted Postgresql service. A reinstall of the service with the apt-get install or yum install would be required to fix the issue.

password authentication failed for user “postgres”

sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts
  • ChinguTalkBot v0.1.0: Setting up AWS Cognito with CDK for User Authentication
  • Phoenix & Elixir: Fix PostgreSQL connection refused
  • Demo: Git Log with Shell script to create a release notes
  • Metasploit
  • CyberSecurity Lab – Online Password Attack

Archives
  • March 2024
  • May 2023
  • April 2023
  • February 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
Categories
  • Amazon Interview (3)
  • Ansible (3)
  • AWS (9)
  • Azure (9)
  • Certification (2)
  • ChinguTalkBot Project (1)
  • cybersecurity (3)
  • Data analytics (6)
  • Demo Videos (6)
  • Docker (5)
  • Git (1)
  • GitLab (1)
  • Golang (3)
  • JavaScript (2)
  • Jenkins (4)
  • PowerShell (1)
  • Python (10)
  • Terraform (11)
  • Uncategorized (9)

©2025 | Powered by WordPress and Superb Themes!