Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-456

IllegalStateException when interactive session is still starting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.6.0
    • 0.9.0
    • Server
    • None

    Description

      On the initial request to get a new interactive session, it can sometimes happen that the interactive session is still starting when it trying to be used. In consequence, the server returns a HTTP 500 even tough the session is started and available afterwards.

      This is the top of the stack trace:

      java.lang.IllegalStateException: Session is in state starting
              at org.apache.livy.server.interactive.InteractiveSession.ensureRunning(InteractiveSession.scala:597)
              at org.apache.livy.server.interactive.InteractiveSession.executeStatement(InteractiveSession.scala:510)
              at org.apache.livy.server.interactive.InteractiveSessionServlet$$anonfun$11$$anonfun$apply$6.apply(InteractiveSessionServlet.scala:126)
              at org.apache.livy.server.interactive.InteractiveSessionServlet$$anonfun$11$$anonfun$apply$6.apply(InteractiveSessionServlet.scala:125)
              at org.apache.livy.server.interactive.SessionHeartbeatNotifier$$anonfun$withModifyAccessSession$1.apply(SessionHeartbeat.scala:76)
              at org.apache.livy.server.interactive.SessionHeartbeatNotifier$$anonfun$withModifyAccessSession$1.apply(SessionHeartbeat.scala:74)
              at org.apache.livy.server.SessionServlet.doWithSession(SessionServlet.scala:233)
              at org.apache.livy.server.SessionServlet.withModifyAccessSession(SessionServlet.scala:224)
              at org.apache.livy.server.interactive.InteractiveSessionServlet.org$apache$livy$server$interactive$SessionHeartbeatNotifier$$super$withModifyAccessSession(InteractiveSessionS
      ervlet.scala:40)
              at org.apache.livy.server.interactive.SessionHeartbeatNotifier$class.withModifyAccessSession(SessionHeartbeat.scala:74)
              at org.apache.livy.server.interactive.InteractiveSessionServlet.withModifyAccessSession(InteractiveSessionServlet.scala:40)
              at org.apache.livy.server.interactive.InteractiveSessionServlet$$anonfun$11.apply(InteractiveSessionServlet.scala:125)
              at org.apache.livy.server.interactive.InteractiveSessionServlet$$anonfun$11.apply(InteractiveSessionServlet.scala:124)
              at org.apache.livy.server.JsonServlet.org$apache$livy$server$JsonServlet$$doAction(JsonServlet.scala:113)

       

      I suggest that we make InteractiveSession.ensureRunning more graceful: In case that the session state is 'starting', we could as well wait for a bit and try again...

      Attachments

        Activity

          People

            Unassigned Unassigned
            IngoSchuster Ingo Schuster
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: