Supervisor is not starting up

I am following cloudera cdh4 installation guide.

My base file

  • Docker: Mongo exits on run
  • How can I debug my docker container with docker-machine and PHPStorm
  • How are docker-machine certs used?
  • Running MongoDB from Docker
  • Container cannot be started from bootlocal.sh
  • Can Docker help build executable that work in different platform
  • FROM ubuntu:precise
    
    RUN apt-get update -y
    #RUN apt-get install -y curl
    
    RUN apt-get install -y software-properties-common python-software-properties
    
    RUN add-apt-repository ppa:webupd8team/java
    
    RUN apt-get update -y
    RUN echo debconf shared/accepted-oracle-license-v1-1 select true | \
    debconf-set-selections
    RUN apt-get install -y oracle-java7-installer
    
    #Checking java version
    RUN java -version
    

    My hadoop installation file

    java_ubuntu is the image build from my base file.

    FROM java_ubuntu:latest
    
    RUN apt-get update -y
    RUN apt-get install -y curl
    
    RUN curl http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb > cdh4-repository_1.0_all.deb
    RUN dpkg -i cdh4-repository_1.0_all.deb
    RUN curl -s http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh/archive.key | apt-key add -
    
    RUN apt-get update -y
    RUN apt-get install -y hadoop-0.20-conf-pseudo
    
    #Check for /etc/hadoop/conf.pseudo.mrl to verfiy hadoop packages
    RUN echo "dhis"  
    RUN dpkg -L hadoop-0.20-conf-pseudo
    

    Supervisor part
    hadoop_ubuntu is the image build from my hadoop installation docker file

    FROM hadoop_ubuntu:latest
    
    USER hdfs
    RUN hdfs namenode -format
    
    USER root
    
    RUN apt-get install -y supervisor
    RUN echo "[supervisord] nodameon=true  [program=namenode] command=/etc/init.d/hadoop-hdfs-namenode -D" > /etc/supervisorconf.d
    
    CMD ["/usr/bin/supervisord"]
    

    Program is successfully build. But namenode is not starting up? How to use supervisor?

  • Docker best practice on base images and host os
  • How to tag docker hub automated builds as git sha
  • How do I forward my Docker IP to the rest of the network?
  • Service from sources inside Docker container
  • Makefile hangs when docker-compose -d is used and fails with code 129 without -d
  • How to execute docker commands after a process has started
  • 2 Solutions collect form web for “Supervisor is not starting up”

    You have your config in /etc/supervisorconf.d and I don’t believe that’s the right location.

    It should be /etc/supervisor/conf.d/supervisord.conf instead.

    Also it’s easier to maintain if you make a file locally and then use the COPY instruction to put it in the image.

    Then as someone mentioned you can connect to the container after it’s running (docker exec -it <container id> /bin/bash) and then run supervisorctl to see what’s running and what might be wrong.

    Perhaps you need line breaks in your supervisor.conf. Try hand crafting one and COPY it into your dockerfile for testing.

    Docker and supervisord

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