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

Kill other roscore/master processes on bourn shell

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

ROSwithNao gravatar image

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

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

Comments

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 -0600 )edit

6 Answers

Sort by ยป oldest newest most voted
38

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

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

Comments

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 -0600 )edit
4

The killall -9 rosmaster works effectively!

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

thanks - did the trick

cat_in_box gravatar image cat_in_box  ( 2019-08-01 20:58:45 -0600 )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 -0600 )edit
7

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

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
0

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

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
0

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

warriorUSP gravatar image

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

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

jobs

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

roscore

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
0

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

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
0

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

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

Question Tools

4 followers

Stats

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

Seen: 103,665 times

Last updated: May 23 '20