phoenix-chat-example icon indicating copy to clipboard operation
phoenix-chat-example copied to clipboard

In case people can't determine if Postgresql is running with lsof -i :5432

Open Leo328 opened this issue 5 years ago β€’ 1 comments

Hi there,

This is my first ever open-source contribution post on GitHub. I'm super-new at this but also want to make sure others don't get stuck with frustrating issues when learning.

I noticed that when going through the tutorial, there was a recommendation to use lsof -i :5432 to check if Postgresql was running correctly. This didn't work for me (there was no output), but I do know that Postgres was running as I had just successfully created a new DB with Ecto.

Instead, I used pg_isready and got the desired confirmation:

image

For context, I am running Ubuntu 18.04 through WSL2 with Postgresql-12.

Cheers, Leo.

Leo328 avatar May 24 '20 00:05 Leo328

@Leo328 great addition.

pg_isready
/tmp:5432 - accepting connections

Works on Mac too. βœ…

nelsonic avatar May 24 '20 06:05 nelsonic

@LuchoTurtle please add the pg_isread command to the https://github.com/dwyl/phoenix-chat-example#check-you-have-everything-before-starting section during your update #149 πŸ™

nelsonic avatar Feb 03 '23 07:02 nelsonic

Just tried to run:

pg_isready

On my M1 mac and ...

Got:

zsh: command not found: pg_isready

nelsonic avatar Feb 06 '23 11:02 nelsonic

Weird that it was working on your Mac prior and not anymore. It comes with psql, weird that you get a not found error.

LuchoTurtle avatar Feb 06 '23 12:02 LuchoTurtle

Yeah, thought it was weird too… hence capturing in case anyone else faces this in the future … ⏳

nelsonic avatar Feb 06 '23 12:02 nelsonic