"Failed to bind to address http://0.0.0.0:8096: address already in use " after upgrading jellyfin #3142

Closed
opened 2026-02-06 22:52:23 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @linhz0hz on GitHub (Jul 11, 2021).

Describe the bug

System (please complete the following information):

  • OS: Raspbain Buster
  • Jellyfin Version: 10.7.6

I had jellyfin 10.5 running on my raspberry pi 3 for a while. Recently I tried to upgrade it to 10.7.6 but then it does not want to start. I read issue #2267 which seems very similar but I don't see what was the solution. I tried to modify and to 8098 in ~/.config/jellyfin/system.xml but when jellyfin starts it is still checking port 8096.

I do suspect that my upgrade was not fully clean. I did apt-get remove jellyfin jellyfin-web jellyfin-server jellyfin-ffmpeg and reinstalled again but nothing helps.

I also tried sudo lsof -i :8096. Everytime I run jellyfin (even when they fail) a jellyfin process shows up. I kill them, re-run, does not help.

Also there is some issue with web client so I am running with --nowebclient. I think this does not matter. I will fix the web client later.

Server Logs

[11:09:37] [INF] [1] Main: Kestrel listening on Any IP4 Address
[11:09:40] [FTL] [1] Microsoft.AspNetCore.Server.Kestrel: Unable to start Kestrel.
System.IO.IOException: Failed to bind to address http://0.0.0.0:8096: 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.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
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.SocketConnectionListener.g__BindSocket|13_0(<>c__DisplayClass13_0& )
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.g__BindSocket|13_0(<>c__DisplayClass13_0& )
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
[11:09:40] [ERR] [1] Main: Kestrel failed to start! This is most likely due to an invalid address or port bind - correct your bind configuration in network.xml and try again.
[11:09:40] [FTL] [1] Main: Error while starting server.

System.tcl
I see
<LocalNetworkSubnets />
<LocalNetworkAddresses />
Which I thought is already clean?

Originally created by @linhz0hz on GitHub (Jul 11, 2021). **Describe the bug** <!-- A clear and concise description of what the bug is. --> **System (please complete the following information):** - OS: Raspbain Buster - Jellyfin Version: 10.7.6 I had jellyfin 10.5 running on my raspberry pi 3 for a while. Recently I tried to upgrade it to 10.7.6 but then it does not want to start. I read issue #2267 which seems very similar but I don't see what was the solution. I tried to modify <PublicPort> and <HttpServerPortNumber> to 8098 in ~/.config/jellyfin/system.xml but when jellyfin starts it is still checking port 8096. I do suspect that my upgrade was not fully clean. I did apt-get remove jellyfin jellyfin-web jellyfin-server jellyfin-ffmpeg and reinstalled again but nothing helps. I also tried sudo lsof -i :8096. Everytime I run jellyfin (even when they fail) a jellyfin process shows up. I kill them, re-run, does not help. Also there is some issue with web client so I am running with --nowebclient. I think this does not matter. I will fix the web client later. **Server Logs** > [11:09:37] [INF] [1] Main: Kestrel listening on Any IP4 Address [11:09:40] [FTL] [1] Microsoft.AspNetCore.Server.Kestrel: Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://0.0.0.0:8096: 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.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) 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.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_0`1.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken) [11:09:40] [ERR] [1] Main: Kestrel failed to start! This is most likely due to an invalid address or port bind - correct your bind configuration in network.xml and try again. [11:09:40] [FTL] [1] Main: Error while starting server. **System.tcl** I see \<LocalNetworkSubnets /> \<LocalNetworkAddresses /> Which I thought is already clean?
OVERLORD added the bug label 2026-02-06 22:52:23 +03:00
Author
Owner

@linhz0hz commented on GitHub (Jul 11, 2021):

I was very confused. Somehow when I just access it through my browser jellyfin seems working again. I have not started the process . I thought I stopped the jellyfin.service but maybe I did not do it right. But still I am confused why system.xml setting is not affecting anything and why the web directory on the working page is /usr/share/jellyfin/web while if I start from command line it is /usr/lib/jellyfin/bin/jellyfin-web. I suspect the working page is still the old version I had and the new version is getting configurations from somewhere else?

@linhz0hz commented on GitHub (Jul 11, 2021): I was very confused. Somehow when I just access it through my browser jellyfin seems working again. I have not started the process . I thought I stopped the jellyfin.service but maybe I did not do it right. But still I am confused why system.xml setting is not affecting anything and why the web directory on the working page is /usr/share/jellyfin/web while if I start from command line it is /usr/lib/jellyfin/bin/jellyfin-web. I suspect the working page is still the old version I had and the new version is getting configurations from somewhere else?
Author
Owner

@crobibero commented on GitHub (Jul 11, 2021):

With 10.7 you would need to edit network.xml to change the port

@crobibero commented on GitHub (Jul 11, 2021): With 10.7 you would need to edit `network.xml` to change the port
Author
Owner

@HybridSarcasm commented on GitHub (Oct 10, 2023):

This has been open quite a while. Can this be re-produced with the current build? If so, please update the bug report details. Thanks!

@HybridSarcasm commented on GitHub (Oct 10, 2023): This has been open quite a while. Can this be re-produced with the current build? If so, please update the bug report details. Thanks!
Author
Owner

@srcrist commented on GitHub (Oct 19, 2023):

Closing this issue as it does not appear to reference an actual Jellyfin bug. If anyone is experiencing this issue, please visit our support communities on the forums or the Matrix/Discord server for help troubleshooting the exact cause of the binding failing on your configuration.

@srcrist commented on GitHub (Oct 19, 2023): Closing this issue as it does not appear to reference an actual Jellyfin bug. If anyone is experiencing this issue, please visit our support communities on the forums or the Matrix/Discord server for help troubleshooting the exact cause of the binding failing on your configuration.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#3142