Plex has lost all my media.

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
For some unknown reason Plex has lost all my media files and when I select to scan library files, it doesn't find any.
There were library files before Christmas, and they were showing in Plex.
I have Open ACL so permissions should not be a problem
Any idea as to why they are not found now.
Edit:
I deleted a library folder in Plex, then re added it, but when I went to browse for media files, they were all greyed out.
Thanks
 
Joined
Oct 22, 2019
Messages
3,641
Are your media files still intact on the dataset?

What are your Plex settings? Sounds like security issues / mismatch.

How are you connecting to the Plex GUI?

Any particular firewall rules or router settings?

More information can help out a lot.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Are your media files still intact on the dataset?

What are your Plex settings? Sounds like security issues / mismatch.

How are you connecting to the Plex GUI?

Any particular firewall rules or router settings?

More information can help out a lot.

The media files play fine in or with Kodi and vlc media.
As far as I am aware, nothing has changed in or with Plex player, but which settings do you mean

From the Plex plugin I select or click: Manage, then it opens a Plex GUI and from there I see that there are no library files.
My router settings have not changed and I do not have or use a firewall

Regarding permissions, I have Open ACL, where owner is me: rob, and group is wheel
Just a thought: my Jails or media files have always been in the same place: /mnt/WinShare/iocage/jails/Plex/root/media/Films
And I wonder if that could be the reason???
Thanks
 
Last edited:
Joined
Oct 22, 2019
Messages
3,641
As far as I am aware, nothing has changed in or with Plex player, but which settings do you mean
The Plex Server library and especially network settings.


From the Plex plugin I select or click: Manage, then it opens a Plex GUI and from there I see that there are no library files.
What if you try typing in the IP address and port manually into your web browser without clicking the manage button?

If possible, copy+paste the settings or screenshots of the issue, and perhaps also the permissions. Censoring out what's private.

I take it that the user "plex" (972) or "everyone" has read access to the files on the dataset?
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Typing in the IP address and port number into a web browser times out
Screenshots of the ACL for 1 of the media folders below. When I select a particular section or folder, all I get is the spinning disc for a long time and nothing is found. Yet I can see the folders and files in a file manager and also in the shell of TrueNAS.
 

Attachments

  • IMG_20220220_154053.jpg
    IMG_20220220_154053.jpg
    171.2 KB · Views: 342
  • IMG_20220220_154106.jpg
    IMG_20220220_154106.jpg
    152.5 KB · Views: 310
Joined
Oct 22, 2019
Messages
3,641
Typing in the IP address and port number into a web browser times out
It sounds like the Plex service knows about "your" local server, but there's an authentication / security issue.

What are the Jail's network settings? And what about the Plex Server network settings (when you login to Plex.)

EDIT: To be clear, typing this in your web browser times out?


(Assuming that is the IP address.)
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Jail network setting screenshot below.
The Plex server network settings , when I open Plex from the Manage link, are all pretty much blank, as they always have been.
 

Attachments

  • IMG_20220220_161006.jpg
    IMG_20220220_161006.jpg
    180.6 KB · Views: 316
Joined
Oct 22, 2019
Messages
3,641
(Are you able to take screenshots? It's easier to see. And also there's more network settings under the Jail properties.)

What about logging into app.plex.tv to review your server's settings?
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Sorry, no there is only 1 page for the plex jail network settings, then it goes Next to Custom properties, unless I am looking at the wrong thing. there is nothing below what the screenshot shows.

In app.plex.tv, the media folder is there and showing files.
In the network settings of the above, again most of them are blank with empty boxes. The only box which has something in is the one for 'Preferred Network device', and is set to ANY
 
Last edited:

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Yes it does|! Very strange.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
No difference, as that is how I have it: unhidden
 
Joined
Oct 22, 2019
Messages
3,641
So you're using the same exact advanced settings as in my own screenshot?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Just to rule out one possible area of misconfiguration, what is output of following two commands:
```
getfacl /mnt/WinShare/
getfacl /mnt/WinShare/Media
```
 
Joined
Oct 22, 2019
Messages
3,641
Just to rule out one possible area of misconfiguration, what is output of following two commands:
```
getfacl /mnt/WinShare/
getfacl /mnt/WinShare/Media
```

The reason I don't think it's permission issues, per se, is because of this:
So when using app.plex.tv and logging in, it works as normal?
Yes it does! Very strange.

I had this issue before, but I forget the exact underlying problem. I had to change/disable a setting for the Plex server (and I think add a custom entry in my router's dnsmasq config.)

Regardless, using the URL app.plex.tv to login and then connect to the local server always works every time: media is available and can be streamed to local devices

(I think Plex is more complex than it needs to be. There's too much remote stuff going on, and making it a near requirement to register an "account" with their service, when most people use Plex solely for local streaming.)
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
The reason I don't think it's permission issues, per se, is because of this:



I had this issue before, but I forget the exact underlying problem. I had to change/disable a setting for the Plex server (and I think add a custom entry in my router's dnsmasq config.)

Regardless, using the URL app.plex.tv to login and then connect to the local server always works every time: media is available and can be streamed to local devices

(I think Plex is more complex than it needs to be. There's too much remote stuff going on, and making it a near requirement to register an "account" with their service, when most people use Plex solely for local streaming.)
Oh, yes, glossed over that. That indeed rules out permissions issues.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
Just to rule out one possible area of misconfiguration, what is output of following two commands:
```
getfacl /mnt/WinShare/
getfacl /mnt/WinShare/Media
```
root@freenas:~ # getfacl /mnt/WinShare/
# file: /mnt/WinShare/
# owner: root
# group: nobody
owner@:rwxpDdaARWcCos:fd-----:allow
group@:rwxpDdaARWcCos:fd-----:allow
everyone@:--------------:fd-----:allow
root@freenas:~ # getfacl /mnt/WinShare/Media
# file: /mnt/WinShare/Media
# owner: rob-Z97
group@:rwxpDdaARWcCos:fd-----:allow
everyone@:--------------:fd-----:allow
root@freenas:~ # getfacl /mnt/WinShare/Media
# file: /mnt/WinShare/Media
# owner: rob-Z97

When I saw that /mnt/WinShare was owned by root , I thought I could or should change that to rob-Z97, but it wasn't possible from the Pools section so I changed it in the shell. Amazingly that seems to have solved the problem, although I did uninstall the Plex plugin and installed again.
Thanks
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Code:
# file: /mnt/WinShare/
# owner: root
# group: nobody
owner@:rwxpDdaARWcCos:fd-----:allow
group@:rwxpDdaARWcCos:fd-----:allow
everyone@:--------------:fd-----:allow

I'm not sure how you did this, but this is the equivalent of 770 on /mnt/WinShare. There are some unfortunately prominent youtube videos where influencers advise doing this (out of lack of understanding how permissions work). The lack of "execute" for others will basically break many aspects of jails (because non-root processes will be denied access to your data).

setfacl -b /mnt/WinShare/
chmod 755 /mnt/WinShare/

These sorts of issues are one of reasons why we don't allow users to edit permissions on pool mountpoints.
 
Last edited:

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I'm not sure how I did it either, but as I've been using FreeNAS since version 8 something, maybe when I setup my shares etc, it was done then. Of course I was as green as grass at the time with FreeNAS!

I ran the 2 commands in a TrueNAS shell, but I still was not able to edit the permissions of the said folder.
Thanks again.
 
Top