Gazebo | Ignition | Community
Ask Your Question

Running gzserver on EC2 and gzclient locally is not working

asked 2014-09-27 15:16:57 -0600

catalyst294 gravatar image

updated 2014-10-01 17:56:22 -0600

So I have an AWS ec2 instance that I am trying to run gzserver on and then locally I want to connect to it with gzclient. I am working with gazebo-2.2

These are my steps:

AWS instance:

  1. ssh into instance (I try ssh -X, ssh -Y and ssh)

  2. source /usr/share/gazebo/

  3. GAZEBO_IP=[aws_public_ip] GAZEBO_MASTER_URI=[aws_public_ip] gzserver worlds/


  1. source /usr/share/gazebo/

  2. GAZEBO_IP=[local_public_ip] GAZEBO_MASTER_URI=[aws_public_ip] gzclient

The client appears to connect to the server. The gazebo GUI appears but the world does not, just a black screen. After some time both the server and client eventually crash.

But if I run both gzserver and gzclient on the same machine (AWS instance or locally) it works.

I setup my AWS instance and my machine to accept all traffic on all ports so I don't think that could be the problem.

Any ideas would help!

edit retag flag offensive close merge delete


the GAZEBO_MASTER_URI environment variable need to be of the form: XXX.XXX.XXX.XXX:PORT. For example: Are you setting the port? AWS may also block the port you have specified. You should check the permission on your instance.

nkoenig gravatar imagenkoenig ( 2014-09-30 17:32:33 -0600 )edit

I have tried with the port and without it. In the question I said I updated the security settings to allow all traffic on all ports, without that the gzclient GUI did not enough show up. Also this is the format of the ip address I am using.

catalyst294 gravatar imagecatalyst294 ( 2014-09-30 20:09:29 -0600 )edit

@nkoenig so this setup appears to be correct to you? I am not missing any environment variables or running the wrong commands? It seems like there might be an issue with my EC2 setup.

catalyst294 gravatar imagecatalyst294 ( 2014-10-05 21:01:13 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-10-07 18:19:01 -0600

nkoenig gravatar image

The following works for me:

Remote machine


Local machine


If a similar setup doesn't work, try running gzserver and gzclient with the --verbose option. Also check the logs in ~/.gazebo.

edit flag offensive delete link more


The problem ended up being a firewall issue. I assumed because the two machines could ping each other the traffic could get through. This link helped me: . I needed to set my local machine as the DMZ server and set my NAT filter to Open on my router. That plus the correct security group on the instance did the trick. Thanks for the help!

catalyst294 gravatar imagecatalyst294 ( 2014-10-08 18:53:08 -0600 )edit

With gazebo 7 I have to use GAZEBO_MASTER_URI with an underscore between GAZEBO and MASTER.

Hugo Start gravatar imageHugo Start ( 2016-03-18 04:05:37 -0600 )edit

answered 2022-12-26 03:41:12 -0600

martinerk0 gravatar image

To add to @nkoenig 's answer, on Gazebo 9 also GAZEBO_IP needs to have an underscore, you can see it with gzclient --verbose

[Msg] Publicized address:

will have 192 adress otherwise

edit flag offensive delete link more

Question Tools



Asked: 2014-09-27 15:16:57 -0600

Seen: 8,231 times

Last updated: Dec 26 '22