Chiefmas 40 Posted December 9, 2022 Posted December 9, 2022 Apologies, this is probably a topic that comes up sometimes, I thought I saw a thread about it once but I can't find it now. I've been seeing these from Mac and IOS Chrome(it could just be this user, I'm not sure it's Chrome specifically that's the issue) recently: that session will continually drop "Finished playing" entries. I can't force stop it since there's no buttons- is there any way short of restarting the server I can make that stop? Thanks!
Luke 42078 Posted December 14, 2022 Posted December 14, 2022 Hi there, can you please attach the emby server log from when this happened? thanks.
Chiefmas 40 Posted January 4, 2023 Author Posted January 4, 2023 Sure, I've got one of those dangling connections now, it's Chrome but on Android from what Now Playing is showing. I don't know exactly when it started though. One thing I noticed, it briefly disappeared just now as I was looking at it, and then after a second, it popped back up. Anyway, attaching my current server log, hopefully something about it will be in there. Thanks! embyserver_20230104.zip
Chiefmas 40 Posted March 17, 2023 Author Posted March 17, 2023 13 minutes ago, Luke said: @Chiefmas are you still seeing this? I am, but much less frequently than before. I believe the last one I saw was a Roku client a couple weeks ago.
Chiefmas 40 Posted March 27, 2023 Author Posted March 27, 2023 On 3/26/2023 at 12:12 AM, Luke said: Have you updated to Emby Server 4.7.11? It's showing that version. I let my Emby autoupdate, generally it's usually up to date. 1
Chiefmas 40 Posted July 3, 2024 Author Posted July 3, 2024 (edited) So, this still happens to me. Server version is 4.8.8.0. It's actually happened from a Roku in my house. The TV the Roku is connected to is turned off, so the Roku itself is basically off, but I still show a session from it on my server. Further, if i tell Emby to stop the session, it gets a connection denied, since the Roku is off. If I start a new stream from that Roku, the dashboard and active user sessions both kind of wig out on the session, wildly flipping between the thing actually playing, and the thing that is stuck. The only way I've found to remove these dangling sessions is to restart Emby. Attaching a log that includes when I think the current dangling session started. I checked the most current log(it looks like it cycled today) and there's no mention of the session there. The Item being played in the stuck session is House of the Dragon, "We Light The Way". It's got several start/stop entries in there, and it's still showing in my Dashboard now, it shows it's at the end of the video and just sitting there. edit: I went and powered the Roku back up, and started the Emby client, and if I try to stop the session with the stop button now, I get: "Cancelling connection to http://10.117.1.171:8060/input?Command=Stop due to a previous timeout." Which I realize means this isn't quite the same, as I have the remote control buttons showing in this case, unlike the original. But they don't help either. The dangling session remains. embyserver-63855302401.zip Edited July 3, 2024 by Chiefmas added a little more info
Luke 42078 Posted July 5, 2024 Posted July 5, 2024 On 7/2/2024 at 10:43 PM, Chiefmas said: So, this still happens to me. Server version is 4.8.8.0. It's actually happened from a Roku in my house. The TV the Roku is connected to is turned off, so the Roku itself is basically off, but I still show a session from it on my server. Further, if i tell Emby to stop the session, it gets a connection denied, since the Roku is off. If I start a new stream from that Roku, the dashboard and active user sessions both kind of wig out on the session, wildly flipping between the thing actually playing, and the thing that is stuck. The only way I've found to remove these dangling sessions is to restart Emby. Attaching a log that includes when I think the current dangling session started. I checked the most current log(it looks like it cycled today) and there's no mention of the session there. The Item being played in the stuck session is House of the Dragon, "We Light The Way". It's got several start/stop entries in there, and it's still showing in my Dashboard now, it shows it's at the end of the video and just sitting there. edit: I went and powered the Roku back up, and started the Emby client, and if I try to stop the session with the stop button now, I get: "Cancelling connection to http://10.117.1.171:8060/input?Command=Stop due to a previous timeout." Which I realize means this isn't quite the same, as I have the remote control buttons showing in this case, unlike the original. But they don't help either. The dangling session remains. embyserver-63855302401.zip 732.48 kB · 0 downloads @ChiefmasI don't see this in your provided log file: Quote "Cancelling connection to http://10.117.1.171:8060/input?Command=Stop due to a previous timeout." Are you sure this is the right one? Can you please provide an alternate example? Thanks.
Chiefmas 40 Posted July 26, 2024 Author Posted July 26, 2024 On 7/5/2024 at 5:53 PM, Luke said: @ChiefmasI don't see this in your provided log file: Are you sure this is the right one? Can you please provide an alternate example? Thanks. I was pretty sure it was, but I'll find another occurrence. It's been happening quite a lot recently. The new thing I'm seeing is the "flipping" behavior in the now-playing, where if a client comes back and starts playing something else, Emby flips between the disconnected session and the actual live session. I've seen it mentioned on Reddit so I know I'm not alone in seeing that one. Once I find one, I'll post an updated log.
Chiefmas 40 Posted July 26, 2024 Author Posted July 26, 2024 Attaching another log. So I have a user in this that's had a zombie session for...a while now. The zombie session says it is playing Time Bandits S1:E1. That same client a little earlier was also playing Ghosts S3E10, causing the flipping thing to happen. It's completed Ghosts, and now it's just the zombie session on that client. However, that same user does have another active session from an Edge browser, from the same IP, active as of the time I copied the log. That session is playing Throw Momma From the Train This isn't one of my local clients so I can't perform the same cancellation test I did earlier though. embyserver.zip
Chiefmas 40 Posted August 3, 2024 Author Posted August 3, 2024 I'll probably restart it today, to get rid of it, but I thought I'd leave the zombie session I reported in my last post to see if it would go away on its own. It's been almost a week now, and it's still there, so I don't think it is actually going to go away on its own. I've seen the user of the device hop on several times since then and got the session flipping thing though. I had thought maybe having another session from the same device might cause the zombie session to get cleaned up, but that hasn't happened.
Happy2Play 9780 Posted August 3, 2024 Posted August 3, 2024 Currently abandoned/zombie sessions can only be removed by restarting Emby. Not positive but should/might be able to remove via the api, will have to test if I can make one happen.
blackcatTN 3 Posted February 23, 2025 Posted February 23, 2025 (edited) I use this on the linux version. sudo iptables -A INPUT -s x.x.x.x -j DROP ; sleep 9m ; sudo iptables -D INPUT -s x.x.x.x -j DROP That usually makes dead sessions go away. Not sure what the compat. windows firewall command would be for that. Grok says maybe powershell. 1. Using PowerShell (Recommended Modern Approach) PowerShell’s NetSecurity module is the preferred way to manage firewall rules on Windows 10, 11, or Server editions (2012 and later). To block incoming traffic from x.x.x.x, you’d use the New-NetFirewallRule cmdlet: powershell New-NetFirewallRule -DisplayName "Block IP x.x.x.x" -Direction Inbound -Action Block -RemoteAddress x.x.x.x Not able to test as I am running the linux version. Edited February 23, 2025 by blackcatTN
Chiefmas 40 Posted February 25, 2025 Author Posted February 25, 2025 @blackcatTN That's interesting...that suggests it's a dangling TCP connection. It never occurred to me to go look and see if there's a TCP connection hanging around associated to it. I always just assumed it was something internal in Emby not cleaning up correctly. I'll have to give that a try next time it happens.
Chiefmas 40 Posted June 26, 2025 Author Posted June 26, 2025 On 8/3/2024 at 2:42 PM, Happy2Play said: Currently abandoned/zombie sessions can only be removed by restarting Emby. Not positive but should/might be able to remove via the api, will have to test if I can make one happen. So, an interesting thing I noticed today. I accidentally created a zombie session, and while I was trying to figure out if there was a way I could try and force the session to get killed off without having to restart the server. What I saw was that the zombie session was reporting that it was from my reverse proxy IP. I think this happens when I'm hitting my server via NAT hairpin, it's like the XFF doesn't get sent to Emby for some reason(I'm assuming that's what Emby is using to get client IPs)...anyway... What this has made me wonder if the issue here is where a client does something that causes the reverse proxy not to drop the connection to the backend(Emby) but has gotten disconnected from the client. The proxy holding the connection open convinces emby that the client is still there, even though it may not have gotten a response from the client recently. I don't have the monitoring tools installed at the moment to dig that deep into my proxy server activity to see what the open/active connections are, but I'm going to look into it to see how to look deeper into my proxy activity. Maybe I'll be able to establish that's the source...it would explain why it doesn't seem to be any particular client that has the issue. It might be interesting to see if other people that run into dangling connections also have a reverse proxy sitting in the middle as well. I don't think something like a simple port forward is likely to cause a similar situation, but I can envision a reverse proxy possibly doing so. 1
Luke 42078 Posted June 27, 2025 Posted June 27, 2025 On 6/25/2025 at 8:26 PM, Chiefmas said: So, an interesting thing I noticed today. I accidentally created a zombie session, and while I was trying to figure out if there was a way I could try and force the session to get killed off without having to restart the server. What I saw was that the zombie session was reporting that it was from my reverse proxy IP. I think this happens when I'm hitting my server via NAT hairpin, it's like the XFF doesn't get sent to Emby for some reason(I'm assuming that's what Emby is using to get client IPs)...anyway... What this has made me wonder if the issue here is where a client does something that causes the reverse proxy not to drop the connection to the backend(Emby) but has gotten disconnected from the client. The proxy holding the connection open convinces emby that the client is still there, even though it may not have gotten a response from the client recently. I don't have the monitoring tools installed at the moment to dig that deep into my proxy server activity to see what the open/active connections are, but I'm going to look into it to see how to look deeper into my proxy activity. Maybe I'll be able to establish that's the source...it would explain why it doesn't seem to be any particular client that has the issue. It might be interesting to see if other people that run into dangling connections also have a reverse proxy sitting in the middle as well. I don't think something like a simple port forward is likely to cause a similar situation, but I can envision a reverse proxy possibly doing so. I'm not sure this will matter because from Emby Server's perspective it is not about tcp connections but rather open http requests. Can you please attach a new log example though from the latest server version? Thanks.
Chiefmas 40 Posted June 27, 2025 Author Posted June 27, 2025 2 hours ago, Luke said: I'm not sure this will matter because from Emby Server's perspective it is not about tcp connections but rather open http requests. Can you please attach a new log example though from the latest server version? Thanks. This should cover the instance I was describing above. Minor possible complication, as I had a resume option, I thought it was picking up the disconnected session. What of course actually happened, was I ended up with the disconnected session and another session playing the same movie. The second session I did make sure I ended properly before closing the page though, but there will probably be a few points where there are 2 sessions on the same movie. The movie this happened on was GI Joe Rise of Cobra. EmbyServerLogs.zip
Luke 42078 Posted June 28, 2025 Posted June 28, 2025 19 hours ago, Chiefmas said: This should cover the instance I was describing above. Minor possible complication, as I had a resume option, I thought it was picking up the disconnected session. What of course actually happened, was I ended up with the disconnected session and another session playing the same movie. The second session I did make sure I ended properly before closing the page though, but there will probably be a few points where there are 2 sessions on the same movie. The movie this happened on was GI Joe Rise of Cobra. EmbyServerLogs.zip 255.31 kB · 0 downloads From what device?
Chiefmas 40 Posted June 28, 2025 Author Posted June 28, 2025 20 hours ago, Luke said: From what device? You know, I didn't look in the logs too closely, is there more than one device playing that movie back? It should be on a LibreWolf web client(not sure if that IDs as Firefox). If that doesn't narrow it down enough, I might have to dig in the logs to narrow it down.... At least the last 2-3 efforts to play it back might be from the same device, but it won't be the same session obviously. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now