Plex server on TrueNAS Scale is not visible

Server Version#: 1.41.3.9314
Player Version#: 1.107.2.300-7093f413

(TLDR: trying to work out how to upgrade my TrueNAS Core server running PlexPass server in a jail to TrueNAS Scale running Plex as an app, without losing my current configuration, watch history, planned recordings, etc., but now Plex can’t see the new server at all.)

I’m prepping to upgrade my server from TrueNAS Core to TrueNAS Scale and I obviously want to keep my Plex server and all its data intact. I’m therefore testing the procedure on a VirtualBox VM first. My procedure:

  1. Created a TrueNAS Core VM, created a small test Plex server running in a jail on it, with the Plex config data and media held on separate, dedicated datasets, the same way I have it running on my real TrueNAS server.
  2. Upgraded the NAS to Scale, created a new Plex server using the app available in the list in TrueNAS (providing a claim code during installation). I set the Plex data directory and the configuration directory to the dedicated datasets. Confirmed that the new server was running by logging into it using its local IP address.
  3. The new server had the media but not the config from the old server.
  4. I’d left the Windows Plex player open while making the changes to the the TrueNAS VM, so it was still showing the old server that had been running under Core, but showed it as inaccessible. I deleted it from the list of servers.
  5. The new server running under Scale had a different name (the original name with an appended random string) but wasn’t visible to the player
  6. I stopped the new server, replaced its config data with that from the old server, and restarted it.
  7. The new server still doesn’t show up in the Windows player, and now won’t show up in the local web interface either: when I access the web UI on the Scale VM’s IP address, it only shows my real Plex server in the list, not the new VM server.

Since I want to keep the old server’s config and data, I’d tried setting the new app’s config directory to that of the old data during installation, but while the jail stored the data at the top level of the mounted location (i.e. /Plex Media Server), the Scale app used subdirectories instead (i.e. /Library/Application Support/Plex Media Server). I should note that both were running the same current PlexPass release of Plex server. I’d hoped that I could just delete the new server’s config and replace it completely with that from the old server, but that may not have worked, given that I can’t see the new server at all.

Can anyone suggest where I’m going wrong? Can I make the new server visible again? Is it feasible to transfer the old configuration to the new instance of Plex server? Is there a proper way to do this?

Thanks in advance.

OK, I think I solved part of this: this post on the TrueNAS forums suggested it was a permissions/ownership problem stopping the new server from working with the old config data. Once I’d addressed that, I could see the new server via its local IP again, but I still can’t see it in the list of available servers in the Windows player. I did find that the Plex server seemed to have no permissions to access the Media dataset now, and therefore couldn’t play any files.

I think that I should have given ownership of the Scale Plex app to the same user/group as had ownership of the Core jail and also make sure that the user/group had access to the Media dataset. I’ll have to try that in my next attempt. However, I’m still at a loss as to why the new Scale Plex server wasn’t showing up in the list in the Windows player.

You will probably have to claim it again.

If you get into the container shell (command line),
and, if they allow it, temporarily stop PMS, Clear out the credentials, start & reclaim.

-ELSE-

  1. Stop the container

  2. Find the absolute file path as seen from a regular terminal session window

  3. As root user, run this script using the -p (pathname) option
    ./UserCredentialReset.sh -p "/path/to/Preferences.xml"

  4. Interact with the tool and give it the Plex Claim Token when asked
    (The token is valid for only 5 minutes so be timely)

See the README.md for examples/documentation

1 Like

OK, I’ll give that a try, thanks.

I recreated the test VM to have another go: created in Core 13.3, upgraded the VM to Scale 24.04, installed the app, ran it, stopped it, replaced its config files with those from the Core jail, changed some ownerships (approximately following the instructions here) and ran the app again. It shows the expected film and TV libraries, but won’t play any content. This seems to be because the path to the movie files has changed.

Specifically, when I created the jail version, I mounted my Media dataset into the jail’s file system as:

/mnt/volume_1/iocage/jails/plex/root/media

The app setup in Scale doesn’t seem to have the equivalent option. All I saw was an option to set the “Plex Data Storage” to an existing host path, in this case my dataset, /mnt/vol_1/Media. Looking in the app’s file system, this is mapped to:

/data

so clearly Plex is looking in the wrong place. That’s an easy enough fix: add the new locations to the Plex libraries and remove the old locations - that seems to maintain the progress in a part-watched movie, so I’m guessing that everything else library-related is probably fine too.

My next potential hiccup is preserving my live TV and DVR settings. I haven’t yet set up DVR in the VM installation of Plex, so I haven’t seen how well, if at all, it reacts to the new setup. I’ll have to test that next, but if there are any tips available for that process, I’ll gladly accept them.

you’re on the right path.

As for DVR, IIRC the DVR is LAN IP or attached tuner based.
As long as that’s seen at the same location, all should be good there.

1 Like

Well, I’ve confirmed that the Scale app retains the settings and scheduled recordings in the DVR (or, at least, the few I added as tests), so it looks like I’m probably OK to carry on in this fashion:

  1. Upgrade TrueNAS Core 13.3 to TrueNAS Scale 24.04
  2. Install the app version of Plex, pointing it at the existing datasets for media and settings, run it once, then stop it
  3. Replace the app’s settings with the old jail version’s settings, then change ownership of those files
  4. Restart the app, access it via the local web UI, it should show my expected user ID
  5. Add the new location for the media into the libraries as appropriate, give the app time to locate them and add them to the database, then remove the defunct locations from the libraries

At that point everything should be working as it was. However, I’ve been unable to get the Windows Plex player to reconnect to the recreated server, even though I’ve been passing the claim token during the installation process. In the player’s window, the test server is listed, but shows that the player couldn’t connect to it. If I tell the player to forget about the server, it clears it from the list but I don’t see any way to get the player to look for the server again.

Even worse, I used the test server’s web UI to revoke my claim on the server, assuming I’d be able to claim it back again, but then even the web UI (obviously running on the test server’s VM) couldn’t see the test server.

@ChuckPa: I used your script to claim the server again, which made it visible again in the local web UI, so now the Windows player knows that it exists again, but still said it was unreachable. The test server was likewise unable to connect to my regular Plex server.

I enabled remote access on both servers, which now say they’re not available outside my network. When I use the Windows player to play a movie from the test server, I get warned that the server’s not on my local network (I dismissed it before noting the entire message, stupidly, and can’t get it to come up again) and I think it was warning me that all of the traffic was being routed over the internet. Suffice to say both my real and VM servers are indeed on the same 192.168.1.x network, so why the player can’t connect to both of them directly, I don’t know.

I gave my real Plex server a different IP to the physical server it runs on, as I do with most hosted services. I’d like to do that again in Scale, but I’m not convinced that’s possible, looking at the lack of options in the Docker settings for the app.

The VM Plex server, with remote access enabled, showed its private IP as 172.16.x.x, which I wasn’t expecting. The per-app Network settings in TrueNAS don’t include an obvious way to specify the app’s IP, unlike the old jails. All I can see is a checkbox for “Host Network” which has a help bubble saying only

Bind to the host network. It’s recommended to keep this disabled.

I ticked the box anyway and now the Plex server remote access IP is in the 192.168.1.x range. This makes no difference to the player app, which still says the VM server is connected “indirectly”.

I am confused.

So now I think I’ll just have to do the upgrade on the real server (which TrueNAS tells me can’t be rolled back from Scale to Core, so it’s all or nothing), get the Docker app running and using the old configuration as best as I can, and then hope that I can make the Plex server visible on the LAN and get the various players to reconnect to it. Does that all seem reasonable?

Whenever you see “indirect”, it means the player can’t talk “Directly” to the host.
(not all the ports are open and it’s using “relay”)

PMS expects your home server(s) to be on the same subnet as the players
( 1 LAN )

When you have multiple subnets as you do here (192.168.1.x -vs- 172.16.x.x) that’s two subnets. It knows both are local but not directly visible (broadcast packets don’t traverse subnet boundaries )

Regular Docker supports:

bridge	- The default network driver.
host	- Remove network isolation between the container and the Docker host.
none	- Completely isolate a container from the host and other containers.
overlay	- Overlay networks connect multiple Docker daemons together.
ipvlan	- IPvlan networks provide full control over both IPv4 and IPv6 addressing.
macvlan	- Assign a MAC address to a container.

It looks like you’re currently in bridge mode (the default)
Can you change it to ‘host’ ?

If you do, it will appear as another regular host on your LAN.
It will be “Direct” accessible. (no more “indirect” )

1 Like

I assume that’s what this checkbox is:

(Note that this is the entirety of the per-app network settings in TrueNAS Scale 24.04. I understand that there are more options in 24.10, though some of them can only be set via config files, as per this article)

I set that last night but it made no difference at the time. Today, having rebooted my Windows machine, the VM server is shown as “Nearby”. As far as I can tell, everything’s now operating the way it should, thanks to the wonders of “have you tried turning it off and back on again?”

I think I’m good to try all this tomorrow on the real server. Fingers crossed…

Thanks for your help.

The idea / intent of PMS on the home LAN is based on this:

  1. Your home modem/router provides (creates) the LAN (subnet) for everything to use
    – e.g. 192.168.0.x, 192.168.1.x, 10.y.z.x, etc, etc address blocks.

  2. Your WiFi connects the devices to that LAN subnet

  3. With everything on the same subnet, they can freely see / reach out to each other.

  4. When there are multiple subnets (different address blocks), there is no communication.
    – This is when most home network communication failures happen.

My home LAN uses 192.168.0.x. Everything has an address there .
( I have less than 250 devices so everything works perfectly. )

  1. When PMS starts, it tells Plex.tv what its LAN address is. (the other apps use this info)

  2. When all the player apps start, They ask Plex.tv for the server’s address.

  3. With that info, the players now know how to contact the server.

1 Like

Well, I did the TrueNAS upgrade and got the Plex app installed. It took an age to duplicate the old settings into the new location, but eventually I got the app running. Added the new locations into the libraries and they mostly sorted themselves out, though I really should have turned off the options to scan when new media is added. Nonetheless, the only real hiccups I had were some duplicate entries in my Music lib being given incorrect Album Artist values (when I removed the old location, the correct entries disappeared and the screwed up ones remained, which I then had to correct by hand) and one Photos library somehow getting confused and importing the contents of both my TV and Movies libs. I had to delete that library and recreate it (no biggy, it’s only pictures. Not like I could have lost viewing history or anything).

So it’s all back up and running and will now spend the next few hours/days/weeks rebuilding thumbnails and video thumbnails, it seems. And when it’s done with that, I’ll try turning on Sonic Analysis in the music lib, which is one of the reasons I wanted to get onto TrueNAS Scale/Linux in the first place.

Thanks again for your help, @ChuckPa .

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.