Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access Jellyfin after updating to 10.9 - possible binding problem #11548

Closed
CardenInsurance opened this issue May 12, 2024 · 33 comments
Closed
Labels
bug Something isn't working

Comments

@CardenInsurance
Copy link

CardenInsurance commented May 12, 2024

Describe The Bug
Everything was fine until I upgraded to 10.9. Now, I cannot connect to my Jellyfin anymore. I keep getting these messages in the log when I try to connect:

[2024-05-11 20:56:25.591 -04:00] [WRN] [26] Jellyfin.Networking.Manager.NetworkManager: "127.0.0.1": External request received, no matching external bind address found, trying internal addresses.
[2024-05-11 20:56:25.592 -04:00] [WRN] [26] Jellyfin.Networking.Manager.NetworkManager: "127.0.0.1": External request received, but no external interface found. Need to route through internal network.
[2024-05-11 20:56:25.593 -04:00] [WRN] [26] Jellyfin.Networking.Manager.NetworkManager: "127.0.0.1": Only loopback "127.0.0.1" returned, using that as bind address.

I normally access Jellyfin's web server using my personal domain: jellyfin.mypersonaldomain.com:8096. But since upgrading to 10.9, I can only access it using localhost:8096. I cannot even access it using the computer's IP address, 192.168.1.101.

It seems there's a problem where 10.9 isn't binding to all interfaces and addresses. I normally have the "Bind to local network address" box blank. But I have tried putting 192.168.1.0/24 in that box, but no change.

I have 192.168.1.0/24 in the LAN networks box.

I tried deleting network.xml and restarting the service, but no change.

Expected Behavior
After upgrading to 10.9, Jellyfin should continue to be accessible by all IP addresses and hostnames like before.

Logs
At one point while trying to fix this issue, I got this exception in my log. I don't know where "5000" came from because I never entered that port anywhere that I know of.

System.IO.IOException: Failed to bind to address http://localhost:5000.
 ---> System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.)
 ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, 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.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
   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, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_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, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
 ---> (Inner Exception jellyfin/jellyfin-web#1) System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, 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.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
   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, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_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, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)<---

   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.DefaultAddressStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(ListenOptions[] listenOptions, AddressBindContext context, Func`2 useHttps, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
   at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)

System (please complete the following information):

  • Platform: Windows 11
  • Browser: Brave
  • Jellyfin Version: 10.9.0
@CardenInsurance CardenInsurance added the bug Something isn't working label May 12, 2024
@thornbill thornbill transferred this issue from jellyfin/jellyfin-web May 12, 2024
@jellyfin-bot
Copy link
Contributor

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • This bug report was not filed using the issue template.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@TnZzZHlp
Copy link

I have encountered the same issue as well

@bioblatt
Copy link

same for me, web only shows the jellyfin logo and on android I also can't connect to the server

@Germs2004
Copy link

When I run netstat and filter for "Jellyfin", I get this:

C:\Windows\System32>netstat -a -b -n

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:8096         0.0.0.0:0              LISTENING
 [jellyfin.exe]
  UDP    0.0.0.0:7359           *:*
 [jellyfin.exe]

I think this means it's only listening on IP address 127.0.0.1 even though "Bind to local network address" is set to empty.

@gnattu
Copy link
Member

gnattu commented May 12, 2024

If you are on windows, can you check if your firewall actually allowed jellyfin?

@jellyfin-bot jellyfin-bot added this to Needs triage in Issue Triage for Main Repo May 12, 2024
@Spicy-Jack103
Copy link

I am having the same issue - Windows firewall is turned off for both the client and server device and still has the same issue.

@Germs2004
Copy link

If you are on windows, can you check if your firewall actually allowed jellyfin?

I had the Windows Firewall completely disabled while troubleshooting. And the problem began upon updating to 10.9.0.

@TnZzZHlp
Copy link

TnZzZHlp commented May 12, 2024

If you are on windows, can you check if your firewall actually allowed jellyfin?

The issue seems to stem from the fact that Jellyfin is unable to detect the IP address on my network adapter. I'm using Hyper-V and a Virtual Switch

@Germs2004
Copy link

If you are on windows, can you check if your firewall actually allowed jellyfin?

The issue seems to stem from the fact that Jellyfin is unable to detect the IP address on my network adapter, which is a vEthernet adapter for Hyper-V.

Oh, that might be a pattern. I'm using Hyper-V and a Virtual Switch too, though Jellyfin is installed on the Host, not a VM.

@gnattu
Copy link
Member

gnattu commented May 12, 2024

So let's confirm this:

All of you guys are on windows and are connected through Hyper-V vSwitch right?

@Germs2004
Copy link

So let's confirm this:

All of you guys are on windows and are connected through Hyper-V vSwitch right?

yes for me

@Spicy-Jack103
Copy link

So let's confirm this:

All of you guys are on windows and are connected through Hyper-V vSwitch right?

Yes, that is correct. Jellyfin running the on Hyper-V server (NOT in a VM) but running through the Hyper V switch

@gnattu
Copy link
Member

gnattu commented May 12, 2024

If that is the case, can you try set <IgnoreVirtualInterfaces> key to <IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces> in the network.xml ?

From my testing disable that populates the vSwitch IP.

@Germs2004
Copy link

Germs2004 commented May 12, 2024

If that is the case, can you try set <IgnoreVirtualInterfaces> key to <IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces> in the network.xml ?

From my testing disable that populates the vSwitch IP.

That worked! Now I can access it by IP and the usual hostname. Thank you.

@TnZzZHlp
Copy link

TnZzZHlp commented May 12, 2024

If that is the case, can you try set key to in the ?<IgnoreVirtualInterfaces>``<IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces>``network.xml

From my testing disable that populates the vSwitch IP.

It works for me too. Thanks. but why it only happen on 10.9? it's a new option?

@gnattu
Copy link
Member

gnattu commented May 12, 2024

If that is the case, can you try set key to in the ? <IgnoreVirtualInterfaces>falsenetwork.xml
From my testing disable that populates the vSwitch IP.

It works for me too, but why it only happen on 10.9? it's a new option?

No, it is an old option, but in 10.8 there is a bug that this option does not actually ignore virtual interfaces like this.

@Germs2004
Copy link

Thankfully, there's a simple workaround, but can we get this setting exposed on the web GUI in a future version? Or have it set to false by default?

@Spicy-Jack103
Copy link

Perfect! that does the job!
Thanks for the assistance and good work!

@Bizarre955
Copy link

If that is the case, can you try set <IgnoreVirtualInterfaces> key to <IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces> in the network.xml ?

From my testing disable that populates the vSwitch IP.

Fixed for me on box running hyper-v as well.

@m4gicfour
Copy link

m4gicfour commented May 12, 2024

If that is the case, can you try set <IgnoreVirtualInterfaces> key to <IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces> in the network.xml ?

From my testing disable that populates the vSwitch IP.

This was also the issue for me running on UNRAID.

@spupuz
Copy link

spupuz commented May 12, 2024

tried but not working i always got:

 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

[12:01:23] [FTL] [1] Main: Error while starting server

@Germs2004
Copy link

tried but not working i always got:

 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

[12:01:23] [FTL] [1] Main: Error while starting server

I suggest renaming your Jellyfin/Server/config/network.xml file to network.xml.backup, then restart the Jellyfin service. That will reset your network settings to default. Then, go back to the Dashboard > Network settings, reconfigure things there, and restart the service again. If it still gets an error, do this again but only make one change at a time and restart the service between each change to see which setting is causing your error.

@jumoog
Copy link

jumoog commented May 12, 2024

tried but not working i always got:

 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

[12:01:23] [FTL] [1] Main: Error while starting server

I suggest renaming your Jellyfin/Server/config/network.xml file to network.xml.backup, then restart the Jellyfin service. That will reset your network settings to default. Then, go back to the Dashboard > Network settings, reconfigure things there, and restart the service again. If it still gets an error, do this again but only make one change at a time and restart the service between each change to see which setting is causing your error.

No, network.xml is only created if the binding was successful.

@gnannig
Copy link

gnannig commented May 12, 2024

Same issue for me, Ubuntu 22.04.4 LTS.
Kernel 5.15.0-106-generic
removing network.xml doesn't fix (see jumoog's comment).
false already present in network.xml

@spupuz
Copy link

spupuz commented May 12, 2024

Same issue for me, Ubuntu 22.04.4 LTS. Kernel 5.15.0-106-generic removing network.xml doesn't fix (see jumoog's comment). false already present in network.xml

Same situation for me with docker container

@Schweppesale
Copy link

Schweppesale commented May 12, 2024

I'm also experiencing the same issue.
The service will still listen in on port 5000 even with the following setting:
<IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces>


Renaming network.xml to network.bak.xml results in the following error on startup:
failed to load external entity "/config/network.xml"


update

It appears to be working as expected now after I updated the "Bind to local network address" setting.
I just changed it from 0.0.0.0 to 127.0.0.1

@AlexLamond
Copy link

AlexLamond commented May 12, 2024

It appears to be working as expected now after I updated the "Bind to local network address" setting. I just changed it from 0.0.0.0 to 127.0.0.1

@Schweppesale - How did you manage to update this without GUI access?

@spupuz
Copy link

spupuz commented May 12, 2024

starting a new instance without config has not binding problems, but a wouild like to have my config working if possible.

@gnattu
Copy link
Member

gnattu commented May 13, 2024

This original issue is about instances relying on veth to connect to outside, and for such instances, IgnoreVirtualInterfaces should be set to false as described previously.

We also have another issue caused by multiple networking interfaces sharing the same IP in #11557, this one is going to be resolved by #11587

If non of the above apply to you, please file a new issue with complete log and environment info so we can look it.

Closing as the original issue is resolved.

@gnattu gnattu closed this as completed May 13, 2024
Issue Triage for Main Repo automation moved this from Needs triage to Closed/Done May 13, 2024
@PitchAbyss
Copy link

i am on ubuntu server please can someone tell the fix what to do ?

@HoloByteus
Copy link

HoloByteus commented May 15, 2024

So glad I found this <IgnoreVirtualInterfaces>false</IgnoreVirtualInterfaces>. Bout to go insane trying to figure out why I couldn't browse to jellyfin on my Hyper-V server, nothing made sense.

@patritha
Copy link

patritha commented May 16, 2024

im having a simmilar issue, exept i can access my webui but it spams my console with the output the op got. changing the setting previously mentioned had no effect. im on proxmox and using caddy reverse proxy btw

@Shadowghost
Copy link
Contributor

The output mentioned by OP doesn't has an impact and will be silenced in the next Bugfix release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Needs Testing
Development

No branches or pull requests