Ask Your Question
0

Cannot send a request outside the Docker container

asked 2020-09-30 09:26:30 -0500

Stephane gravatar image

updated 2020-10-05 03:07:41 -0500

I created a Docker image using the image:

FROM streamsets/datacollector

Then I spin up the container with the compose file:

version: "3.7"
services:
  streamsets:
    image: localhost:5000/streamsets:latest
    ports:
      - "18630:18630"
    networks:
      streamsets:
      common:
    volumes:
      - "sdc-data:/data"
      - "sdc-stagelibs:/opt/streamsets-datacollector-3.18.1/streamsets-libs"
      - "~/dev/docker/projects/streamsets/volumes/stage-libs-extra:/opt/stage-libs-extra"
      - "~/dev/docker/projects/streamsets/volumes/logs:/logs"
    environment:
      STREAMSETS_LIBRARIES_EXTRA_DIR: "/opt/stage-libs-extra"
      HOST_USER_ID: ${CURRENT_UID}
      HOST_GROUP_ID: ${CURRENT_GID}
    deploy:
      replicas: 1
      restart_policy:
        condition: any
        delay: 5s
        max_attempts: 3
        window: 10s
    healthcheck:
      test: curl --fail http://localhost:18630 || exit 1
      interval: 1m
      timeout: 3s
      retries: 3
volumes:
  sdc-data:      
  sdc-stagelibs:      
  sdc-stagelibs-extra:      
networks:
  streamsets:
    name: streamsets
  common:  
    external: true
    name: common

I can then log in the admin panel.

Now I try to install the Apache Kafka connector from the Package Manager but it fails with the message:

java.net.UnknownHostException: archives.streamsets.com
javax.ws.rs.ProcessingException: java.net.UnknownHostException: archives.streamsets.com

Indeed, from within the container, it is impossible to reach out to the big world:

16:20 $ docker-exec streamsets_streamsets.1.7uz9ultks40qeqi190yzmysso
bash-4.4$ wget https://www.google.com/
wget: bad address 'www.google.com'
bash-4.4$

My version as seen in the admin panel:

StreamSets Data Collector 3.18.1 ( built by ubuntu on 2020-08-24T23:02Z git: 5b457882cc0745387c44cd530d33967d43f53a34)
edit retag flag offensive close merge delete

Comments

Stephane gravatar imageStephane ( 2020-10-11 05:24:48 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2020-10-11 05:32:11 -0500

Stephane gravatar image

In the Docker Compose file I replaced my custom image with the image offered by Streamsets so as to have:

version: "3.7"
services:
  streamsets:
    image: streamsets/datacollector

and could install the Apache Kafka connector from the Package Manager now.

The Apache Kafka 2.0.0 library is now seen as installed in the admin panel.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-09-30 09:26:30 -0500

Seen: 328 times

Last updated: Oct 11