5

I recently installed PostgreSQL on Mac OS, and made the mistake of assigning a server to the port 3000, which I like using to run other things. Now I can't run rails server with sqlite3 off that port, I get an error informing me that the address is already in use.

How can I free up this port? Surely there is something I can write in terminal to this effect.

jay
  • 11,402
  • 16
  • 63
  • 99
  • 1
    You need to edit your pgsql server configuration this inst really OS X specific. I think the port is in the main config `postgresql.conf` in your pg server's data dir. – prodigitalson Feb 14 '12 at 02:58

1 Answers1

3

Simply change the line

port = 3000

in your postgresql.conf to something else and restart the server. More details in the manual.

Erwin Brandstetter
  • 539,169
  • 125
  • 977
  • 1,137
  • yes, this is true. and this to release the port if/when the server restart doesn't occur: http://stackoverflow.com/questions/3855127/find-and-kill-process-locking-port-3000-on-mac – jay Feb 14 '12 at 06:04