diff --git a/bin/zeppelin.sh b/bin/zeppelin.sh index 92d7f7ead96..701b8901c4b 100755 --- a/bin/zeppelin.sh +++ b/bin/zeppelin.sh @@ -83,7 +83,7 @@ if [[ ! -d "${ZEPPELIN_PID_DIR}" ]]; then fi if [[ ! -d "${ZEPPELIN_NOTEBOOK_DIR}" ]]; then - echo "Pid dir doesn't exist, create ${ZEPPELIN_NOTEBOOK_DIR}" + echo "Notebook dir doesn't exist, create ${ZEPPELIN_NOTEBOOK_DIR}" $(mkdir -p "${ZEPPELIN_NOTEBOOK_DIR}") fi diff --git a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java index 23aeca24802..e80548f0eaf 100644 --- a/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java +++ b/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java @@ -125,8 +125,12 @@ public void close() { logger.info("closing Python interpreter ....."); try { - process.close(); - gatewayServer.shutdown(); + if (process != null) { + process.close(); + } + if (gatewayServer != null) { + gatewayServer.shutdown(); + } } catch (IOException e) { logger.error("Can't close the interpreter", e); }