dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.8k stars 374 forks source link

Fail to use dotnet interactive in Fabric 1.2 runtime #3476

Open RobinLin666 opened 4 months ago

RobinLin666 commented 4 months ago

Describe the bug

Please provide as much information as you can.

When I install dotnet interactive jupyter kernel in spark runtime1.2 and use "jupyter nbconvert --to notebook --execute /tmp/pwsh_test.ipynb" to run ipynb file

I got an error:

[NbConvertApp] Converting notebook /tmp/pwsh_test.ipynb to notebook ==Unhandled exception: System.IO.IOException: Failed to bind to address http://10.0.64.6:2048: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use ---> System.Net.Sockets.SocketException (98): Address already in use at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)

But it's fine in local vm (mariner)

And I checked the port occupied, I didn't even find any process that occupied it.: image

I uploaded my test notebook, and I think you should be able to test it in any environment and reproduce it steadily. Test Powershell kernel.ipynb.zip

Only I found was that when issue repro, The output of ifconfig has more screenshot lines.

image

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

Screenshots

If applicable, add screenshots to help explain your problem.