Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issues deploying Gazebo-novnc docker on cloud run

Hello there!

I am a fresh into the world of docker and cloud run. I am working on a project where I have a dockerfile for a Gazebo-novnc sandbox based on the OSRF's ROS2 Humble image. I have built my dockerfile locally and tested the docker container successfully. I have also taken care of exposing the my noVNC to port 8080 and also added an IP address for the service to run on Google cloud run. I have followed all the relevant steps such as adding the dockerfile to the Artifact repository and deployed it on Cloud run as a service. I am however facing the following error at Creating revision stage,

 
INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
 
INFO success: gazebo entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
 
INFO spawnerr: command at '/root/novnc/utils/launch.sh' is not executable
 
INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
 
INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO spawnerr: command at '/root/novnc/utils/launch.sh' is not executable
INFO spawnerr: command at '/root/novnc/utils/launch.sh' is not executable
 
INFO gave up: novnc entered FATAL state, too many start retries too quickly
 
 
Default STARTUP TCP probe failed 1 time consecutively for container "gaznovnclinux-1" on port 8080. The instance was not started. Connection failed with status DEADLINE_EXCEEDED.
 
 
Cloud Run ReplaceService gaznovnclinux-00002-t4v {@type: type.googleapis.com/google.cloud.audit.AuditLog, methodName: /Services.ReplaceService, resourceName: namespaces/gazebotest-461601/revisions/gaznovnclinux-00002-t4v, response: {…}, serviceName: run.googleapis.com, status: {…}}
 
 
Cloud Run ReplaceService gaznovnclinux {@type: type.googleapis.com/google.cloud.audit.AuditLog, methodName: /Services.ReplaceService, resourceName: namespaces/gazebotest-461601/services/gaznovnclin

 

Here is my dockerfile and the accompanying supervisord.conf file

FROM osrf/ros:humble-desktop-full
RUN apt-get update

# docker-novnc
# Install git, supervisor, VNC, & X11 packages
RUN set -ex; \
apt-get update; \
apt-get install -y \
bash \
fluxbox \
git \
net-tools \
novnc \
supervisor \
x11vnc \
xterm \
xvfb

# Setup demo environment variables
ENV HOME=/root \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=1024 \
DISPLAY_HEIGHT=768 \
RUN_XTERM=no \
VNC_SHARED=true \
RUN_FLUXBOX=yes

# Install tools
RUN apt-get install -y openssh-client vim python3-pip curl iputils-ping

# Install ros dependencies
RUN apt-get install -y libpcl-dev ros-humble-pcl-msgs ros-humble-pcl-ros
RUN apt-get install dos2unix

# House cleaning
RUN apt-get autoclean

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Change work directory to add novnc files
WORKDIR /root/
ADD noVNC-0.6.2 /root/novnc/
RUN ln -s /root/novnc/vnc_auto.html /root/novnc/index.html

USER root

EXPOSE 8080

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

And the supervisord.conf

[supervisord]
nodaemon=true

[program:xvfb]
command=Xvfb :0 -screen 0 "%(ENV_DISPLAY_WIDTH)s"x"%(ENV_DISPLAY_HEIGHT)s"x24 -listen tcp -ac
autorestart=true

[program:x11vnc]
command=x11vnc -forever -shared
autorestart=true

[program:fluxbox]
command=/usr/bin/startfluxbox
autorestart=true

[program:novnc]
command=/root/novnc/utils/launch.sh --vnc 0.0.0.0:5900 --listen 8080
autorestart=true

[program:gazebo]
command=bash -c 'sleep 5 && ros2 launch ros_ign_gazebo ign_gazebo.launch.py'
autorestart=true

I am a beginner and was just hoping to get some guidance here from more experienced people with experience doing what I am trying. Please let me know if I am missing out on other relevant details that might help to troubleshoot this issue.

Thank you for the help!

0 0 14
0 REPLIES 0