cybermaggedon/accumulo-docker

Container exits after start

lmorandini opened this issue · 5 comments

Hi,
I cannot seem to be able to start any Accumulo container and keep it running.
I tried to master branch, with:

sudo docker run -d\
      -p 9998:9998\
      -e ZOOKEEPERS=${ZOOKEEPER_MASTER_IP}\
      -e HDFS_VOLUMES='hdfs://${HDFS_NAMENODE_IP}:9000/accumulo'\
      -e NAMENODE_URI='hdfs://${HDFS_NAMENODE_IP}:9000/'\
      -e MASTER_HOSTS=${ACCUMULO_MASTER_IP}\
      -e SLAVE_HOSTS=`echo ${SERVERS_IP} | sed 's/ /,/g'`\
      -e GC_HOSTS=${ACCUMULO_GC_IP}\
      -e MONITOR_HOSTS=${ACCUMULO_MONITOR_IP}\
      -e TRACER_HOSTS=${ACCUMULO_TRACER_IP}\
      -e MY_HOSTNAME=${IP}\
      --name accumulo-gc\
      cybermaggedon/accumulo:1.9.3 /start-process gc;\

I tried also the cluster branch, using daemons, to no avail:

sudo docker run -d\
      -p 9998:9998\
      -e ZOOKEEPERS=${ZOOKEEPER_MASTER_IP}\
      -e HDFS_VOLUMES='hdfs://${HDFS_NAMENODE_IP}:9000/accumulo'\
      -e NAMENODE_URI='hdfs://${HDFS_NAMENODE_IP}:9000/'\
      -e MASTER_HOSTS=${ACCUMULO_MASTER_IP}\
      -e SLAVE_HOSTS=`echo ${SERVERS_IP} | sed 's/ /,/g'`\
      -e GC_HOSTS=${ACCUMULO_GC_IP}\
      -e MONITOR_HOSTS=${ACCUMULO_MONITOR_IP}\
      -e TRACER_HOSTS=${ACCUMULO_TRACER_IP}\
      -e MY_HOSTNAME=${IP}\
      -e DAEMONS=gc\
      --name accumulo-gc\
      cybermaggedon/accumulo:1.9.3;\

Sorry I missed this, trying to reproduce the error.

I can't reproduce this using the command you're using. Couple of things...

      -e HDFS_VOLUMES='hdfs://${HDFS_NAMENODE_IP}:9000/accumulo'\
      -e NAMENODE_URI='hdfs://${HDFS_NAMENODE_IP}:9000/'\

Do you have the ${HDFS_NAMENODE_IP} bit in there, and was that meant? It's quoted, so you get that text in the environment variable.

Also, the -d option on docker causes it to run the container in the background, so you are expecting the docker command to return to the shell prompt while the container continues to run.

Hi @cybermaggedon, thanks for taking the time to help me.

The single quotes are there to avoid a premature variable expansion (that command is executed remotely)... long story short, the actual command that is executed is this:

sudo docker run -t -d -p 9999:9999\
  --env CORE_CONF_fs_defaultFS=hdfs://10.0.2.25:8020\
  --env ACCCUMULO_CONF_instance_dfs_dir=accumulo\
  --env ACCCUMULO_CONF_instance_dfs_uri=hdfs://10.0.2.25:9000/accumulo\
  --env ACCUMULO_CONF_instance_zookeeper_host=10.0.2.25\
  --name accumulo-master infotechsoft/accumulo\
  /opt/accumulo/bin/start-server.sh localhost master

Which exits after a few seconds leaving this in its logs:

Copying configuration files to: /opt/accumulo-1.9.1/conf
Setup complete
Configuring accumulo
 - Setting instance.zookeeper.host=10.0.2.25
Configuring core
 - Setting fs.defaultFS=hdfs://10.0.2.25:8020
Configuring hdfs
Configuring yarn
Configuring httpfs
Configuring kms
Configuring for multihomed network
No host resolver specified. Using distro default. (Specify HOST_RESOLVER to change)
Starting master on localhost

That looks quite different to my Accumulo image. I'm not familiar with infotechsoft/accumulo, but cybermaggedon/accumulo doesn't have Accumulo installed at /opt/accumulo, but /usr/local/accumulo. Maybe you need to raise the ticket here...

https://github.com/infotechsoft/docker-accumulo

Fair point, thanks for taking the time for looking into it.