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

Discovery not finding all servers #1510

Closed
1 of 3 tasks
brianjmurrell opened this issue Nov 17, 2024 · 7 comments
Closed
1 of 3 tasks

Discovery not finding all servers #1510

brianjmurrell opened this issue Nov 17, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@brianjmurrell
Copy link

Describe the bug

Using jellyfin-android 0.17.9 release, I click on the server button at the Who's watching page (where you choose a user to log into or a server to connect to) and it shows me the same single server under Saved servers and Discovered servers even though there is a discovered server that is not being displayed (pc.interlinx.bc.ca). I have confirmed that the missing server is receiving the discovery broadcast and is replying to it:

Capturing on 'enp2s0'
    1 0.000000000 0.000000000 0.000000000 10.75.22.183 → 255.255.255.255 ADwin Config 

0000  ff ff ff ff ff ff 20 1f 3b 2d 04 87 81 00 00 01   ...... .;-......
0010  08 00 45 00 00 32 9b a7 40 00 40 11 7e 12 0a 4b   ..E..2..@.@.~..K
0020  16 b7 ff ff ff ff c1 89 1c bf 00 1e 9b 67 77 68   .............gwh
0030  6f 20 69 73 20 4a 65 6c 6c 79 66 69 6e 53 65 72   o is JellyfinSer
0040  76 65 72 3f                                       ver?

    2 0.000383884 0.000383884 0.000383884   10.75.22.1 → 10.75.22.183 UDP 7359 → 49545 Len=136

0000  20 1f 3b 2d 04 87 fc aa 14 6c 51 ab 81 00 00 01    .;-.....lQ.....
0010  08 00 45 00 00 a4 06 58 40 00 40 11 f2 a3 0a 4b   ..E....X@[email protected]
0020  16 01 0a 4b 16 b7 1c bf c1 89 00 90 41 ef 7b 22   ...K........A.{"
0030  41 64 64 72 65 73 73 22 3a 22 68 74 74 70 73 3a   Address":"https:
0040  2f 2f 70 63 2e 69 6e 74 65 72 6c 69 6e 78 2e 62   //pc.interlinx.b
0050  63 2e 63 61 3a 38 39 32 30 22 2c 22 49 64 22 3a   c.ca:8920","Id":
0060  22 39 62 65 31 34 64 36 31 63 36 34 62 34 35 32   "9be14d61c64b452
0070  65 62 30 66 65 33 38 61 33 39 64 32 30 32 32 61   eb0fe38a39d2022a
0080  38 22 2c 22 4e 61 6d 65 22 3a 22 70 63 2e 69 6e   8","Name":"pc.in
0090  74 65 72 6c 69 6e 78 2e 62 63 2e 63 61 22 2c 22   terlinx.bc.ca","
00a0  45 6e 64 70 6f 69 6e 74 41 64 64 72 65 73 73 22   EndpointAddress"
00b0  3a 6e 75 6c 6c 7d                                 :null}

What is unclear is why the jellyfin Android client is not displaying the above server in the Discovered servers list.

Logs

11-16 19:08:18.322 28500 28500 I org.jellyfin.sdk.api.ktor.KtorClient: GET https://videoserver.interlinx.bc.ca/Users/Public
11-16 19:08:18.344 28500 28500 I org.jellyfin.sdk.api.ktor.KtorClient: GET https://videoserver.interlinx.bc.ca/Users/Public
11-16 19:08:22.142 28500 16344 I org.jellyfin.sdk.discovery.LocalServerDiscovery: Starting discovery with timeout of 500ms
11-16 19:08:22.144 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Discovering via /255.255.255.255
11-16 19:08:22.144 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Finished sending broadcast, listening for responses
11-16 19:08:22.144 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:22.147 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Received message "{"Address":"https://videoserver.interlinx.bc.ca","Id":"9be14d61c64b452eb0fe38a39d2022a8","Name":"videoserver.interlinx.bc.ca","EndpointAddress":null}"
11-16 19:08:22.148 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:22.148 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Received message "{"Address":"https://pc.interlinx.bc.ca:8920","Id":"9be14d61c64b452eb0fe38a39d2022a8","Name":"pc.interlinx.bc.ca","EndpointAddress":null}"
11-16 19:08:22.148 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:22.649 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:23.150 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:23.653 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:24.155 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:24.658 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:25.161 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:25.664 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:26.168 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:26.671 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:27.173 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:27.675 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:28.177 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:28.680 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: Reading reply...
11-16 19:08:29.182 28500 16344 D org.jellyfin.sdk.discovery.LocalServerDiscovery: End

Application version

0.17.9

Where did you install the app from?

Google Play

Device information

Chromecast with Google TV

Android version

Android TV OS version 12

Jellyfin server version

10.10.1

Which video player implementations does this bug apply to?

  • Web player (default)
  • Integrated player (ExoPlayer)
  • External player (VLC, mpv, MX Player)
@nielsvanvelzen
Copy link
Member

Both of your servers are correctly discovered but since they share the same server-id (probably due to a full data clone) only one will be shown. This is to prevent the same server from showing multiple times if responses are received via multiple network routes, otherwise the id provided by the server is entirely ignored by our apps.

Closing as invalid.

@nielsvanvelzen nielsvanvelzen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2025
@brianjmurrell
Copy link
Author

Surely you must have predicted that the next question is going to be how does one change their server id? A Google search was not fruitful in trying to discover how this is done.

So how does one change their server's id to correct this problem?

@nielsvanvelzen
Copy link
Member

It's in the device.txt file in your Jellyfin data directory. The value must be a valid uuid.

@brianjmurrell
Copy link
Author

Thanks @nielsvanvelzen.

For anyone else finding this issue, you cannot edit device.txt with a typical text editor such as vi[m] as that will typically add a newline (\n) to the file and that will crash the jellyfin androidtv client.

Instead use something like:

$ echo -n '<uuid>' | sudo tee /var/lib/jellyfin/data/device.txt

to change the UUID in that file.

@brianjmurrell
Copy link
Author

@nielsvanvelzen While I can appreciate the effort of detecting duplicate responses that might have arrived by different interfaces/routes/etc., using the IDs, wouldn't the Name and Address items also be duplicated if one were really receiving duplicate responses from the same server? Could those not be used to help identify [non-]duplicates? Or at least emit a warning in a log somewhere that potential ID duplication on separate/multiple servers might be happening, helping to avoid opening issues like this one?

@nielsvanvelzen
Copy link
Member

The server id is uniquely generated on first start and should never be the same for two servers. It's pointless to check additional values just to work around a self-inflicted problem.

@maru801
Copy link

maru801 commented Jan 5, 2025

Probably the only time you'll get multiple servers with duplicate IDs is by cloning them. As in making a copy of the config folder of one server and redeploying the copy to run at the same time as the original.

The solution to this issue is to just never use a clone of one server, but make a new one from scratch.

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
None yet
Development

No branches or pull requests

3 participants