Why is Dockerized Hadoop datanode registering with the wrong IP address?
This is caused by a known docker issue (I also raised - and closed - this duplicate which describes the steps as set out in the question).
There is a merged pull request which should fix the problem and is scheduled for inclusion in Docker 1.10.0. But in the meantime, the following workaround can be used:
- Remove all user-created networks with
sudo docker network rm
- Stop the docker daemon with
sudo service docker stop
- Cleanup the iptables with
sudo iptables -F && sudo iptables -F -t nat
- Restart the docker daemon with
sudo service docker start
- Recreate the user-defined network
- Run the containers