Forum Discussion

willmasse's avatar
willmasse
Frequent Visitor
2 years ago

Failed to create Livy session for executing notebook.

Hi,

 

In Microsoft Fabric, we are gettting the following types of error when running notebooks in a pipeline. 

 

"traceback":["Exception: Failed to create Livy session for executing notebook. LivySessionId: xxxxxxxx ","--> InvalidHttpRequestToLivy: [Unauthorized] Access token validation failed. HTTP status code: 401."]},"lastCheckedOn":"2024-01-09T11:44:39.1533333Z","metadata":null,"exitValue":null},"message":"Notebook execution is in Failed state, ....."

 

 

The Access token validation failed is the strange part to me... 

9 Replies

  • v-cboorla-msft's avatar
    v-cboorla-msft
    Microsoft Employee

    Hi willmasse 

     

    Thanks for using Microsoft Fabric Community.

    Apologies for the issue that you are facing here.

    The 401 Unauthorized Error is an HTTP status code error that represented the request sent by the client to the server that lacks valid authentication credentials.

    Methods to rectify the error: The 401 Unauthorized error can be fixed by using any of the following ways: 

    • Check The URL: Due to manual errors in typing the URL, the 401 unauthorized error may occur. Hence, checking the URL and rectifying the mistakes in it will fix the 401 error status.
    • Flush the DNS: Errors in DNS also creates 401 error status sometimes. Therefore, clearing the DNS will also rectify this error. In Windows, the DNS can be flushed by typing ipconfig/flushdns in the command prompt and clicking on ENTER.
    • Clear Browser Cookie: In some situations, the cookies may not work smoothly leading to improper server authentication. Thus, by clearing the cookies, the error can be rectified.
    • Logging out and Logging in again: If you're authenticated via a session (like in a web app), it might have expired. Therefore, logging out and logging in again by providing the credentials may also rectify this error.

    I hope this information helps. Please do let us know if you have any further questions.

    • willmasse's avatar
      willmasse
      Frequent Visitor

      These are Notebooks running in Pipelines. None of those things are applicable. 

       

      I also get these errors as well: SparkCoreError/SessionDidNotEnterIdle: Livy session has failed. Error code: SparkCoreError/SessionDidNotEnterIdle. SessionInfo.State from SparkCore is Error: Session did not enter idle state after 10 minutes. 

       

      I'm getting really frequent errors running Notebooks in Pipelines that all revolve around Livy session.

      • v-cboorla-msft's avatar
        v-cboorla-msft
        Microsoft Employee

        Hi willmasse 

         

        Apologies for the delay in response.

        This seems to be an intermittent issue, can you please try to rerun the pipelines?

        If the issue still persists please do let us know.

         

        Thanks 

  • PeterGoertz's avatar
    PeterGoertz
    Frequent Visitor

    We face a similar problem. Notebook alone needs about 30s to successfully complete. Called in a pipeline it needs over 10 Minutes to return the error mentioned above.

    • PeterGoertz's avatar
      PeterGoertz
      Frequent Visitor

      As a temporarily shortcut a capacity restart works.