Open nelsonic opened 5 years ago
This issue is solved for me ... ✅ I'm wondering if it's worth including in a "trouble-shooting" section ... 🤔 or if people can just Google for it and find their answer! 🔍
I think it would be nice to include it (with links) in the "trouble-shooting" section since not everybody knows how to use Google to their advantage. It'll also save people the time of agonising troubleshooting
Hi guys, I tried running lsof -i :5432 in the terminal and it didnt produce any output. I got the same message: "Port 5432 is already in use Usually this means that there is already a PostgreSQL server running on your Mac. If you want to run multiple servers simultaneously, use different ports." Any ideas?
@7astro7 try running the command as sudo.
sudo lsof -i :5432
You can kill the process using the PID from the command above:
sudo kill -9 PID
That worked for me. $ sudo pkill -u postgres
https://github.com/PostgresApp/PostgresApp/issues/197#issuecomment-474534056
Hi guys, I tried running lsof -i :5432 in the terminal and it didnt produce any output. I got the same message: "Port 5432 is already in use Usually this means that there is already a PostgreSQL server running on your Mac. If you want to run multiple servers simultaneously, use different ports." Any ideas?
Try this $ sudo pkill -u postgres
Hi, can any help me? . I cant connect me with postgres when I put the commando "psql -U postgres"
hi guys is ther any solution for pc because sudo is not working in gitbash nor cmd thankyou
you can kill the process in pc with this netstat -aon | findstr '5432'
Run following commands
@re-Tick this thread is probably not the best place to ask questions if you need an immediate response. ⏳ What Operating System are you using. How did you install Postgres? 🤷♂️
hello in my case postgresql Still run after sudo pkill -u postgres
so here how i solved these problem
first check PID on your terminal
sudo lsof -i :5432
in my case using Mac OS so open app activity monitor check process name postgressql and see/check postgressql list PID same as before in the terminal sudo lsof -i :5432
, click the postgresql process then forcequit
if it can't if the above comments did not help you then open the activity monitor and end all postgres processes
Am a Mac user (Intel Chip and Ventura OS), even if i force quit from the activity monitor, another process of same type are spawned again with new PID's. Please help.
Am a Mac user (Intel Chip and Ventura OS), even if i force quit from the activity monitor, another process of same type are spawned again with new PID's. Please help.
I am facing this. same issue, once force qyutting a postgres instance, another instance starts with different PID
@arvish-codal @mondalraj If you run the follow it should fix your issue 👍
> brew services list # grab the path to the postgres service e.g. ~/Library/LaunchAgents/homebrew.mxcl.postgresql@15.plist
> launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql@15.plist
> lsof -i :5432 # you should see the service has stopped and you can now try again
What's happened is you've basically setup a background service on your OS that'll keep running every time you kill it. For me, I accidentally set this up after I installed postgres via brew. When it's installed, brew gives you the option to run it as a background service.
@freddy24-7 thank you for the link; I was finally able to fix the issue after following the steps. Especially checking activity monitor which is much easier than the terminal.
@blmalone Thank you for the solution. However, when I ran the command
brew services list
I got
postgresql@14 none
and no path was specified for the PostgreSQL@14, so I came up with this path ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
and It worked. so the command I used was
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@blmalone THANK YOU!
@blmalone Thank you for the solution. However, when I ran the command
brew services list
I got
postgresql@14 none
and no path was specified for the PostgreSQL@14, so I came up with this path
~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
and It worked. so the command I used waslaunchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
This worked for me.
If when you open the Postgres.app you see the following error message: Or clicking "start" shows you the message:
Running
As suggested in this SO: https://stackoverflow.com/questions/12028037/postgres-app-could-not-start-on-port-5432 I see that:
I quit DBeaver and then Postgres.app could connect. 👍