views:

49

answers:

1

Hi,

I was doing the following on the terminal:

script/server

it says the server host:3000 was being used,

when I typed it into web browser, the page loads but when I click on my environment the info doesn't show up. I get an error message

if I change the server by typing in

script/server -p 3001

for example, it works,

so my question is: how does one disconnect or erase the previous "3000" port so that I can use 3000 instead of 3001?

Is there a command line for this in the terminal?

Thanks.

+4  A: 

Port 3000 is being used by something else, so you need to stop whatever process that is first. Probably that is another script/server instance, so kill it. If it isn't, well, you can try sudo lsof -i :3000 to try and figure it out... but it might be easier to just reboot your box and try again :)

thenduks
reboot as in restarting the computer?
kapplej
yeah, but you really shouldn't have to reboot your box -- as thenduks said, there is another ./script/server running somewhere… try his command, or maybe `ps aux |grep server` or `ps aux | grep ruby`… if you find it in the list, kill it with `kill <pidnumber>` -- good luck!
John