[solved] Cannot start rviz : connect with distant magni does not work even though seems fine

I cant remotely see the magni from the workstation. it claims it’s a network issue but network seems just fine. i dont have a firewall in between filtering packet.
It seems istead that something that should be running on magni isn’t or maybe the port number is wrong (even locally you dont connect. see output)

any idea ?

see output below

ubuntu@magni-workstation:/opt/ros/kinetic/share/magni_viz/launch$ roslaunch magni_viz view_robot.launch
... logging to /home/ubuntu/.ros/log/0a64bdcc-df79-11d4-9427-31f68c9b9ebf/roslaunch-magni-workstation-2975.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Unable to contact my own server at [http://10.155.108.53:36713/].
This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself.  Please check
for errors by running:

        ping 10.155.108.53

For more tips, please see

        http://www.ros.org/wiki/ROS/NetworkSetup

The traceback for the exception was written to the log file
ubuntu@magni-workstation:/opt/ros/kinetic/share/magni_viz/launch$ ssh ubuntu@10.155.108.53
ubuntu@10.155.108.53's password:
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.9.80-v7+ armv7l)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 packages can be updated.
0 updates are security updates.

Last login: Fri Aug 10 18:04:47 2018 from 10.155.108.56
ubuntu@ubiquityrobot:~$ rostopic list
/battery_state
/cmd_vel
/diagnostics
/joint_states
/joy
/left_error
/motor_node/parameter_descriptions
/motor_node/parameter_updates
/odom
/right_error
/rosout
/rosout_agg
/statistics
/tf
/tf2_web_republisher/cancel
/tf2_web_republisher/feedback
/tf2_web_republisher/goal
/tf2_web_republisher/result
/tf2_web_republisher/status
/tf_static
/ubiquity_velocity_controller/parameter_descriptions
/ubiquity_velocity_controller/parameter_updates
ubuntu@ubiquityrobot:~$ rostopic echo -n 1 /odom
header:
  seq: 8222
  stamp:
    secs: 1533923095
    nsecs: 195038802
  frame_id: "odom"
child_frame_id: "base_link"
pose:
  pose:
    position:
      x: 0.00247516657378
      y: 1.856604323e-05
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: 0.00750071576988
      w: 0.999971869236
  covariance: [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]
twist:
  twist:
    linear:
      x: -1.73472347598e-18
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: -3.12250225676e-17
  covariance: [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]
---
ubuntu@ubiquityrobot:~$ exit
logout
Connection to 10.155.108.53 closed.
ubuntu@magni-workstation:/opt/ros/kinetic/share/magni_viz/launch$ 
ubuntu@magni-workstation:/home/ubuntu$ roslaunch magni_viz view_robot.launch
... logging to /home/ubuntu/.ros/log/0a64bdcc-df79-11d4-9427-31f68c9b9ebf/roslaunch-magni-workstation-3046.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Unable to contact my own server at [http://10.155.108.53:34455/].
This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself.  Please check
for errors by running:

        ping 10.155.108.53

For more tips, please see

        http://www.ros.org/wiki/ROS/NetworkSetup

The traceback for the exception was written to the log file
ubuntu@magni-workstation:/home/ubuntu$ ssh ubuntu@10.155.108.53
ubuntu@10.155.108.53's password:
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.9.80-v7+ armv7l)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 packages can be updated.
0 updates are security updates.

Last login: Fri Aug 10 19:44:26 2018 from 10.155.249.179
ubuntu@ubiquityrobot:~$ wget http://10.155.108.53:34455
--2018-08-10 19:49:24--  http://10.155.108.53:34455/
Connecting to 10.155.108.53:34455... failed: Connection refused.
ubuntu@ubiquityrobot:~$

Have you set the workstation environment variables as described here? This worked for me in a different but similar situation.

yes i did follow the documentation.
in particular environment variable are correctly set.

ubuntu@magni-workstation:~$ printenv | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://10.155.107.59:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
ROS_IP=10.155.107.59
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ubuntu@magni-workstation:~$ tail -n 3 ~/.bashrc
export ROS_MASTER_URI=http://10.155.107.59:11311
export ROS_IP=10.155.107.59

ubuntu@magni-workstation:~$

the magni can ping the workstation and workstation can ping magni.

What i dont get is that i made a network recording of eth0 from the worstation ( tcpdump -i eth0 -s 0 -w /tmp/output.pcap ) immediately before starting rviz (roslaunch magni_viz view_nav.launch)

Looking at the trace in wireshark, I can see that some remote procedure call is initiated.

REQUEST

POST /RPC2 HTTP/1.1
Host: 10.155.107.59:11311
Accept-Encoding: gzip
User-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)
Content-Type: text/xml
Content-Length: 219

<?xml version='1.0'?>
<methodCall>
<methodName>getParam</methodName>
<params>
<param>
<value><string>/roslaunch</string></value>
</param>
<param>
<value><string>/run_id</string></value>
</param>
</params>
</methodCall>

RESPONSE

HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.7.12
Date: Mon, 13 Aug 2018 12:35:59 GMT
Content-type: text/xml
Content-length: 287

<?xml version='1.0'?>
<methodResponse>
<params>
<param>
<value><array><data>
<value><int>1</int></value>
<value><string>Parameter [/run_id]</string></value>
<value><string>0a9a5338-df79-11d4-9b82-0b0cee1bdca6</string></value>
</data></array></value>
</param>
</params>
</methodResponse>

Some there is network communication going on (cant attach pcap here :’( ) + And ufw is not running on the workstation at all.

root@magni-workstation:~# cat /home/ubuntu/.ros/log/0a9a5338-df79-11d4-9b82-0b0cee1bdca6/roslaunch-magni-workstation-15180.log
[roslaunch][INFO] 2018-08-13 05:48:49,981: Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
[roslaunch][INFO] 2018-08-13 05:48:49,984: Done checking log file disk usage. Usage is <1GB.
[roslaunch][INFO] 2018-08-13 05:48:49,985: roslaunch starting with args ['/opt/ros/kinetic/bin/roslaunch', 'magni_viz', 'view_robot.launch']
[roslaunch][INFO] 2018-08-13 05:48:49,985: roslaunch env is {'WINDOWID': '52428810', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'ROS_DISTRO': 'kinetic', 'ROS_LOG_FILENAME': '/home/ubuntu/.ros/log/0a9a5338-df79-11d4-9b82-0b0cee1bdca6/roslaunch-magni-workstation-15180.log', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/ubuntu', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'PKG_CONFIG_PATH': '/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig', 'UPSTART_EVENTS': 'xsession started', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'XDG_SESSION_TYPE': 'x11', 'ROSLISP_PACKAGE_DIRECTORIES': '', 'QT_IM_MODULE': 'ibus', 'LOGNAME': 'ubuntu', 'USER': 'ubuntu', 'PATH': '/opt/ros/kinetic/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'XDG_VTNR': '7', 'GNOME_KEYRING_CONTROL': '', 'CMAKE_PREFIX_PATH': '/opt/ros/kinetic', 'LD_LIBRARY_PATH': '/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY': '/home/ubuntu/.Xauthority', 'LANGUAGE': 'en_US', 'COMPIZ_CONFIG_PROFILE': 'ubuntu-lowgfx', 'SHLVL': '1', 'QT_LINUX_ACCESSIBILITY_ALWAYS_ON': '1', 'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'CLUTTER_IM_MODULE': 'xim', 'DISPLAY': ':0', 'UPSTART_INSTANCE': '', 'QT_ACCESSIBILITY': '1', 'SESSION': 'ubuntu', 'LIBGL_ALWAYS_SOFTWARE': '1', 'SESSIONTYPE': 'gnome-session', 'XMODIFIERS': '@im=ibus', 'ROS_ETC_DIR': '/opt/ros/kinetic/etc/ros', 'GPG_AGENT_INFO': '/home/ubuntu/.gnupg/S.gpg-agent:0:1', 'HOME': '/home/ubuntu', 'QT4_IM_MODULE': 'xim', 'GTK2_MODULES': 'overlay-scrollbar', 'XDG_SESSION_DESKTOP': 'ubuntu', 'COMPIZ_BIN_PATH': '/usr/bin/', 'XDG_RUNTIME_DIR': '/run/user/1000', 'INSTANCE': '', 'PYTHONPATH': '/opt/ros/kinetic/lib/python2.7/dist-packages', 'ROS_IP': '10.155.107.59', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'VTE_VERSION': '4205', 'ROS_ROOT': '/opt/ros/kinetic/share/ros', 'GDMSESSION': 'ubuntu', 'IM_CONFIG_PHASE': '1', 'UPSTART_JOB': 'unity7', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'GNOME_KEYRING_PID': '', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'ROS_PACKAGE_PATH': '/opt/ros/kinetic/share', 'XDG_CURRENT_DESKTOP': 'Unity', 'XDG_SESSION_ID': 'c1', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Fz8w9BnfVu', '_': '/opt/ros/kinetic/bin/roslaunch', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'GTK_IM_MODULE': 'ibus', 'DESKTOP_SESSION': 'ubuntu', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/1000/1586', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'GTK_MODULES': 'gail:atk-bridge:unity-gtk-module', 'GDM_LANG': 'en_US', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop', 'PWD': '/home/ubuntu', 'JOB': 'unity-settings-daemon', 'ROS_MASTER_URI': 'http://10.155.107.59:11311', 'ROS_VERSION': '1', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'XDG_SEAT': 'seat0'}
[roslaunch][INFO] 2018-08-13 05:48:49,985: starting in server mode
[roslaunch.parent][INFO] 2018-08-13 05:48:49,985: starting roslaunch parent run
[roslaunch][INFO] 2018-08-13 05:48:49,985: loading roscore config file /opt/ros/kinetic/etc/ros/roscore.xml
[roslaunch][INFO] 2018-08-13 05:48:50,374: Added core node of type [rosout/rosout] in namespace [/]
[roslaunch.config][INFO] 2018-08-13 05:48:50,374: loading config file /opt/ros/kinetic/share/magni_viz/launch/view_robot.launch
[roslaunch][INFO] 2018-08-13 05:48:50,400: Added node of type [rviz/rviz] in namespace [/]
[roslaunch][INFO] 2018-08-13 05:48:50,400: ... selected machine [] for node of type [rviz/rviz]
[roslaunch.pmon][INFO] 2018-08-13 05:48:50,401: start_process_monitor: creating ProcessMonitor
[roslaunch.pmon][INFO] 2018-08-13 05:48:50,401: created process monitor <ProcessMonitor(ProcessMonitor-1, initial daemon)>
[roslaunch.pmon][INFO] 2018-08-13 05:48:50,401: start_process_monitor: ProcessMonitor started
[roslaunch.parent][INFO] 2018-08-13 05:48:50,402: starting parent XML-RPC server
[roslaunch.server][INFO] 2018-08-13 05:48:50,402: starting roslaunch XML-RPC server
[roslaunch.server][INFO] 2018-08-13 05:48:50,402: waiting for roslaunch XML-RPC server to initialize
[xmlrpc][INFO] 2018-08-13 05:48:50,402: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2018-08-13 05:48:50,402: Started XML-RPC server [http://10.155.107.59:33925/]
[xmlrpc][INFO] 2018-08-13 05:48:50,402: xml rpc node: starting XML-RPC server
[roslaunch.pmon][INFO] 2018-08-13 05:48:55,429: ProcessMonitor.shutdown <ProcessMonitor(ProcessMonitor-1, started daemon 139828249958144)>
[roslaunch.pmon][INFO] 2018-08-13 05:48:55,508: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon 139828249958144)>
[roslaunch.pmon][INFO] 2018-08-13 05:48:55,508: ProcessMonitor._post_run <ProcessMonitor(ProcessMonitor-1, started daemon 139828249958144)>: remaining procs are []
[roslaunch.pmon][INFO] 2018-08-13 05:48:55,509: ProcessMonitor exit: cleaning up data structures and signals
[roslaunch.pmon][INFO] 2018-08-13 05:48:55,509: ProcessMonitor exit: pmon has shutdown
[roslaunch][ERROR] 2018-08-13 05:48:55,510: Unable to contact my own server at [http://10.155.107.59:33925/].
This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself.  Please check
for errors by running:

        ping 10.155.107.59

For more tips, please see

        http://www.ros.org/wiki/ROS/NetworkSetup

[roslaunch][ERROR] 2018-08-13 05:48:55,510: The traceback for the exception was written to the log file
[roslaunch][ERROR] 2018-08-13 05:48:55,511: Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 306, in main
    p.start()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
    self._start_infrastructure()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 226, in _start_infrastructure
    self._start_server()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 177, in _start_server
    self.server.start()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/server.py", line 405, in start
    """%(self.uri, p.hostname))
RLException: Unable to contact my own server at [http://10.155.107.59:33925/].
This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself.  Please check
for errors by running:

        ping 10.155.107.59

For more tips, please see

        http://www.ros.org/wiki/ROS/NetworkSetup


[rospy.core][INFO] 2018-08-13 05:48:55,511: signal_shutdown [atexit]
root@magni-workstation:~#

I dont get it. I made this test a few months ago from that very workstation agaist another older ubiquityrobotics pi image => and it was working all right !

there must be something but i dont see it.

any idea?

ok. I fixed it.

In fact, in the ROS_IP variable, I had the magni’s ip instead of the workstation’s ip
and also, in
/etc/hosts/
I had to change
ip_of_workstation ubiquityrobot.local
to
ip_of_magni ubiquityrobot.local

and now it works

Cool. Robot telemetery is awesome isn’t it! Your fiducial set up looks cool!