2

When I restart Meteor in linux cent-os, I get the following console error:

Can't listen on port 3000. Perhaps another Meteor is running?

Running two copies of Meteor in the same application directory will not work. If something else is using port 3000, you can specify an alternative port with --port <port>.

Community
  • 1
  • 1
user3214030
  • 129
  • 2
  • 9
  • possible duplicate of [How to go back to Meteor](http://stackoverflow.com/questions/12999181/how-to-go-back-to-meteor) – KyleMit Feb 10 '15 at 03:40

7 Answers7

6

You could try running meteor on a different port:

meteor --port 8000

If you're sure you have nothing on port 3000 running, try killing it off before you run meteor

kill -9 mongos
kill -9 node

Another alternative is to restart the machine.

Tarang
  • 75,157
  • 39
  • 215
  • 276
4

You can do it like this:

ps -A | grep node
ps -A | grep mongo

And after kill them like this:

kill -9 number of process

Now you can run meteor on port 3000

KyleMit
  • 30,350
  • 66
  • 462
  • 664
4

For Windows, you can kill meteor like this:

taskkill /f /im mongod.exe
taskkill /f /im node.exe
KyleMit
  • 30,350
  • 66
  • 462
  • 664
2

in Linux CTRL+Z suspends the program and bg command sends it to background. You can type fg command to get back to the program.

After getting back to program, you can close it by CTRL+C, then simply start it again by meteor command.

hafiz ali
  • 1,378
  • 1
  • 13
  • 33
1

Also, you can choose a higher port number. In my case I was trying port 3001 and I had another meteor instance running on port 3000.

I did meteor --port 4000 and it launched fine. I then tried 3002 and that worked as well. I wonder if Meteor actually uses 2999 - 3001 (I also tried 2999 and got an error) Unexpected mongo exit code 48. Restarting.

JoshJoe
  • 1,482
  • 2
  • 17
  • 35
  • When you launch meteor, it launches mongo to start listening on port 3001. – Mike Oct 31 '14 at 22:40
  • No, I used the default port of 3000 or any state at the start, and the following (+1) to Mongo. That is, the following application can be run through a 2-port, already in 3002, hence the previous 2-port as before - it is 2998. Check can be very simple (Mac, Linux): `ps|grep meteor` – borodatych Sep 09 '15 at 09:21
1

You can reboot CentOS with:

reboot -h now

You can reboot Ubuntu with:

reboot

1

Try using sudo fuser -k 3000/tcp.

The above command kills the process running on port 3000. If you want to check the running processes, try sudo fuser 3000/tcp.

Murali Krishna
  • 167
  • 4
  • 17