How to stop Meteor?
Asked Answered
B

14

60

The only answer on this question I saw - go start another copy on the different port. Switching from one Meteor workspace to another Okay, I see that I can run another one on the different port, BUT how to stop the first one?

Blennioid answered 2/9, 2012 at 17:54 Comment(2)
Cast Holy (sorry, couldn't resist.)Ball
When I work on 1 project and want to start working on another. I have 2 choices - reboot or start it on another port. Why it is no option to stop Meteor?Blennioid
H
97

I use this command:

kill -9 `ps ax | grep node | grep meteor | awk '{print $1}'`

Or, I run this if I'm on my local machine to kill remote processes:

ssh [user]@[server] <<'ENDSSH'
kill -9 `ps ax | grep node | grep meteor | awk '{print $1}'`
exit
ENDSSH
Heida answered 13/10, 2013 at 16:29 Comment(3)
OSX is not my case. Thanks for the answer.Blennioid
Does it kill the database? After this command on Ubuntu I still have one Meteor process running :/Coppock
But how do I kill production meteor bundle? It seems to be running with some kind of deamon. If I use this command it's immediatelly going to come up again with a new PID.Steatopygia
S
32

On OSX, go back to the term you opened to start meteor, and use CTRL+C to quit the process.

Syllabi answered 2/9, 2012 at 18:45 Comment(0)
G
9

if Meteor is running on :3000 port:

kill -9 $(lsof -i :3000 -t); 
Gearard answered 17/3, 2016 at 14:14 Comment(1)
I would not use -9 because that does not give meteor a chance to clean up.Naive
B
5

Similar to Fernando's response, if you're on OSX you can quit the processes node and mongod using Activity Monitor.

quitting node will stop the server. The database will still be running and accepting incoming connections, so quitting mongod will turn off the database.

Banuelos answered 7/11, 2013 at 6:36 Comment(0)
C
4

Enter command "Ctrl + C" on the terminal where the meteor process is running. This is the easiest way to kill the process in both Mac and Ubuntu. Not sure of Windows though.

Happy Coding!

Chaumont answered 25/5, 2017 at 6:0 Comment(0)
B
3

In my case (Ubuntu 11.10) I open the System Monitor and kill manually the node and mongod processes.

Of course you can use also the terminal and kill these processes knowing their PID's.

Biafra answered 2/9, 2012 at 18:41 Comment(0)
P
2

An edit to John Devor's (accepted) answer: if you're editing your code with Atom, his command may kill the editor instances:

$ ps ax | grep node | grep meteor
19312 pts/2    Sl+    0:16 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js
19541 pts/2    Sl+    0:02 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/meteor/beari/dist/.meteor/local/build/main.js
24438 ?        Sl     0:00 /usr/share/atom/atom --no-deprecation /home/teo/.atom/packages/linter-jshint/node_modules/jshint/bin/jshint --reporter /home/teo/.atom/packages/linter-jshint/node_modules/jshint-json/json.js --filename /home/teo/meteor/beari/beari.js -

Better to use a command like:

kill -9 `ps ax | grep node | grep meteor | grep -v atom | awk '{print $1}'`
Pinta answered 26/8, 2015 at 16:2 Comment(0)
C
2

When you are looking at the terminal with the unwanted meteor running just press Ctrl+C to turn off meteor.

To run more applications side by side run on a different port with the --port option

Christ answered 15/5, 2016 at 21:11 Comment(2)
Shouldn't this be the correct answer? Start a meteor process in a terminal with $ meteor and end it with ctrl+c (like any other terminal process)Amphicoelous
In my case there was no active terminal to end the process. Via some quirk of my IDE and OS Meteor was still running and there was no terminal that I could end it with ctrl+c. John Devor's answer solved my problem.Petiolule
C
2

use sudo killall -9 node command. it will kill all the rprocess.

Calfee answered 4/1, 2018 at 7:13 Comment(0)
R
1

Actually, kill -9 kills meteor immediately, which is not a good idea. It's an emergency feature and should be applied only when regular kill (no signal specified) fails, as it prevents processes from running shutdown procedures.

Repro answered 23/2, 2016 at 18:9 Comment(0)
I
1

the default port is 3000.If you want to run it in a different port use below meteor run --port 3030

run this in two command prompt.If you want to stop use ctrl+c in necessary command prompt

Impost answered 5/5, 2017 at 6:30 Comment(0)
I
1

Enter command "Ctrl + C" on the terminal where you want to stop process is running. This is the easiest way to kill the process in both Mac and Ubuntu and Windows.And you can use "meteor run --port portnumber" to run the two or more projects at the same time

Impost answered 4/1, 2018 at 8:26 Comment(0)
O
0

It's so simple in my case, I always have two terminal tabs open, one for launching Meteor/stopping it and the other terminal for working the commands. So to stop it I just do the universal control+c to stop the working process.

Odum answered 24/8, 2014 at 16:3 Comment(0)
W
0

In the terminal, I used: $ sudo killall -9 node (this kills all running node jobs)

Whoosh answered 28/3, 2015 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.