BerkeleyAutomation / FogROS2

An Adaptive and Extensible Platform for Cloud and Fog Robotics Using ROS 2
https://berkeleyautomation.github.io/FogROS2
Apache License 2.0
171 stars 29 forks source link

Error reading SSH protocol banner in aws instance and scp: /home/ubuntu//ros_workspace.tar: Permission denied in gcp #115

Open ghost opened 1 year ago

ghost commented 1 year ago

Describe the bug I am trying to build and run this project. I have used Amazon Cloud and also Google Cloud but always getting error.

To Reproduce In AWS

  1. Create AWS instance
  2. Copy ami and region info

In Google Cloud

  1. Create project
  2. Build project and run

Also build docker images but still getting errors.

Expected behavior It should build, connect and run.

Amazon cloud in native

[WARN] [1682773686.022252877] [fogros2.scp]: Error reading SSH protocol banner[Errno 104] Connection reset by peer, retrying...
Exception (client): Error reading SSH protocol banner[Errno 104] Connection reset by peer
Traceback (most recent call last):
  File "/home/c0der/.local/lib/python3.10/site-packages/paramiko/transport.py", line 2268, in _check_banner
    buf = self.packetizer.readline(timeout)
  File "/home/c0der/.local/lib/python3.10/site-packages/paramiko/packet.py", line 374, in readline
    buf += self._read_timeout(timeout)
  File "/home/c0der/.local/lib/python3.10/site-packages/paramiko/packet.py", line 601, in _read_timeout
    x = self.__socket.recv(128)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/c0der/.local/lib/python3.10/site-packages/paramiko/transport.py", line 2091, in run
    self._check_banner()
  File "/home/c0der/.local/lib/python3.10/site-packages/paramiko/transport.py", line 2272, in _check_banner
    raise SSHException(
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner[Errno 104] Connection reset by peer

Google cloud in docker log

Installing collected packages: scp
Successfully installed scp-0.14.5
Defaulting to user installation because normal site-packages is not writeable
Collecting wgconfig
  Downloading wgconfig-0.3.0-py3-none-any.whl (20 kB)
Installing collected packages: wgconfig
Successfully installed wgconfig-0.3.0
/home/root fog_ws
removing old workspace
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: scp: /home/ubuntu//ros_workspace.tar: Permission denied

root@DESKTOP-KR8NT80:/home/root/fog_ws#
KeplerC commented 1 year ago

Hi Thanks for your interest. My hypothesis is the configuration of firewall/security group that resets the ssh session. Can you try to directly ssh to the machine (get the IP address from the cloud console, with the ssh key in ~/.fogros2/YOUR_INSTANCE_NAME.pem)?

ghost commented 1 year ago

Getting errors in Google Cloud.

cd ~/fog_ws
source install/setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp 
export CYCLONEDDS_URI=file://$(pwd)/install/fogros2/share/fogros2/configs/cyclonedds.ubuntu.$(lsb_release -rs | sed 's/\.//').xml

ros2 launch fogros2_examples talker.gcp.launch.py
[talker-1] 1683138465.801045 [0]     talker: selected interface "wg0" is not multicast-capable: disabling multicast
....
....
[talker-1] [WARN] [1683138489.376031188] [minimal_publisher]: Publishing: "Hello World from fog-a6fbd5e9-ecru-fleece (10.128.0.27): 46"
[talker-1] [WARN] [1683138489.876084099] [minimal_publisher]: Publishing: "Hello World from fog-a6fbd5e9-ecru-fleece (10.128.0.27): 47"
[talker-1] 1683138489.904430 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7410 failed with retcode -12
[talker-1] 1683138489.904472 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7412 failed with retcode -12
[talker-1] 1683138489.904483 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7414 failed with retcode -12
[talker-1] 1683138489.904494 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7416 failed with retcode -12
[talker-1] 1683138489.904505 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7418 failed with retcode -12
[talker-1] 1683138489.904515 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7420 failed with retcode -12
[talker-1] 1683138489.904525 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7422 failed with retcode -12
[talker-1] 1683138489.904534 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7424 failed with retcode -12
[talker-1] 1683138489.904545 [0]        tev: ddsi_udp_conn_write to udp/10.0.0.1:7426 failed with retcode -12

image