1
votes

I try to use Hadoop with Docker Toolbox on Windows 10 Family. So I followed this setup : https://linoxide.com/cluster/setup-single-node-hadoop-cluster-docker/

  1. Download the image --> OK.
  2. Run the container --> OK.
$ docker run -it sequenceiq/hadoop-docker:2.7.1 /etc/bootstrap.sh -bash/
Starting sshd:                                             [  OK  ]
18/11/16 10:38:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [c13feb9767ac]
c13feb9767ac: starting namenode, logging to /usr/local/hadoop/logs/hadoop-root-namenode-c13feb9767ac.out
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-root- datanode-c13feb9767ac.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-root-secondarynamenode-c13feb9767ac.out
18/11/16 10:40:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop/logs/yarn--resourcemanager-c13feb9767ac.out
localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-root-nodemanager-c13feb9767ac.out
  1. Run jps command --> OK.
bash-4.1# jps
119 NameNode
535 ResourceManager
200 DataNode
656 Jps
319 SecondaryNameNode
620 NodeManager
  1. Get IP address --> OK.
bash-4.1# ifconfig
...
inet addr:172.17.0.2
...
  1. Go to browser (Google Chrome v70) --> KO.

Adress used : 172.17.0.2:50070

Error :

This site is unreachable 172.17.0.2 took too long to answer.

Can you help me to fix it please? If you need more informations ask me.

Thanks.

UPDATE 1:

docker ps result:

c13feb9767ac      sequenceiq/hadoop-docker:2.7.1   "/etc/bootstrap.sh -…"   20 minutes ago      Up 20 minutes       2122/tcp, 8030-8033/tcp, 8040/tcp, 8042/tcp, 8088/tcp, 19888/tcp, 49707/tcp, 50010/tcp, 50020/tcp, 50070/tcp, 50075/tcp, 50090/tcp   xenodochial_euclid

UPDATE 2:

I opened the port 50070 on the firewall but problem is still present.

1
"Docker Toolbox" is deprecated. Please use Docker for WindowsOneCricketeer
I tried but I don't have Windows Pro or Windows Enterprise. Docker for Windows not works on Windows Family/Home.Royce

1 Answers

1
votes

At the very least, you need to expose the port.

docker run -it -p 50070:50070 sequenceiq/hadoop-docker:2.7.1

Then, if you want to continue using the old Docker Toolbox (that linked post was created in 2016, before Docker for Windows existed), you need to not use ifconfig, but rather docker-machine ip from Windows, not the container


Personally, I use Docker Compose

version: "2"

services:
  namenode:
    image: bde2020/hadoop-namenode:1.1.0-hadoop2.7.1-java8
    container_name: namenode
    ports:
      - 8020:8020
      - 50070:50070
      # - 59050:59050
    volumes:
      - hadoop_namenode:/hadoop/dfs/name
    environment:
      - CLUSTER_NAME=test
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

  datanode1:
    image: bde2020/hadoop-datanode:1.1.0-hadoop2.7.1-java8
    container_name: datanode1
    ports:
      - 50075:50075
    depends_on:
      - namenode
    volumes:
      - hadoop_datanode1:/hadoop/dfs/data
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

volumes:
  hadoop_namenode:
  hadoop_datanode1:

networks:
  hadoop:

hadoop.env

CORE_CONF_fs_defaultFS=hdfs://namenode:8020
CORE_CONF_hadoop_http_staticuser_user=root

HDFS_CONF_dfs_replication=1
HDFS_CONF_dfs_webhdfs_enabled=true
HDFS_CONF_dfs_permissions_enabled=false