Ambari-Server on Docker Java install issues

Today I hit a issues with my Ambari-Server install on a virtually blank system:

[root@<server>/]# ambari-server setup
Using python  /usr/bin/python2.6
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)?
Adjusting ambari-server permissions and ownership...
Checking firewall status...
FATAL: Could not load /lib/modules/2.6.32-504.16.2.el6.x86_64/modules.dep: No such file or directory
iptables v1.4.7: can't initialize iptables table 'filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
FATAL: Could not load /lib/modules/2.6.32-504.16.2.el6.x86_64/modules.dep: No such file or directory
iptables v1.4.7: can't initialize iptables table 'nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.

WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more detai
OK to continue [y/n] (y)?
Checking JDK...
[1] OpenJDK 1.8.0
[2] OpenJDK 1.7.0 (deprecated)
[3] Custom JDK
==============================================================================
Enter choice (1):
Downloading JDK from http://birepo-build.svl/repos/IOP-UTILS/RHEL7/x86_64/1.1/openjdk/jdk-1.8.0.tar.gz to /var/lib/ambari-1.8.0.tar.gz
jdk-1.8.0.tar.gz... 100% (56.5 MB of 56.5 MB)
Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz
Installing JDK to /usr/jdk64/
Installation of JDK has failed: [Errno 2] No such file or directory

JDK found at /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz. Would you like to re-download the JDK [y/n] (y)?
Re-downloading JDK from http://birepo-build.svl/repos/IOP-UTILS/RHEL7/x86_64/1.1/openjdk/jdk-1.8.0.tar.gz to /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz
jdk-1.8.0.tar.gz... 100% (56.5 MB of 56.5 MB)
Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz
Successfully re-downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz
Installing JDK to /usr/jdk64/
Installation of JDK was failed: [Errno 2] No such file or directory

ERROR: Exiting with exit code 1.
REASON: Downloading or installing JDK failed: 'Fatal exception: Unable to install JDK. Please remove JDK, file found at /var/lib/ambari-server/resources/jdk-1.8.0.tar.gz and re-run Ambari Server setup, exit code 1'.     Exiting.`

Searching about I did a little investigation of my own as this is running on a Docker host. Hence the IPTables issue, this is due to it being within a Docker container and the NET_ADMIN capability for non-privileged containers. Unprivileged containers can’t change their network configuration.

  • CoreOS Unit Failed on Launched
  • Restart postgres in a docker environment
  • Multiple vhosts on one and the same docker container
  • If adding a command that repeats every 10 minutes to crontab, when does the first job run?
  • how to pull docker network configuration and containers
  • Subscription in Sensu
  • Use Prometheus “target relabeling” to extract cAdvisor's Docker image name without tag
  • communication between containers in docker
  • How to move docker containers using device mapper to another machine without using docker commands
  • Single Docker Image with multiple Softwares or Separate images for separate software
  • Connecting Logstash and Rabbitmq docker containers
  • Docker-compose is not generating log file for spring boot application
  • One Solution collect form web for “Ambari-Server on Docker Java install issues”

    Turns out that I’ve managed to figure out this issue my self.

    First I found lots of links talking about manually installing the JDK, then repository issues and python script time-outs.
    It was rather simple in the end, just needed to install the ‘tar’ package as it couldn’t extract the files, once I did this, it ran through with no issue.

    That’s what I get for having a ‘blank’ install.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.