Stijn van Drongelen created ZEPPELIN-1729:
---------------------------------------------
Summary: In a paragraph with CRLF line endings, Livy interpreter
causes HTTP 500 status
Key: ZEPPELIN-1729
URL: https://issues.apache.org/jira/browse/ZEPPELIN-1729
Project: Zeppelin
Issue Type: Bug
Components: livy-interpreter
Affects Versions: 0.6.0
Reporter: Stijn van Drongelen
This issue is particularily noticeable when a Zeppelin user runs their browser
on a Windows system, where copy-pasting code (e.g. from a Jupyter notebook) may
result in the situation where multi-line paragraphs end up containing CRLF
characters. Executing the paragraph fails with only a cryptic "500 Internal
Server Error" message as the only clue in the notebook.
As it turns out, these HTTP 500 errors were generated by Livy. The logs of the
Livy server reveal that "CTRL-CHAR 13" is being rejected by the JSON parser is
the cause for these errors. When investigating the cause for this,
`org.apache.zeppelin.livy.LivyHelper` turns out to be the culprit. Among the
many other problems this class has, it does not attempt to escape the required
characters in the interpreter input when generating the JSON payload for the
POST request it sends to Livy.
Incidentally, a quick and dirty patch seems to be incorporated in the patch for
ZEPPELIN-1430. However, that patch targets version 0.7.0, while I expect that
this issue affects all of 0.6.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)