Ingo Schuster created LIVY-456: ---------------------------------- Summary: IllegalStateException when interactive session is still starting Key: LIVY-456 URL: https://issues.apache.org/jira/browse/LIVY-456 Project: Livy Issue Type: Bug Components: Server Affects Versions: 0.6.0 Reporter: Ingo Schuster
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... -- This message was sent by Atlassian JIRA (v7.6.3#76005)