1

In DockerCloud I am trying to get my container to speak with the other container. I believe the problem is the hostname not resolving (this is set in /conf.d/kafka.yaml shown below).

To get DockerCloud to have the two containers communicate, I have tried many variations including the full host-name kafka-development-1 and kafka-development-1.kafka, etc.

The error I keep getting is in the datadog-agent info:

Within the container I run ./etc/init.d/datadog-agent info and receive:

kafka
-----
  - instance #kafka-kafka-development-9092 [ERROR]: 'Cannot connect to instance 
    kafka-development:9092 java.io.IOException: Failed to retrieve RMIServer stub: 
    javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: \n\tjava.net.SocketException: Connection reset]' collected 0 metrics
  - Collected 0 metrics, 0 events & 0 service checks

The steps I take for details

SSH Into Docker Node:

$ docker ps

CONTAINER | PORTS 
datadog-agent-kafka-development-1.2fb73f62 | 8125/udp, 9001/tcp 
kafka-development-1.3dc7c2d0 | 0.0.0.0:9092->9092/tcp

I log into the containers to see their values, this is the datadog-agent:

$ docker exec -it datadog-agent-kafka-development-1.2fb73f62 /bin/bash

$ > echo $DOCKERCLOUD_CONTAINER_HOSTNAME
    datadog-agent-kafka-development-1

$ > tail /etc/hosts
    172.17.0.7  datadog-agent-kafka-development-1
    10.7.0.151  datadog-agent-kafka-development-1

This is the kafka container:

$ docker exec -it kafka-development-1.3dc7c2d0 /bin/bash

$ > echo $DOCKERCLOUD_CONTAINER_HOSTNAME                                                                                                                     
    kafka-development-1

$ > tail /etc/hosts
    172.17.0.6  kafka-development-1
    10.7.0.8    kafka-development-1

$ > echo $KAFKA_ADVERTISED_HOST_NAME
    kafka-development.c23d1d00.svc.dockerapp.io

$ > echo $KAFKA_ADVERTISED_PORT
    9092

$ > echo $KAFKA_ZOOKEEPER_CONNECT
    zookeeper-development:2181

Datadog conf.d/kafka.yaml:

 instances:
   - host: kafka-development
     port: 9092 # This is the JMX port on which Kafka exposes its metrics (usually 9999)
     tags:
       kafka: broker
       env: development
  # ... Defaults Below

Can anyone see what I am doing wrong?

JREAM
  • 5,741
  • 11
  • 46
  • 84
  • 1
    Can you post your Stackfile for Docker Cloud? – jmiraglia Nov 28 '16 at 20:28
  • Im not using a stackfile, it's a dockercloud service that uses a container @ https://github.com/wurstmeister/kafka-docker, this is the contents of the summary of the Docker file for DataDog: https://gist.github.com/JREAM/e828bcba3abd865992beb3ad89188cdc – JREAM Dec 07 '16 at 02:25
  • Can't you just use `links` to link one container to the other? – gdvalderrama Apr 05 '17 at 10:01
  • Hey sorry, this is a bit old -- Im not working with the setup now I will close it I never did get around to solving it! Well I have no reason to close it -- I would if I did. – JREAM Apr 05 '17 at 13:31

0 Answers0