ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Kill other roscore/master processes on bourn shell

asked 2014-06-05 10:11:49 -0500

ROSwithNao gravatar image

updated 2018-09-19 14:08:54 -0500

130s gravatar image

I keep getting this error message when trying to run roscore:

roscore cannot run as another roscore/master is already running. 
Please kill other roscore/master processes before relaunching.

However, I only have one terminal window open. How could there already be a roscore running? I've tried quitting Terminal and restarting it and I've tried restarting my computer. It doesn't matter what I do - my computer thinks there is a roscore running even though there are no terminal windows open with roscore running in them. Is there a way to kill this invisible roscore so that I can run one in a window?

edit retag flag offensive close merge delete


I met the same problem. There is no roscore or rosmaster running. But I met this error whenever I run roscore.

ToughMind gravatar image ToughMind  ( 2017-06-04 21:50:43 -0500 )edit

6 Answers

Sort by ยป oldest newest most voted

answered 2015-01-23 13:14:50 -0500

Pototo gravatar image

On the terminal you can do:

killall -9 roscore

and also:

killall -9 rosmaster

that will completely stop them

edit flag offensive delete link more


Without OP specifying the OS/platform, I think this can be marked as answer. @dornhege's answer explains well the reason roscore could be running headless.

130s gravatar image 130s  ( 2018-09-19 14:11:23 -0500 )edit

The killall -9 rosmaster works effectively!

Sparkle Eyes gravatar image Sparkle Eyes  ( 2019-05-28 16:03:02 -0500 )edit

thanks - did the trick

cat_in_box gravatar image cat_in_box  ( 2019-08-01 20:58:45 -0500 )edit

I realised that even after killing 'rosmaster' there is one more ROS related process running.

killall -9 rosmaster && killall -9 rosout worked for me.

scottie gravatar image scottie  ( 2023-02-27 16:45:35 -0500 )edit

answered 2014-06-05 10:33:47 -0500

dornhege gravatar image

This might be from another user. If it does happen even after a reboot, maybe you put something like roscore in your init files like .bashrc.

Check with e.g. rosnode list if there really is a rosmaster running.wh

ps aux|grep roscore should show you who started it.

edit flag offensive delete link more

answered 2018-06-25 23:25:51 -0500

warriorUSP gravatar image

updated 2018-06-29 04:08:21 -0500

jayess gravatar image

I also went through the same problem. I launched the

roscore &

command in the background in a terminal. Later I exit through that terminal without killing it. Now the roscore is running in the background but we have already exit its corresponding terminal. So when in new terminal when I type


to search for tasks running in the background, then nothing appears, so it seems like roscore is not running. While if you type


command again, it will show the same message as yours. Try the commands as mentioned in previous answers:-

killall -9 roscore
edit flag offensive delete link more

answered 2023-06-09 17:04:10 -0500

try sudo killall -9 roscore try sudo killall -9 rosmaster
i ran sudo lsof -i :11311
had a rosmaster running under user "root" . had to use sudo to shutdown process...

edit flag offensive delete link more

answered 2019-02-09 03:04:52 -0500

afar gravatar image

I had this issue because the roscore was started as a service. The only way to kill it was to stop the service using:

$ sudo systemctl stop SERVICE_NAME.

edit flag offensive delete link more

answered 2020-05-23 13:36:26 -0500

bfdmetu gravatar image

I have the same problem and i solved it with method -killall -9 rosmaster

Thank you

edit flag offensive delete link more

Question Tools



Asked: 2014-06-05 10:11:49 -0500

Seen: 100,878 times

Last updated: May 23 '20