aws-robotics / cloudwatchlogs-ros1

ROS packages for facilitating the use of AWS cloud services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloudwatch_logger node not working

xabxx opened this issue · comments

repro steps
on a mac or linux machine,

docker pull ros:kinetic-ros-core
docker run -it \
    --network host \
    -v "/tmp/.X11-unix:/tmp/.X11-unix" \
    -v "${HOME}:/opt/${USER}" \
    -v "${HOME}/.gitconfig:/root/.gitconfig" \
    --name=integrationtest_cloudwatchlogs \
    --privileged \
    ros:kinetic-ros-core	    
    bash

at this point you should be inside the docker container
now, inside the docker container, run

#install pip3
apt install -y python3-pip python-rosinstall
#install aws cli
pip3 install --upgrade --user awscli
# make sure awscli is in your path
aws --version
# (optional) if cannot find awscli in current path, try to look for it, my path is
# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# configure aws creds, make sure to set the region
aws configure

source /opt/ros/kinetic/setup.bash
apt-get update
apt-get install -y ros-$ROS_DISTRO-cloudwatch-logger
roslaunch cloudwatch_logger cloudwatch_logger.launch

I seeing error messages:

root@linuxkit-025000000001:~/test# roslaunch cloudwatch_logger cloudwatch_logger.launch ... logging to /root/.ros/log/126497be-8c70-11e9-9aa8-025000000001/roslaunch-linuxkit-025000000001-4288.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.

started roslaunch server http://localhost:33841/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    cloudwatch_logger (cloudwatch_logger/cloudwatch_logger)

ROS_MASTER_URI=http://localhost:11311

process[cloudwatch_logger-1]: started with pid [4305]
[ERROR] [1560274910.439882900]: [CurlHttpClient] Curl returned error code 6 - Couldn't resolve host name
[ERROR] [1560274910.440286100]: [AWSClient] HTTP response code: 31306048
Exception name: 
Error message: Unable to connect to endpoint
0 response headers:

note that I had no issues running the metrics_collector node.

I was also able to use aws cli and called aws logs put-log-events in the same env. where I tried to launch the cloudwatch_logger node.

(Can't say that it's a bug if we don't have a root cause :-))

@AAlon helped out. we found out that this could be a missing parameter issue when using cloudwatch_logger.launch as the launch file.

So is this actually an issue? I thought it was expected that when using the cloudwatch_logger.launch file that you would have to provide some configuration parameters. If I'm recalling correctly, the original intention was that they were supposed to use cloudwatch_logger.launch from within their own launch file, such as what's done with the sample_application.launch and not directly launch it.

#35 should help.