XMLWordPrintable

    Details

    • Similar Issues:

      Description

      While I was setting up a user example on connecting a remote IPython server,  I am stuck on this.

      Docker file

      FROM ubuntu
      RUN apt-get update
      RUN apt-get install python3 -y
      RUN apt install python3-pip -y
      RUN apt install net-tools
      RUN apt-get update && \
          DEBIAN_FRONTEND=noninteractive \
          apt-get -y install default-jre-headless && \
          apt-get clean && \
          rm -rf /var/lib/apt/lists/*
      
      # Fix certificate issues
      RUN apt-get update && \
          apt-get install ca-certificates-java && \
          apt-get clean && \
          update-ca-certificates -f;
      
      RUN export JAVA_HOME
      RUN pip3 install --no-cache-dir ipython
      RUN pip3 install --no-cache-dir jupyter-client
      RUN pip3 install --no-cache-dir protobuf
      RUN pip3 install --no-cache-dir grpcio
      
      # Setup JAVA_HOME -- useful for docker commandline
      ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
      

      As I attached the screenshots below, I set up my docker and Jenkins and try to run python code. It has got threw these exception.

      SEVERE: Exception while executing runnable io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable@29fad4f4
      java.lang.NullPointerException
              at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:434)
              at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
              at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
              at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
              at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:678)
              at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
              at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
              at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
              at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403)
              at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
              at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
              at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
              at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
              at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:531)
              at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
              at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      
      org.apache.zeppelin.interpreter.InterpreterException: org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:76)
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:107)
              at io.jenkins.plugins.ml.IPythonKernelInterpreter.interpretCode(IPythonKernelInterpreter.java:77)
              at io.jenkins.plugins.ml.IPythonInterpreterManager.invokeInterpreter(IPythonInterpreterManager.java:90)
              at io.jenkins.plugins.ml.IPythonBuilder.perform(IPythonBuilder.java:98)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
              at hudson.model.Build$BuildExecution.build(Build.java:206)
              at hudson.model.Build$BuildExecution.doRun(Build.java:163)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
              at hudson.model.Run.execute(Run.java:1816)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429)
      Caused by: org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.python.IPythonInterpreter.open(IPythonInterpreter.java:117)
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
              ... 13 more
      Caused by: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.python.IPythonInterpreter.initPythonInterpreter(IPythonInterpreter.java:136)
              at org.apache.zeppelin.python.IPythonInterpreter.open(IPythonInterpreter.java:114)
              ... 14 more
      org.apache.zeppelin.interpreter.InterpreterException: org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:76)
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:107)
              at io.jenkins.plugins.ml.IPythonKernelInterpreter.interpretCode(IPythonKernelInterpreter.java:77)
              at io.jenkins.plugins.ml.IPythonInterpreterManager.invokeInterpreter(IPythonInterpreterManager.java:90)
              at io.jenkins.plugins.ml.IPythonBuilder.perform(IPythonBuilder.java:98)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
              at hudson.model.Build$BuildExecution.build(Build.java:206)
              at hudson.model.Build$BuildExecution.doRun(Build.java:163)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
              at hudson.model.Run.execute(Run.java:1816)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429)
      Caused by: org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.python.IPythonInterpreter.open(IPythonInterpreter.java:117)
              at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
              ... 13 more
      Caused by: java.io.IOException: Fail to setup JVMGateway
      
              at org.apache.zeppelin.python.IPythonInterpreter.initPythonInterpreter(IPythonInterpreter.java:136)
              at org.apache.zeppelin.python.IPythonInterpreter.open(IPythonInterpreter.java:114)
              ... 14 more
      
      
        • Jenkins is running in my localhost:8080

      Question :

      It is working for the localhost( 127.0.0.1 ). Am I missing anything to connect to the docker container from Jenkins? (I could ping the docker container's IP successfully)

      Any help would be great. Thanks in advance

        Attachments

          Issue Links

            Activity

            loghijiaha Loghi Perinpanayagam created issue -
            loghijiaha Loghi Perinpanayagam made changes -
            Field Original Value New Value
            Epic Link JENKINS-62517 [ 206530 ]
            loghijiaha Loghi Perinpanayagam made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            loghijiaha Loghi Perinpanayagam added a comment -

            Bruno P. Kinoshita When I try to change our docker file to support python3, pip is not working.

            FROM jenkins/agent
            
            USER root
            RUN apt update && apt install  python3 -y \
                python-pip \
                && rm -rf /var/lib/apt/lists/*
               
            COPY requirements.txt /requirements.txt
            
            RUN pip install --no-cache-dir -r /requirements.txt 
            
            RUN  ln -sf /usr/bin/python3 /usr/bin/python
            
            USER jenkins
            

            requirements.txt

            jupyter
            protobuf
            grpcio

            Zeppelin use `pip freeze` to check the pre-required packages.

            ProcessBuilder processBuilder = new ProcessBuilder(new String[]{pythonExec, "-m", "pip", "freeze"});
            

            Default value for `pythonExec` is "python". We should create a symbolic link to python3 because agent image has bundled with python 2. The above line is failing when I run this as an agent. What should I do?

            Show
            loghijiaha Loghi Perinpanayagam added a comment - Bruno P. Kinoshita When I try to change our docker file to support python3, pip is not working. FROM jenkins/agent USER root RUN apt update && apt install python3 -y \ python-pip \ && rm -rf / var /lib/apt/lists/* COPY requirements.txt /requirements.txt RUN pip install --no-cache-dir -r /requirements.txt RUN ln -sf /usr/bin/python3 /usr/bin/python USER jenkins requirements.txt jupyter protobuf grpcio Zeppelin use `pip freeze` to check the pre-required packages. ProcessBuilder processBuilder = new ProcessBuilder( new String []{pythonExec, "-m" , "pip" , "freeze" }); Default value for `pythonExec` is "python". We should create a symbolic link to python3 because agent image has bundled with python 2. The above line is failing when I run this as an agent. What should I do?
            Hide
            loghijiaha Loghi Perinpanayagam added a comment -

            worked with just one extra line :

            ln -sf /usr/bin/pip3 /usr/bin/pip
            
            Show
            loghijiaha Loghi Perinpanayagam added a comment - worked with just one extra line : ln -sf /usr/bin/pip3 /usr/bin/pip
            loghijiaha Loghi Perinpanayagam made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            loghijiaha Loghi Perinpanayagam made changes -
            Remote Link This issue links to "PR for doc update (Web Link)" [ 25328 ]
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Followed the instructions and I think I have reproduced the exception Loghi Perinpanayagam.

            Started by user unknown or anonymous
            Building remotely on Agent Python (python) in workspace /tmp/python/workspace/folder/e2e-1
            Executed server : test
            
            Code Parser type : file
            Executed code output : 
            java.lang.NullPointerException
            	at io.jenkins.plugins.ml.IPythonBuilder$1.call(IPythonBuilder.java:101)
            	at io.jenkins.plugins.ml.IPythonBuilder$1.call(IPythonBuilder.java:84)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
            	at hudson.remoting.Request$2.run(Request.java:369)
            	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
            	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            	at java.lang.Thread.run(Thread.java:748)
            	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Agent Python
            		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
            		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
            		at hudson.remoting.Channel.call(Channel.java:957)
            		at io.jenkins.plugins.ml.IPythonBuilder.perform(IPythonBuilder.java:84)
            		at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
            		at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            		at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
            		at hudson.model.Build$BuildExecution.build(Build.java:206)
            		at hudson.model.Build$BuildExecution.doRun(Build.java:163)
            		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
            		at hudson.model.Run.execute(Run.java:1816)
            		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            		at hudson.model.ResourceController.execute(ResourceController.java:97)
            		at hudson.model.Executor.run(Executor.java:429)
            ERROR: null
            Finished: FAILURE
            
            

            Will try to debug to understand what's going on.

            Show
            kinow Bruno P. Kinoshita added a comment - Followed the instructions and I think I have reproduced the exception Loghi Perinpanayagam . Started by user unknown or anonymous Building remotely on Agent Python (python) in workspace /tmp/python/workspace/folder/e2e-1 Executed server : test Code Parser type : file Executed code output : java.lang.NullPointerException at io.jenkins.plugins.ml.IPythonBuilder$1.call(IPythonBuilder.java:101) at io.jenkins.plugins.ml.IPythonBuilder$1.call(IPythonBuilder.java:84) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Agent Python at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357) at hudson.remoting.Channel.call(Channel.java:957) at io.jenkins.plugins.ml.IPythonBuilder.perform(IPythonBuilder.java:84) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1816) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) ERROR: null Finished: FAILURE Will try to debug to understand what's going on.
            Hide
            loghijiaha Loghi Perinpanayagam added a comment -

            Bruno P. Kinoshita Did you give the file name as train_model.ipynb. I will create an issue to validate whether the given file exists or not.

            Show
            loghijiaha Loghi Perinpanayagam added a comment - Bruno P. Kinoshita Did you give the file name as train_model.ipynb. I will create an issue to validate whether the given file exists or not.
            Hide
            kinow Bruno P. Kinoshita added a comment -

            I don't think I used this file name Loghi Perinpanayagam. I saw the other issue, will continue testing and review new issues/Pr's soon. Thanks!

            Show
            kinow Bruno P. Kinoshita added a comment - I don't think I used this file name Loghi Perinpanayagam . I saw the other issue, will continue testing and review new issues/Pr's soon. Thanks!
            loghijiaha Loghi Perinpanayagam made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            Hide
            loghijiaha Loghi Perinpanayagam added a comment -
            Show
            loghijiaha Loghi Perinpanayagam added a comment - Refer to the link for more information. https://github.com/jenkinsci/machine-learning-plugin/blob/master/CHANGELOG.md
            loghijiaha Loghi Perinpanayagam made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              loghijiaha Loghi Perinpanayagam
              Reporter:
              loghijiaha Loghi Perinpanayagam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: