jellyfin / jellyfin-plugin-nextpvr

https://jellyfin.org
MIT License
26 stars 9 forks source link

Stop transcoding #51

Open MrLexisDev opened 4 months ago

MrLexisDev commented 4 months ago

I installed NextPVR plugin for jellyfin but my streams stopped (even when I didn't use nextpvr plugin).

Here is the log exception :

[FTL] [10] Main: Unhandled Exception
System.AggregateException: One or more errors occurred. (Connection refused (localhost:8866))
 ---> System.Net.Http.HttpRequestException: Connection refused (localhost:8866)
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at Jellyfin.Networking.HappyEyeballs.HttpClientExtension.AttemptConnection(AddressFamily addressFamily, SocketsHttpConnectionContext context, CancellationToken cancellationToken)
   at Jellyfin.Networking.HappyEyeballs.HttpClientExtension.OnConnect(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at Jellyfin.Plugin.NextPVR.LiveTvService.InitiateSession(CancellationToken cancellationToken)
   at Jellyfin.Plugin.NextPVR.LiveTvService.EnsureConnectionAsync(CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Jellyfin.Plugin.NextPVR.RecordingsChannel.GetService()
   at Jellyfin.Plugin.NextPVR.RecordingsChannel.OnUpdateTimerCallbackAsync(Object state)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

I disabled the plugin and now everything works.

I just write the problem here for following it :)

emveepee commented 4 months ago

I'm assuming you don't have NextPVR installed on the machine with Jellyfin and so it doesn't make sense to have it enabled. However I have noticed that is an unusally common issue being mentioned on the forum and I do have a PR ready to submit that has quite a few changes and only makes the call shown in the log Jellyfin.Plugin.NextPVR.RecordingsChannel.OnUpdateTimerCallbackAsync after a successful connection, Now that is every 20 seconds so I wouldn't think it should be blocking Jellyfin.

This really should be reported as a general Jellyfin issue, not sure why it is blocking other streams.