ROS2 docker container error '502 Bad Gateway'

env: Jetson TX2 dev. kit with JetPack 4.5

try to run ROS2 container as follow:

But got error as follow:

$ ./scripts/docker_build_ros.sh --distro foxy 
reading L4T version from /etc/nv_tegra_release
L4T BSP Version:  L4T R32.5.0
l4t-base image:  nvcr.io/nvidia/l4t-base:r32.5.0
ROS_DISTRO:   foxy
ROS_PACKAGE:  ros_base
WITH_PYTORCH: off
WITH_SLAM:    off
[sudo] password for nvidia: 

Building container ros:foxy-ros-base-l4t-r32.5.0
BASE_IMAGE=nvcr.io/nvidia/l4t-base:r32.5.0

Building ros:foxy-ros-base-l4t-r32.5.0 container...
Sending build context to Docker daemon  624.1kB
[WARNING]: Empty continuation line found in:
    RUN mkdir -p ${ROS_ROOT}/src &&     cd ${ROS_ROOT} &&     rosinstall_generator --deps --rosdistro ${ROS_DISTRO} ${ROS_PKG} 		launch_xml 		launch_yaml 		launch_testing 		launch_testing_ament_cmake 		demo_nodes_cpp 		demo_nodes_py 		example_interfaces 		camera_calibration_parsers 		camera_info_manager 		cv_bridge 		v4l2_camera 		vision_opencv 		vision_msgs 		image_geometry 		image_pipeline 		image_transport 		compressed_image_transport 		compressed_depth_image_transport 		> ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall &&     cat ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall &&     vcs import src < ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall &&     rm ${ROS_ROOT}/src/libyaml_vendor/CMakeLists.txt &&     wget --no-check-certificate https://raw.githubusercontent.com/ros2/libyaml_vendor/master/CMakeLists.txt -P ${ROS_ROOT}/src/libyaml_vendor/ &&     apt-get update &&     cd ${ROS_ROOT} &&     rosdep init &&     rosdep update &&     rosdep install -y     	  --ignore-src        --from-paths src 	  --rosdistro ${ROS_DISTRO} 	  --skip-keys "libopencv-dev libopencv-contrib-dev libopencv-imgproc-dev python-opencv python3-opencv" &&     rm -rf /var/lib/apt/lists/* &&     apt-get clean &&     colcon build --merge-install &&     rm -rf ${ROS_ROOT}/src &&     rm -rf ${ROS_ROOT}/logs &&     rm -rf ${ROS_ROOT}/build &&     rm ${ROS_ROOT}/*.rosinstall
[WARNING]: Empty continuation lines will become errors in a future release.
Step 1/29 : ARG BASE_IMAGE=nvcr.io/nvidia/l4t-base:r32.5.0
Step 2/29 : FROM ${BASE_IMAGE}
received unexpected HTTP status: 502 Bad Gateway

Would you please let me know where to check to resolve this?

Thanks

Hi @MtHiker, it seems to be a network connection issue (hopefully temporary), are you able to try again?

Also, you can use the pre-built dustynv/ros:foxy-ros-base-l4t-r32.5.0 container if you wish, then you don’t need to compile it yourself. They are listed here: https://github.com/dusty-nv/jetson-containers#pre-built-container-images

1 Like

Thanks dusty,

I will test the pre-built container too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.