1

Attempting to kill port and locate possible process paths

I'm trying to use the Postgres.app to utilize the database, but keep running into the "Port in use" issue. I had originally brew installed postgres, but opted to use the app instead. So I brew removed postgres and installed Postgres.app. But now when I try to connect, it says that the port is in use. From everything that I've read, postgresql is the only process that listens at that port (I'm not using any other databases like MySQL). So, I was going to try to use the sudo launchctl unload -w /path_to/process command, but as you can see above...when I use which postgres or which postgresql, there's no path found. I also tried killing the connection to the port, but the ghost postgresql automatically connects right afterwards. Any tips on how to find out what the heck is listening on the port and prevent it from auto-connecting?

Edit: I tried using the Activity Monitor to see if I had accidentally installed a second version of the postgres.app. I checked to see what was the PID of the process listening in on the port. But it's not listed in the activity monitor. So I still have no idea how to find whatever is listening on the port

PID not listed in Activity monitor screen

  • What operating system are you using? – Milk Aug 03 '17 at 00:29
  • You can use `netstat` to find out which program is using the port and then kill it appropriately, depending on your OS: https://stackoverflow.com/a/48199/2027146 – Milk Aug 03 '17 at 00:31
  • If you open Activity Monitor, double-click the process, and go to the "Open Ports and Files" section, that might give you an indication if you have an additional version of Postgres installed. (I don't have the mad skillz to do that in Terminal.) – Poosh Aug 03 '17 at 00:49
  • @milk "postgres.app" and "brew" means Mac OS X – Craig Ringer Aug 03 '17 at 01:46

0 Answers0