Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

To run various Gazebo instances, you must make sure each of them is using a different port. You can set this with the GAZEBO_MASTER_URI environment variable.

It's also convenient to run Gazebo in verbose mode so you can read error messages.

For example, on one terminal, start Gazebo on the default port (11345):

gazebo --verbose

If you try to start another instance on a new terminal, without changing the URI, you'll get an error:

[Err] [Master.cc:96] EXCEPTION: Unable to start server[bind: Address already in use]. There is probably another Gazebo process running.

The correct way is to open a new terminal and start another instance with a new URI:

export GAZEBO_MASTER_URI=http://localhost:11346; gazebo --verbose

To run various Gazebo instances, you must make sure each of them is using a different port. You can set this with the GAZEBO_MASTER_URI environment variable.

It's also convenient to run Gazebo in verbose mode so you can read error messages.

For example, on one terminal, start Gazebo gzserver on the default port (11345):

gzserver --verbose

You'll see the port printed in green:

[Msg] Connected to gazebo master @ http://127.0.0.1:11345

Then on a new terminal, open gzclient:

gzclient --verbose

You'll see the same port printed in green:

[Msg] Connected to gazebo master @ http://127.0.0.1:11345

If you try to start another instance gzserver on a new terminal, without changing the URI, you'll get an error:

[Err] [Master.cc:96] EXCEPTION: Unable to start server[bind: Address already in use]. There is probably another Gazebo process running.

The correct way is to open a new terminal and start another instance with a new URI:

export GAZEBO_MASTER_URI=http://localhost:11346; gzserver --verbose

This time the URI is different:

[Msg] Connected to gazebo master @ http://127.0.0.1:11346

And then on a new terminal, the respective gzclient:

export GAZEBO_MASTER_URI=http://localhost:11346; gzclient --verbose

And you should also see the same URI:

[Msg] Connected to gazebo master @ http://127.0.0.1:11346