Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
willmasse
Frequent Visitor

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 9
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.

As a temporarily shortcut a capacity restart works.

v-cboorla-msft
Microsoft Employee
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.

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.

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 

Hi @willmasse 

 

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.


Thanks

Hi @willmasse 

 

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
If you have any question relating to the current thread, please do let us know and we will try out best to help you.
In case if you have any other question on a different issue, we request you to open a new thread.


Thanks

I have run into this error on many occasions and it can often be solved by limiting the number of notebooks running in parallel. It seems to hit a limit of how many notebooks can run at once. Instead of waiting for compute to be available, it just fails.

 

But I've also had this happen when only running a single notebook...

Anonymous
Not applicable

We've been getting the Livy Session did not enter idle state after 10 minutes Error intermittently. our pipelines tend to run notebooks sequentially, but there can be an overlap once in a while. But.... our notebooks do very little processing. they normally take 3-10s to complete. so how contention is causing this is baffling me. 

Helpful resources

Announcements
FBCApril_Carousel

Fabric Monthly Update - April 2025

Check out the April 2025 Fabric update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.