I am currently developing ros packages in docker system. The environment I am using is ROS noetic, Ubuntu focal on a docker container One of my package is failing. I seems it is due to failing to get /initialpose but I could not figure why. Any suggestions or guesses will be really help

Below is par of error log in master.log

rosmaster.master][INFO] 2023-12-07 07:22:19,583: -SERVICE [/rviz/load_config] /rviz rosrpc://desktop:43579
[rosmaster.master][INFO] 2023-12-07 07:22:19,584: -SERVICE [/rviz/reload_shaders] /rviz rosrpc://desktop:43579
[rosmaster.master][INFO] 2023-12-07 07:22:19,606: publisherUpdate[/move_base_simple/goal] -> http://desktop:34559/ []
[rosmaster.master][INFO] 2023-12-07 07:22:19,624: publisherUpdate[/initialpose] -> http://desktop:42573/ []
[rosmaster.master][INFO] 2023-12-07 07:22:19,625: publisherUpdate[/initialpose] -> http://desktop:42573/ []: sec=0.00, exception=[Errno 111] Connection refused
[rosmaster.threadpool][ERROR] 2023-12-07 07:22:19,628: Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rosmaster/threadpool.py", line 218, in run
    result = cmd(*args)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosmaster/master_api.py", line 210, in publisher_update_task
    ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1450, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1153, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1165, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1278, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1308, in send_content
  File "/usr/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1011, in _send_output
  File "/usr/lib/python3.8/http/client.py", line 951, in send
  File "/usr/lib/python3.8/http/client.py", line 922, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/usr/lib/python3.8/socket.py", line 796, in create_connection
ConnectionRefusedError: [Errno 111] Connection refused

This is my cmd to run docker

sudo docker run -it --name noetic-r35-3 -d --privileged --network=host \
                    -v /tmp/.X11-unix:/tmp/.X11-unix:rw --env="QT_X11_NO_MITSHM=1" \
                    -e DISPLAY=unix$DISPLAY -v=/dev:/dev -v=$(pwd)/dockerWorkspace:/workspace \


  • $\begingroup$ Can you share what command you're using to run the docker image? $\endgroup$ Commented Dec 7, 2023 at 8:02


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.