DLNA ceases to work after a period of time #450

Closed
opened 2025-12-21 16:44:51 +01:00 by backuprepo · 18 comments
Owner

Originally created by @theg00s3 on GitHub (Feb 21, 2019).

The issue is that after a (currently) unknown period of time, Jellyfin's DLNA server stops appearing on any devices. This can be temporarily solved by restarting Jellyfin before wanting to watch something, but obviously that is not a sustainable approach. The most recent log file is below.
jellyfin_014.log

Originally created by @theg00s3 on GitHub (Feb 21, 2019). The issue is that after a (currently) unknown period of time, Jellyfin's DLNA server stops appearing on any devices. This can be temporarily solved by restarting Jellyfin before wanting to watch something, but obviously that is not a sustainable approach. The most recent log file is below. [jellyfin_014.log](https://github.com/jellyfin/jellyfin/files/2889386/jellyfin_014.log)
backuprepo 2025-12-21 16:44:51 +01:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@LeoVerto commented on GitHub (Feb 21, 2019):

Thanks for reporting this!
Can you still select the devices from Jellyfin? Do you have any sort of firewall set up on the Jellyfin host?

@LeoVerto commented on GitHub (Feb 21, 2019): Thanks for reporting this! Can you still select the devices from Jellyfin? Do you have any sort of firewall set up on the Jellyfin host?
Author
Owner

@theg00s3 commented on GitHub (Feb 21, 2019):

I’m not sure if the play to function works, as I don’t use it. There is no firewall on the jellyfin host. I’ll check the play to function when I get home

@theg00s3 commented on GitHub (Feb 21, 2019): I’m not sure if the play to function works, as I don’t use it. There is no firewall on the jellyfin host. I’ll check the play to function when I get home
Author
Owner

@theg00s3 commented on GitHub (Feb 22, 2019):

Yeah the play to function works, but Jellyfin doesn’t turn up in any client.

@theg00s3 commented on GitHub (Feb 22, 2019): Yeah the play to function works, but Jellyfin doesn’t turn up in any client.
Author
Owner

@anthonylavado commented on GitHub (Feb 22, 2019):

I can confirm @theg00s3’s findings. I noticed something weird a while ago but didn’t think to report it, just thought that my network situation was weird and preventing it.

Essentially, at least as old as 10.0, if you turn off DLNA in the settings, then turn it back on again, it works for a period of time.

During this, the PlayTo function does work with my Xbox One (interesting story - I didn’t have the Movies & TV app installed, and triggering PlayTo caused the Xbox to download it immediately, then start playing the media).

I’ll have to look in my logs, but I’m pretty sure I saw something about being unable to bind

@anthonylavado commented on GitHub (Feb 22, 2019): I can confirm @theg00s3’s findings. I noticed something weird a while ago but didn’t think to report it, just thought that my network situation was weird and preventing it. Essentially, at least as old as 10.0, if you turn off DLNA in the settings, then turn it back on again, it works for a period of time. During this, the PlayTo function does work with my Xbox One (interesting story - I didn’t have the Movies & TV app installed, and triggering PlayTo caused the Xbox to download it immediately, then start playing the media). I’ll have to look in my logs, but I’m pretty sure I saw something about being unable to bind
Author
Owner

@theg00s3 commented on GitHub (Feb 23, 2019):

Looking through my logs, the only errors that appear (other than omdb api related ones) are:

[ERR] Error this.ProcessRequest(context)(Exception while writing error to the response)
System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at SocketHttpListener.Net.HttpListenerResponse.set_ContentLength64(Int64 value) in /jellyfin/SocketHttpListener/Net/HttpListenerResponse.cs:line 89
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.Write(IResponse response, String text) in /jellyfin/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs:line 688
   at Emby.Server.Implementations.HttpServer.HttpListenerHost.ErrorHandler(Exception ex, IRequest httpReq, Boolean logExceptionStackTrace, Boolean logExceptionMessage) in /jellyfin/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs:line 229
[ERR] Error in SharpWebSocket: "An exception has occurred while receiving a message.. Exception.Message: No route to host"
[ERR] Error in SharpWebSocket: "An exception has occurred while receiving a message.. Exception.Message: The header part of a frame cannot be read from the data source."
[ERR] Error reporting playback stopped
System.ArgumentNullException: Value cannot be null.
Parameter name: url
   at Emby.Dlna.PlayTo.PlayToController.StreamParams.ParseFromUrl(String url, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager) in /jellyfin/Emby.Dlna/PlayTo/PlayToController.cs:line 833
   at Emby.Dlna.PlayTo.PlayToController._device_PlaybackStopped(Object sender, PlaybackStoppedEventArgs e) in /jellyfin/Emby.Dlna/PlayTo/PlayToController.cs:line 170

I'm not sure what the first three ones are, but the last one is related to stopping media playing via the Play To function.

edit by @JustAMan: fixed log formatting for readability

@theg00s3 commented on GitHub (Feb 23, 2019): Looking through my logs, the only errors that appear (other than omdb api related ones) are: ``` [ERR] Error this.ProcessRequest(context)(Exception while writing error to the response) System.InvalidOperationException: Operation is not valid due to the current state of the object. at SocketHttpListener.Net.HttpListenerResponse.set_ContentLength64(Int64 value) in /jellyfin/SocketHttpListener/Net/HttpListenerResponse.cs:line 89 at Emby.Server.Implementations.HttpServer.HttpListenerHost.Write(IResponse response, String text) in /jellyfin/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs:line 688 at Emby.Server.Implementations.HttpServer.HttpListenerHost.ErrorHandler(Exception ex, IRequest httpReq, Boolean logExceptionStackTrace, Boolean logExceptionMessage) in /jellyfin/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs:line 229 ``` ``` [ERR] Error in SharpWebSocket: "An exception has occurred while receiving a message.. Exception.Message: No route to host" ``` ``` [ERR] Error in SharpWebSocket: "An exception has occurred while receiving a message.. Exception.Message: The header part of a frame cannot be read from the data source." ``` ``` [ERR] Error reporting playback stopped System.ArgumentNullException: Value cannot be null. Parameter name: url at Emby.Dlna.PlayTo.PlayToController.StreamParams.ParseFromUrl(String url, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager) in /jellyfin/Emby.Dlna/PlayTo/PlayToController.cs:line 833 at Emby.Dlna.PlayTo.PlayToController._device_PlaybackStopped(Object sender, PlaybackStoppedEventArgs e) in /jellyfin/Emby.Dlna/PlayTo/PlayToController.cs:line 170 ``` I'm not sure what the first three ones are, but the last one is related to stopping media playing via the Play To function. **edit by @JustAMan**: fixed log formatting for readability
Author
Owner

@diogosena commented on GitHub (Mar 12, 2019):

I have to add that emby always had a buggy dlna on my setup, sometimes it works, sometimes it doesn't.

@diogosena commented on GitHub (Mar 12, 2019): I have to add that emby always had a buggy dlna on my setup, sometimes it works, sometimes it doesn't.
Author
Owner

@JustAMan commented on GitHub (Mar 12, 2019):

Can you check again? We have merged #1010 which changes underlying HTTP server implementation to a standard one, maybe it fixes your issue?

@JustAMan commented on GitHub (Mar 12, 2019): Can you check again? We have merged #1010 which changes underlying HTTP server implementation to a standard one, maybe it fixes your issue?
Author
Owner

@diogosena commented on GitHub (Mar 12, 2019):

As soon as someone build a new .deb armhf version

@diogosena commented on GitHub (Mar 12, 2019): As soon as someone build a new .deb armhf version
Author
Owner

@JustAMan commented on GitHub (Mar 12, 2019):

@joshuaboniface is it possible to build a armhf version off current master?

@JustAMan commented on GitHub (Mar 12, 2019): @joshuaboniface is it possible to build a `armhf` version off current master?
Author
Owner

@rezpower commented on GitHub (Mar 21, 2019):

Try disabling all your network adopters and keep only the one you have connected. It should fix the problem. This is not a fix but this seem to be the cause of the problem. I hope someone will find a way to fix this correctly.

@rezpower commented on GitHub (Mar 21, 2019): Try disabling all your network adopters and keep only the one you have connected. It should fix the problem. This is not a fix but this seem to be the cause of the problem. I hope someone will find a way to fix this correctly.
Author
Owner

@JustAMan commented on GitHub (Mar 21, 2019):

@rezpower if your workaround helps can you try with #978 and #1010 applied? First one tries to address something about multiple interfaces, and second one changes underlying HTTP server to a standard one.

@JustAMan commented on GitHub (Mar 21, 2019): @rezpower if your workaround helps can you try with #978 and #1010 applied? First one tries to address _something_ about multiple interfaces, and second one changes underlying HTTP server to a standard one.
Author
Owner

@rezpower commented on GitHub (Mar 22, 2019):

@JustAMan I would love to help, but unfortunately I have no knowledge of how o apply those :( I just download the latest win64 releases. Only thing I can confirm is that I was having serious problems with UPnP not being discoverable on my network (not even on server pc) and since I disabled the wifi adapter it has worked with zero problem for days. So in my case it was a 100% fix.

@rezpower commented on GitHub (Mar 22, 2019): @JustAMan I would love to help, but unfortunately I have no knowledge of how o apply those :( I just download the latest win64 releases. Only thing I can confirm is that I was having serious problems with UPnP not being discoverable on my network (not even on server pc) and since I disabled the wifi adapter it has worked with zero problem for days. So in my case it was a 100% fix.
Author
Owner

@theg00s3 commented on GitHub (Mar 22, 2019):

semi-hijack, is there a documented way to switch between the ubuntu repo version and the github source code?

@theg00s3 commented on GitHub (Mar 22, 2019): semi-hijack, is there a documented way to switch between the ubuntu repo version and the github source code?
Author
Owner

@JustAMan commented on GitHub (Mar 22, 2019):

@theg00s3 maybe this helps? https://jellyfin.readthedocs.io/en/latest/contributor-docs/contributing-code/#testing-a-pull-request

For such questions in the future please ask for support in matrix or in forum

@JustAMan commented on GitHub (Mar 22, 2019): @theg00s3 maybe this helps? https://jellyfin.readthedocs.io/en/latest/contributor-docs/contributing-code/#testing-a-pull-request For such questions in the future please ask for support in [matrix or in forum](https://jellyfin.readthedocs.io/en/latest/user-docs/getting-help/)
Author
Owner

@diogosena commented on GitHub (Apr 3, 2019):

sorry to say, but dlna still very buggy using 10.3.0-rc1

@diogosena commented on GitHub (Apr 3, 2019): sorry to say, but dlna still very buggy using 10.3.0-rc1
Author
Owner

@ycodryn commented on GitHub (Apr 28, 2019):

Using the latest version in a docker I have the same problem. My LG tv cant see the server, I have to disable and enable the DLNA server to be visible and after Im closing the tv is not working again. In log I'm also seeing Failed to bind to port 1900 but I'm not using that port. If I'm using Serviio is always visible no matter what.

@ycodryn commented on GitHub (Apr 28, 2019): Using the latest version in a docker I have the same problem. My LG tv can`t see the server, I have to disable and enable the DLNA server to be visible and after I`m closing the tv is not working again. In log I'm also seeing Failed to bind to port 1900 but I'm not using that port. If I'm using Serviio is always visible no matter what.
Author
Owner

@diogosena commented on GitHub (Jun 1, 2019):

My case is solved, jellyfin and tvheadend were fighting each other for port 1900.
Now I don't use tvheadend anymore, and everything is great.

@diogosena commented on GitHub (Jun 1, 2019): My case is solved, jellyfin and tvheadend were fighting each other for port 1900. Now I don't use tvheadend anymore, and everything is great.
Author
Owner

@stale[bot] commented on GitHub (Jul 31, 2019):

Issues go stale after 60d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 7d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Jul 31, 2019): Issues go stale after 60d of inactivity. Mark the issue as fresh by adding a comment or commit. Stale issues close after an additional 7d of inactivity. If this issue is safe to close now please do so. If you have any questions you can reach us on [Matrix or Social Media](https://jellyfin.readthedocs.io/en/latest/getting-help/).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#450
No description provided.