[ZEPPELIN-1984] Zeppelin Server doesn't catch all exceptions when launching interpreter.sh #1921
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/ZEPPELIN-1984
So
return 1
outside of function is not correct and gets ignored by shell interpreters, also it causesZeppelin to not catch situations when interpreter hasn't started, as shown in ZEPPELIN-1984.
As you can see Zeppelin got exit status of interpreter.sh as 0 when it had to be 1 (error). Zeppelin then starts a loop to try to connect interpreter process, and fails half a minute later with
connection refused
What is this PR for?
Fix for https://issues.apache.org/jira/browse/ZEPPELIN-1984
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1984
How should this be tested?
On example of Spark interpreter, remove keytab file and keep --keytab reference to it in SPARK_SUBMIT_OPTIONS. Try to use Spark interpreter. spark-submit will fail with
Exception in thread "main" org.apache.spark.SparkException: Keytab file: /home/someuser/.kt does not exist
but Zeppelin (around RemoteInterpreterManagedProcess.java ) wouldn't capture this problem (or many other problems starting interpreter process as indicated here )This fix for ZEPPELIN-1984 would allow for error to be captured by RemoteInterpreterManagedProcess.java.
A future improvement could be made, to carry forward exception from interpreter to RemoteInterpreterManagedProcess.java so end user could clearly see what's the problem, not just that the interpreter could not be started.
Questions:
No
No
No