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

[Issue]: Auto Discovery listening address changed in unstable from 10.8.13 #11309

Closed
1 task done
sdwilsh opened this issue Apr 6, 2024 · 6 comments · Fixed by #11504
Closed
1 task done

[Issue]: Auto Discovery listening address changed in unstable from 10.8.13 #11309

sdwilsh opened this issue Apr 6, 2024 · 6 comments · Fixed by #11504
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@sdwilsh
Copy link

sdwilsh commented Apr 6, 2024

Please describe your bug

I recently moved from running 10.8.13 to unstable to get my AMD hardware acceleration working because I needed newer drivers. I run Jellyfin in kubernetes, and have some forwarding setup on my LAN to send the magic "Who is JellyfinServer?" packets to the service running in kubernetes on port 7359. This stopped working in unstable, and I suspect it's due to #10793 which looks to be far more restrictive in the addresses it binds to than the old code it replaced. This can be verified by running lsof:

On 10.8.13, lsof -nP -iUDP shows these addresses and ports bound:

COMMAND  PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
jellyfin   1 root  318u  IPv4 150056711      0t0  UDP *:7359
jellyfin   1 root  326u  IPv4 150060688      0t0  UDP *:1900
jellyfin   1 root  327u  IPv4 150060689      0t0  UDP *:48770
jellyfin   1 root  328u  IPv4 150060690      0t0  UDP 172.16.0.101:40704
jellyfin   1 root  329u  IPv4 150060691      0t0  UDP 127.0.0.1:45939

On unstable, lsof -nP -iUDP shows these addresses and ports bound:

COMMAND  PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
jellyfin   1 root  447u  IPv4 187993370      0t0  UDP 255.255.255.255:7359
jellyfin   1 root  448u  IPv4 187993371      0t0  UDP 127.255.255.255:7359
jellyfin   1 root  449u  IPv4 187993372      0t0  UDP 172.16.3.255:7359

I can run `tcpdump -i any -A 'port 7359' in both instances as well and see the UDP packet come into the Pod, but only see the response go out with 10.8.13.

Reproduction Steps

  1. Launch a Pod of jellyfin/jellyfin:10.8.13 and define a Service with an IP so you can talk to it from a host machine
  2. echo -n 'Who is JellyfinServer?' | socat - udp-datagram:{service address}:7359,broadcast
  3. See JSON response
  4. Repeat (1) and (2) with jellyfin/jellyfin:unstable and get no JSON response

Jellyfin Version

Unstable (master branch)

if other:

No response

Environment

- OS: Host is running Ubuntu 22.04
- Linux Kernel: Host is running `6.5.0-26-generic`
- Virtualization: Kubernetes
- FFmpeg Version: whatever is in `jellyfin/jellyfin` container image
- Plugins: default only
- Reverse Proxy: traefik, but I don't think it matters for this

Jellyfin logs

n/a

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@sdwilsh sdwilsh added the bug Something isn't working label Apr 6, 2024
@jellyfin-bot
Copy link
Contributor

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

  • The format of the environment section has been altered from the template.

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

@gnattu
Copy link
Member

gnattu commented Apr 6, 2024

In that PR, on Linux hosts, the auto-discovery will not bind to unicast addresses when IPv4 is enabled. This will cause the forwarding using unicast IP to break. You will want to broadcast in your k8s network and return the result.

I don’t know the specific reason for this change but it looks intentional to me as there are at least three commits to make this behavior.

@jellyfin-bot jellyfin-bot added this to Needs triage in Issue Triage for Main Repo Apr 6, 2024
@felix920506
Copy link
Member

cc @barronpm is this change intentional?

@sdwilsh
Copy link
Author

sdwilsh commented Apr 6, 2024

You will want to broadcast in your k8s network and return the result.

This isn't ideal though, because then every pod in the cluster will see that traffic. It's a sensible and reasonable default behavior, however, so I don't think the change is bad. I'm hoping we can at least enable some way in which we can support a unicast address for auto discovery to not break this feature for anyone running in kubernetes.

@Shadowghost
Copy link
Contributor

The change is intentional because otherwise we bind to the port on all interfaces and don't respect the bind IPs at all.

@felix920506 felix920506 added the wontfix This will not be worked on label Apr 6, 2024
@felix920506
Copy link
Member

Closing as the change is intentional. Feel free to drop by our forum or chat rooms to figure out a solution. https://jellyfin.org/contact

@felix920506 felix920506 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2024
Issue Triage for Main Repo automation moved this from Needs triage to Closed/Done Apr 6, 2024
sdwilsh added a commit to sdwilsh/ansible-playbooks that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants