Uploaded image for project: 'TOREE'
  1. TOREE
  2. TOREE-489

Apache Toree kernel throw error when executing code in jupyter lab

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • Not Applicable
    • 0.3.0
    • Kernel
    • None
    • OS: Ubuntu 18:10

      Jupyter lab = 0.35.0
      Python = 3.7.0
      Jupyter notebook = 5.7.0
      Spark = 2.3.2
      Java = 1.8.0_181
      Scala = 2.11.8

    Description

       When I try to execute any code (Ex: "5+5") in the Apache Toree Kernel inside jupyter lab, no output is visible in the notebook and the jupyter lab log contains the following message: 

      2018-10-08 21:26:50 ERROR OneForOneStrategy:159 - JsResultException(errors:List((/deletedCells,List(ValidationError(error.expected.jsstring,WrappedArray())))))
      play.api.libs.json.JsResultException: JsResultException(errors:List((/deletedCells,List(ValidationError(error.expected.jsstring,WrappedArray())))))
      at play.api.libs.json.JsValue$$anonfun$2.apply(JsValue.scala:67)
      at play.api.libs.json.JsValue$$anonfun$2.apply(JsValue.scala:67)
      at play.api.libs.json.JsResult$class.fold(JsResult.scala:77)
      at play.api.libs.json.JsError.fold(JsResult.scala:13)
      at play.api.libs.json.JsValue$class.as(JsValue.scala:65)
      at play.api.libs.json.JsObject.as(JsValue.scala:166)
      at org.apache.toree.kernel.protocol.v5.kernel.Utilities$.ZMQMessageToKernelMessage(Utilities.scala:69)
      at org.apache.toree.kernel.protocol.v5.kernel.socket.ZeromqKernelMessageSocket$$anonfun$receive$1.applyOrElse(ZeromqKernelMessageSocket.scala:48)
      at akka.actor.Actor$class.aroundReceive(Actor.scala:502)
      at org.apache.toree.kernel.protocol.v5.kernel.socket.ZeromqKernelMessageSocket.aroundReceive(ZeromqKernelMessageSocket.scala:39)
      at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
      at akka.actor.ActorCell.invoke(ActorCell.scala:495)
      at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
      at akka.dispatch.Mailbox.run(Mailbox.scala:224)
      at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      2018-10-08 21:26:50 ERROR ZeroMQSocketRunnable:167 - Unexpected exception in 0mq socket runnable!
      org.zeromq.ZMQException: Errno 48 : Address already in use
      at org.zeromq.ZMQ$Socket.mayRaise(ZMQ.java:1425)
      at org.zeromq.ZMQ$Socket.bind(ZMQ.java:1187)
      at org.zeromq.ZMQ$Socket.bind(ZMQ.java:1148)
      at org.apache.toree.communication.socket.ZeroMQSocketRunnable$$anonfun$processOptions$2.apply(ZeroMQSocketRunnable.scala:88)
      at org.apache.toree.communication.socket.ZeroMQSocketRunnable$$anonfun$processOptions$2.apply(ZeroMQSocketRunnable.scala:87)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
      at org.apache.toree.communication.socket.ZeroMQSocketRunnable.processOptions(ZeroMQSocketRunnable.scala:87)
      at org.apache.toree.communication.socket.ZeroMQSocketRunnable.run(ZeroMQSocketRunnable.scala:144)
      at java.lang.Thread.run(Thread.java:748)
      2018-10-08 21:26:50 ERROR LocalActorRefProvider(akka://spark-kernel-actor-system):159 - guardian failed, shutting down system
      java.lang.AssertionError: assertion failed: Socket is not alive to be able to send messages!
      at scala.Predef$.assert(Predef.scala:170)
      at org.apache.toree.communication.socket.JeroMQSocket.send(JeroMQSocket.scala:39)
      at org.apache.toree.communication.actors.RouterSocketActor$$anonfun$receive$1.applyOrElse(RouterSocketActor.scala:47)
      at akka.actor.Actor$class.aroundReceive(Actor.scala:502)
      at org.apache.toree.communication.actors.RouterSocketActor.aroundReceive(RouterSocketActor.scala:31)
      at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
      at akka.actor.ActorCell.invoke(ActorCell.scala:495)
      at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
      at akka.dispatch.Mailbox.run(Mailbox.scala:224)
      at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      2018-10-08 21:26:50 ERROR OneForOneStrategy:159 - assertion failed: Socket is not alive to be able to send messages!
      java.lang.AssertionError: assertion failed: Socket is not alive to be able to send messages!
      at scala.Predef$.assert(Predef.scala:170)
      at org.apache.toree.communication.socket.JeroMQSocket.send(JeroMQSocket.scala:39)
      at org.apache.toree.communication.actors.RouterSocketActor$$anonfun$receive$1.applyOrElse(RouterSocketActor.scala:47)
      at akka.actor.Actor$class.aroundReceive(Actor.scala:502)
      at org.apache.toree.communication.actors.RouterSocketActor.aroundReceive(RouterSocketActor.scala:31)
      at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
      at akka.actor.ActorCell.invoke(ActorCell.scala:495)
      at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
      at akka.dispatch.Mailbox.run(Mailbox.scala:224)
      at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      2018-10-08 21:26:50 ERROR RouterSocketActor:159 - assertion failed: Runnable is not processing or is closed!
      java.lang.AssertionError: assertion failed: Runnable is not processing or is closed!
      at scala.Predef$.assert(Predef.scala:170)
      at org.apache.toree.communication.socket.ZeroMQSocketRunnable.close(ZeroMQSocketRunnable.scala:186)
      at org.apache.toree.communication.socket.JeroMQSocket.close(JeroMQSocket.scala:52)
      at org.apache.toree.communication.SocketManager.closeSocket(SocketManager.scala:61)
      at org.apache.toree.communication.actors.RouterSocketActor.postStop(RouterSocketActor.scala:41)
      at akka.actor.Actor$class.aroundPostStop(Actor.scala:515)
      at org.apache.toree.communication.actors.RouterSocketActor.aroundPostStop(RouterSocketActor.scala:31)
      at akka.actor.dungeon.FaultHandling$class.akka$actor$dungeon$FaultHandling$$finishTerminate(FaultHandling.scala:210)
      at akka.actor.dungeon.FaultHandling$class.terminate(FaultHandling.scala:172)
      at akka.actor.ActorCell.terminate(ActorCell.scala:374)
      at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:467)
      at akka.actor.ActorCell.systemInvoke(ActorCell.scala:483)
      at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
      at akka.dispatch.Mailbox.run(Mailbox.scala:223)
      at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      
      

       

      Note the following additional points:

      • spark-shell works fine;
      • Apache Toree in the notebook works fine.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Kidtoy Felipe Kenji Yoshida
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: