diff --git a/docs/quickstart/docker.md b/docs/quickstart/docker.md index 17e6229d7bd..5ae3afcc3b5 100644 --- a/docs/quickstart/docker.md +++ b/docs/quickstart/docker.md @@ -142,7 +142,8 @@ Zeppelin service runs on local server, it auto configure itself to use `DockerIn - ${ZEPPELIN_HOME}/interpreter/${interpreterGroupName} - ${ZEPPELIN_HOME}/conf/zeppelin-site.xml - ${ZEPPELIN_HOME}/conf/log4j.properties - - ${ZEPPELIN\_HOME}/conf/log4j\_yarn_cluster.properties + - ${ZEPPELIN_HOME}/conf/log4j2.properties + - ${ZEPPELIN_HOME}/conf/log4j_yarn_cluster.properties - HADOOP\_CONF_DIR - SPARK\_CONF_DIR - /etc/krb5.conf diff --git a/docs/setup/deployment/docker.md b/docs/setup/deployment/docker.md index 9598dbf0d65..7e112db6c47 100644 --- a/docs/setup/deployment/docker.md +++ b/docs/setup/deployment/docker.md @@ -40,6 +40,12 @@ docker run -p 8080:8080 -e ZEPPELIN_IN_DOCKER=true --rm --name zeppelin apache/z Notice, please specify environment variable `ZEPPELIN_IN_DOCKER` when starting zeppelin in docker, otherwise you can not see the interpreter log. +Note: `ZEPPELIN_IN_DOCKER` applies to the all-in-one image built from +`scripts/docker/zeppelin/bin` (the `Dockerfile` referenced under "Building dockerfile +locally" below). The split `zeppelin-server`/`zeppelin-interpreter` images described in +"Build docker image for Zeppelin server & interpreters" already log to stdout by +default and don't need or support this flag. + * Zeppelin will run at `http://localhost:8080`. If you want to specify `logs` and `notebook` dir, diff --git a/scripts/docker/zeppelin/bin/Dockerfile b/scripts/docker/zeppelin/bin/Dockerfile index e4e91e30aa8..a7ffae2b94f 100644 --- a/scripts/docker/zeppelin/bin/Dockerfile +++ b/scripts/docker/zeppelin/bin/Dockerfile @@ -78,6 +78,11 @@ RUN echo "$LOG_TAG Download Zeppelin binary" && \ chmod 775 ${ZEPPELIN_HOME} && \ chmod -R 775 /opt/conda +# These 4 files are all required by bin/common.sh, not obsolete duplicates: +# log4j.properties / log4j_docker.properties configure reload4j, which backs the +# server and most interpreters; log4j2.properties / log4j2_docker.properties +# configure the real Log4j2 core that Flink bundles transitively. The "_docker" +# variants are only picked up when the ZEPPELIN_IN_DOCKER env var is set. COPY log4j.properties ${ZEPPELIN_HOME}/conf/ COPY log4j_docker.properties ${ZEPPELIN_HOME}/conf/ COPY log4j2.properties ${ZEPPELIN_HOME}/conf/ diff --git a/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java b/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java index 9c86a676083..521911d89c3 100644 --- a/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java +++ b/zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java @@ -547,6 +547,7 @@ private void copyRunFileToContainer(String containerId) copyFiles.put( zeplConfPath + "/zeppelin-site.xml", containerZeplConfPath + "/zeppelin-site.xml"); copyFiles.put(zeplConfPath + "/log4j.properties", containerZeplConfPath + "/log4j.properties"); + copyFiles.put(zeplConfPath + "/log4j2.properties", containerZeplConfPath + "/log4j2.properties"); copyFiles.put(zeplConfPath + "/log4j_yarn_cluster.properties", containerZeplConfPath + "/log4j_yarn_cluster.properties");