Jump to content

Stoping the user session


Go to solution Solved by Happy2Play,

Recommended Posts

Posted (edited)

Hi ,

I searched a lot but couldn't find clear answers, Im asking if there is a way to kill playback session as no way to do this in the dashboard, there is only stop or play and send a message nothing about completely stopping the process for specific user/stream.

Also can I set a time limit for how long the playback can be pasused, for example if playback pasued for more than 5 minutes kill the session.

Plugins suggestions are OK if this is not in Emby core.

 

Edited by fahad92
  • Solution
Happy2Play
Posted

Haven't used it but you could check this plugin.

 

  • Thanks 1
Posted
44 minutes ago, Happy2Play said:

Haven't used it but you could check this plugin.

 

 

Just tried it doesn't do what I need, it's clearly made only to kill/stop 4K transcoding.

 

Posted
1 hour ago, fahad92 said:

Hi ,

I searched a lot but couldn't find clear answers, Im asking if there is a way to kill playback session as no way to do this in the dashboard, there is only stop or play and send a message nothing about completely stopping the process for specific user/stream.

Also can I set a time limit for how long the playback can be pasused, for example if playback pasued for more than 5 minutes kill the session.

Plugins suggestions are OK if this is not in Emby core.

 

Hi, why is the normal stop insufficient?

Posted
3 minutes ago, Luke said:

Hi, why is the normal stop insufficient?

Pasused streams is still using some of the server/network resources and if you have set limited sessions slot it's better to kickout what ever is pasued for so long (Automatically) 

You have no idea. I know some people who let their TV/labtop pasued at something all night l

 

Posted
2 minutes ago, fahad92 said:

Pasused streams is still using some of the server/network resources and if you have set limited sessions slot it's better to kickout what ever is pasued for so long (Automatically) 

You have no idea. I know some people who let their TV/labtop pasued at something all night l

 

But if you press stop, then that means stop, even if it's paused, right?

Posted
Just now, Luke said:

But if you press stop, then that means stop, even if it's paused, right?

If I clicked on stop in the dashboard,  the session is still there in the dashboard as showing in the picture.

It doesn't completely kill the process.

 

Screenshot_20220708-210836_Emby.thumb.jpg.aef3b2189f3d65d18606c6e8018407f6.jpg

Posted
Just now, fahad92 said:

If I clicked on stop in the dashboard,  the session is still there in the dashboard as showing in the picture.

It doesn't completely kill the process.

 

Screenshot_20220708-210836_Emby.thumb.jpg.aef3b2189f3d65d18606c6e8018407f6.jpg

Please attach the emby server log from when you tried to do that. Thanks.

Posted (edited)
14 minutes ago, Luke said:

Please attach the emby server log from when you tried to do that. Thanks.

Just tried it with 3 sessions worked on one and failed with the other two

I didn't realize that the stop option is actually killing the stream until now but seems it's not always working as in these cases

the log is attached.

embyserver.txt

Edited by fahad92
Posted

OK we'll take a look at it. Thanks.

  • Like 1
Posted
2 hours ago, Happy2Play said:

Haven't used it but you could check this plugin.

 

@LukeThe plugin is working now, automatically killing whatever is paused for more than 5min or whatever limit you want

Marking this as solved but it would be appreciated to have this option in Emby itself, automatically killing paused streams after XX minutes.

Posted

One thing that would help is enabling debug logging temporarily, then try it again, then provide the debug log. We might learn more from that.

Posted
3 minutes ago, Luke said:

One thing that would help is enabling debug logging temporarily, then try it again, then provide the debug log. We might learn more from that.

No need to waste your time on this as I couldn't replicate the issue after doing a restart and the plugin is doing what I need at the moment but only a suggestion to make this option in Emby instead of a plugin as it's may break in the futures with emby updates.

Thank you,  you and the team are always great in your support.

Posted

OK well the reason the stop button didn't work is most likely because the server lost the ability to communicate with the app.

  • 1 year later...
Fender1978
Posted

@LukeHi, I'm so sorry to revive an old thread but this is the exact issue I'm having in 2024 with the latest Emby Server for Windows (v4.8.8.0).

I can't stop/remove streams that have lost connection and would like to be able to remove the old stream from the server instead of it hanging there as the stop button doesn't work with a disconnected device.

 

Any advice appreciated.

 

Images attached of when I hit the stop button.

Screenshot_20240612_204931_Emby.jpg

Screenshot_20240612_204940_Emby.jpg

Posted
44 minutes ago, Fender1978 said:

@LukeHi, I'm so sorry to revive an old thread but this is the exact issue I'm having in 2024 with the latest Emby Server for Windows (v4.8.8.0).

I can't stop/remove streams that have lost connection and would like to be able to remove the old stream from the server instead of it hanging there as the stop button doesn't work with a disconnected device.

 

Any advice appreciated.

 

Images attached of when I hit the stop button.

Screenshot_20240612_204931_Emby.jpg

Screenshot_20240612_204940_Emby.jpg

Hi, generally Roku cannot be remote controlled over a remote connection.

If the user has stopped playing then the server will automatically remove the connection. There is nothing you need to do. Have they stopped playing?

Fender1978
Posted (edited)
11 minutes ago, Luke said:

Hi, generally Roku cannot be remote controlled over a remote connection.

If the user has stopped playing then the server will automatically remove the connection. There is nothing you need to do. Have they stopped playing?

Gotcha. It appears that they have reached the end of the show (you can see the stream and transcode bars) but the steam just sits there in limbo and I'm unable to remove it. It's been on my dashboard for hours doing nothing.

Edited by Fender1978
Posted
Just now, Fender1978 said:

Gotcha. It appears that they have reached the end of the show (you can see the stream and transcode bars) but the steam just sits there in limbo and I'm unable to remove it.

Let's look at an example:

Thanks.

Happy2Play
Posted

Appear to be correct in the log

	Line 303014: 2024-06-13 17:45:26.253 Info SessionManager: Playback start reported by app Roku SG 4.1.22 on Roku Streaming Stick+ playing Heartland - S2, Ep13 - Seismic Shifts. Started at 0 ms. PlaySessionId: 642011d8bcd1422db7d874d277113ed4

	Line 306645: 2024-06-13 18:13:55.733 Info SessionManager: Playback stopped reported by app Roku SG 4.1.22 on Roku Streaming Stick+ playing Heartland - S2, Ep13 - Seismic Shifts. Stopped at 1727000 ms. PlaySessionId: 642011d8bcd1422db7d874d277113ed4
	Line 306646: 2024-06-13 18:13:55.733 Info SessionManager: Removing playSession 642011d8bcd1422db7d874d277113ed4 from session 2d2aebf0f3bedad0710ae7323f55fa87
	Line 306648: 2024-06-13 18:13:55.734 Debug EncodingManager: ReportPlaybackStopped PlaySessionId: 642011d8bcd1422db7d874d277113ed4
	Line 306649: 2024-06-13 18:13:55.734 Debug EncodingManager: KillTranscodingJob - JobId 01e77119-638d-48b5-82e9-4993c13d4b17 PlaySessionId 642011d8bcd1422db7d874d277113ed4. Killing transcoding

So is the issue just stuck on Dashboard?

Happy2Play
Posted (edited)

Actually, I guess it issue was before that transcode log and in session 2d2aebf0f3bedad0710ae7323f55fa87.

2024-06-13 07:28:52.262 Info Server: http/1.1 POST http://192.168.1.12:8096/emby/Sessions/2d2aebf0f3bedad0710ae7323f55fa87/Playing/Stop?X-Emby-Client=Emby for Android&X-Emby-Device-Name=SM-S908B&X-Emby-Device-Id=03021881f75a702d&X-Emby-Client-Version=3.3.95&X-Emby-Token=x_secret3_x&X-Emby-Language=en-gb. UserAgent: Mozilla/5.0 (Linux; Android 14; SM-S908B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36
2024-06-13 07:28:52.263 Info HttpClient: POST http://WANADDRESS:8060/input?Command=Stop
2024-06-13 07:29:06.789 Error HttpClient: Connection to http://WANADDRESS:8060/input?Command=Stop timed out
2024-06-13 07:29:06.790 Error Server: Error processing request
	*** Error Report ***
	Version: 4.8.8.0
	Command line: C:\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.20348
	Framework: .NET 6.0.30
	OS/Process: x64/x64
	Runtime: C:/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Emby-Server\programdata
	Application path: C:\Emby-Server\system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Connection to http://WANADDRESS:8060/input?Command=Stop timed out
	 ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing.
	 ---> System.TimeoutException: A task was canceled.
	 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
	   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, 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 System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
	   --- End of inner exception stack trace ---
	   --- End of inner exception stack trace ---
	   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
	   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   --- End of inner exception stack trace ---
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.Session.RokuSessionController.SendRequest(HttpRequestOptions options)
	   at Emby.Server.Implementations.Session.RokuSessionController.SendMessage[T](ReadOnlyMemory`1 name, String messageId, T data, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Session.SessionManager.SendMessageToSession[T](SessionInfo session, Boolean requireUserInterface, ReadOnlyMemory`1 name, T data, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	InnerException: System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing.
	Source: System.Net.Http
	TargetSite: Void HandleFailure(System.Exception, Boolean, System.Net.Http.HttpResponseMessage, System.Threading.CancellationTokenSource, System.Threading.CancellationToken, System.Threading.CancellationTokenSource)
	   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
	   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	InnerException: System.TimeoutException: A task was canceled.
	Source: 
	TargetSite: 
	InnerException: System.Threading.Tasks.TaskCanceledException: A task was canceled.
	Source: System.Private.CoreLib
	TargetSite: Void ThrowForNonSuccess(System.Threading.Tasks.Task)
	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
	   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
	   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, 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 System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
	
2024-06-13 07:29:06.791 Info Server: http/1.1 Response 500 to host4. Time: 20002ms. POST http://192.168.1.12:8096/emby/Sessions/2d2aebf0f3bedad0710ae7323f55fa87/Playing/Stop?X-Emby-Client=Emby for Android&X-Emby-Device-Name=SM-S908B&X-Emby-Device-Id=03021881f75a702d&X-Emby-Client-Version=3.3.95&X-Emby-Token=x_secret3_x&X-Emby-Language=en-gb

 

Edited by Happy2Play
removed address
Fender1978
Posted

@Happy2PlayI honestly don't understand the logs very well but yes, the finished stream is just stuck on the dashboard.

The Activity section says that the person has finished playing an item but the item just sits there on the dashboard with play progress marker at the end. I've only ever seen it happen before on transcoded items as this one is also.

Fender1978
Posted
37 minutes ago, Luke said:

Are they from when the problem was experienced?

I believe they are inclusive of. I don't understand much of their content but they are the latest.

Posted

Ok we’ll take a look at it. Thanks.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...