Plex Won't Load Metadata (Home directories don't seem to line up) LINUX

This has had me stumped for a while now. I’m not exactly sure when it happened (Possibly when I switched my router over to pfSense). I realize the problem could lie with pfSense, but I came across something weird.

First off, all the metadata that was previously loaded is still there, I just can’t seem to load anything new, and when I try to change a poster for a movie that has been there for a while and has metadata, there are no other posters besides the one already selected. I thought this may have something to do with my internet connection (the change over to pfSense). I am also perusing this possibility, but everything else seems to be working fine. Plex will even see my friends libraries.

It seems that the PLEX home directory may not be correct. When I look up (Google) where the metadata directory is, it always seems to start with $PLEX_HOME. This seems to be /root on my system. However, when I check /var/passwd, the plex entry is plex:x:250:250::/var/lib/plexmediaserver:/usr/sbin/nologin. Indicating that the home directory is /var/lib/plexmediaserver. Which is what it should be.

Has anyone ever came across this? Is this normal? Can I change it?
My thought here is that $PLEX_HOME is incorrect, causing plex to look in the /root folder, which it would not have permission to do. But I would assume that this would cause all sorts of other problems as well. I really don’t know what to do with this. I don’t even know if this is something that could be causing my problem. Is far as I know I cant change where PLEX looks for metadata.

Hopefully I explained that well. Any help is appreciated.

lets start with uploading your server logs those should give us an insight to what is going on.

Start with what @dbirch says, upload logs.

Next… Don’t confuse PLEX_HOME with ~plex (where plex is the service account used to run plex.) I’ve been running PMS on OpenSuSE 15.3 for nearly 4 years, and I don’t seem to have that defined. Whatever PLEX_HOME is defined as, it shouldn’t be subordinate to /root, that would either be a security hazard, or you’re running PMS as root (also a bad idea.)

You should probably configure DNS rebinding protections in your pfsense gateway (been using that as well for quite some time.)

Look in your plexmediaserver.service file to see how your other environment vars are being defined, and how PMS is being called.

I’d suggest not starting to go wild with changes until you can upload logs here and someone gets a chance to spin through.

May I see the server logs ZIP file please ?

Also need some more info about the installation.

  1. Distro & Version
  2. Any customizations ? (override.conf )

Configuring DNS rebinding for Plex in PfSense is:

DNS Resolver → Custom Options

server:
private-domain: "plex.direct"
so-reuseport: no 

Plex Media Server Logs_2022-09-06_19-39-52.zip (3.7 MB)

Sorry. Of course I should have loaded log files right away. I posted in kind of a hurry.

So I tried to refresh metadata on a movie and then grabbed the log files.

As for my set up. I have been running PMS for 5 or 6 years. I started on Ubuntu Server. Then moved everything to Docker, and added other services like Radarr, Sonarr, and a few others. Then I got real brave and switched everything up. Now PMS is running in an LXC in ProxMox, and pfSense in a VM with it’s own dedicated NICs. Everything was running fine in ProxMox until I ditched my old router and virtualized pfSense. I know there are cons to running a set up like this. Mostly I’m doing this as a learning experience.

ProxMox VE 7.2-3
pfSense 6.2.0
PMS 1.26.2.5797

The log files have some entries for invalid field. Something to do with content directory, which is why I went down the “home directory” rabbit hole in the first place.

Hopefully this loaded up right. Let me know if you all need anything else.
Thanks

I forgot to add. I know PMS shouldn’t be running as root, and as far as I know it isn’t, but I don’t know how to check.

Looking at the log files looks like a DNS issue: (Could not resolve host: plex.tv)

Unless you specifically changed the user, it’s going to be running as plex. Having said that…

ps -fu plex
ps -ef | grep plex

Ideally, the first ps command (I especially enjoy using that to track down Oracle processes…) will give you your current running process. The second form (at least under RHEL & SuSE style distros) will give you a similar list, the username should be the first column.

I ran the first command and it looks like PLEX is running as the correct user.

How would I fix something like this? I’m VERY new to pfSense, and network management in general. It sounds like something that would need adjusted in DNS Resolver.

Figured I would follow up on the solution. I had my DNS server setting in ProxMox pointing to my old router IP instead of the new IP for pfsense. Changed it over and everything worked as it should.