Rong Kang created ZEPPELIN-5165:
-----------------------------------

             Summary: Passing Parameter Error in zeppelin.cmd on Windows
                 Key: ZEPPELIN-5165
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-5165
             Project: Zeppelin
          Issue Type: Bug
          Components: zeppelin-interpreter
    Affects Versions: 0.9.0
         Environment: *Zeppelin*

zeppelin-0.9.0-preview2-bin-netinst.tgz

 

*Window 7* Enterprise, 64bit

Intel (R) Core (TM) i7-4790K CPU @ 4.00GHZ 

Ram: 8.00 GB.

*Window 10* Pro, 64bit

Processor. Intel (R) Core (TM) i7-4770HQ CPU @ 2.20GHZ 

RAM: 4.00 GB

 

*Browser*:

*Google Chrome* 87.0.4280.88 (x86_64): private mode to block cookies.

*Firefox* 83.0 (64-bit), private mode.
            Reporter: Rong Kang
         Attachments: image-2020-12-18-13-21-44-612.png, 
zeppelin-kangrong-KANGRONG-PC.log

h2. Problem

When launching zeppelin-0.9.0 on Windows and execute any paragraph, it will 
throw exceptions:

!image-2020-12-18-13-21-44-612.png|width=489,height=348!

The error log is:

[^zeppelin-kangrong-KANGRONG-PC.log]

 
h2. Debugging

We found that zeppelin launches the interpreter at 
{code:java}
org.apache.zeppelin.interpreter.util.ProcessLauncher#launch(){code}
and then calling `bin\interpreter.cmd` (Windows) or `bin\interpreter.sh` (unix).

`interpreter.xx` will call 
`org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer` to run an 
interpreter.

However, the input parameters are different between these two scripts:

 
{code:java}
// interpreter.sh provides four paramters:
"${ZEPPELIN_SERVER}" "${CALLBACK_HOST}" "${PORT}" "${INTP_GROUP_ID}" 
"${INTP_PORT}"

// interpreter.cmd only input the first twos:
%ZEPPELIN_SERVER% "%CALLBACK_HOST%" %PORT%{code}
 

 

As a result, `RemoteInterpreterServer` cannot read args[2] as GroupId and throw 
`ArrayIndexOutOfBoundsException`.
{code:java}
// org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer#main
public static void main(String[] args) throws Exception {
   ...
  if (args.length > 0) {
    zeppelinServerHost = args[0];
    port = Integer.parseInt(args[1]);
    interpreterGroupId = args[2];
    ...
  }
   ...
}{code}
h2. Solution

I'd like to submit a PR and fix bugs in `interpreter.cmd`.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to