TrueNAS Scale - cannot deploy Plex

unholyeyebrows

Explorer
Joined
Apr 19, 2012
Messages
55
Hi

I have moved from Core to Scale and am struggling to get Plex to run as an app. It seems to be stuck in 'deploying' state and never completes. Looking at the logs I see:

2022-04-09 8:40:43
error determining status: rpc error: code = Unknown desc = Error: No such container: 3ee3d6e219dd06cffc0fd3a1780a3247cecd4ba52a25790308b93dc7db64cfd9

I also sometimes see:

2022-04-09 8:23:52
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create a sandbox for pod "plexmediaserver-647c699976-gdgkk": operation timeout: context deadline exceeded

In the App logs I also see:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"container \"plex\" in pod \"plexmediaserver-647c699976-gdgkk\" is waiting to start: ContainerCreating","reason":"BadRequest","code":400}

I have configured everything as follows:

User set-up on TrueNAS host:
plex
userID and groupID set to 1000

Datasets on host:
/mnt/disk0/plex (with sub-folders config, transcode, and data) - all owned by plex:plex and 770 access
/mnt/disk0/media (for my media collection) - owned by plex:plex and 777 access

I then set-up the plex app with the following options:

Name: plexmediaserver
Plexpass: Tick
Plex claim token: I enter this
Environment variables:
Name: PUID
Value: 1000
Name: GUID
Value: 1000
Timezone: Europe/London
Configure host network: Tick (this is a guess - not sure if this should be set!)
Plex port: 32400
Plex transcode volume:
/mnt/disk0/plex/transcode
Plex Data volume:
/mnt/disk0/plex/data
Plex config volume:
/mnt/disk0/plex/config
Configure plex extra host path volumes:
Mount path in pod: /plexmedia
Host path: /mnt/disk0/media
Read only: tick
Then the rest of the config is set to default options.

My kubernetes settings are as follows:

NodeIP: 0.0.0.0
Route v4 interface: eno1 (this is the host Ethernet port)
Route v4 Gateway: 192.168.0.1 (this is the default gateway of my home network)
All the rest of the options are defaults.

I have tried deleting and re-adding the app, and also deleting and re-building the ix-applications dataset. Whatever I do I cannot get the app to finish deploying.

if anyone can help I would be most grateful!

Thanks
Nick
 
Last edited:

unholyeyebrows

Explorer
Joined
Apr 19, 2012
Messages
55
After a reboot I get:

Failed to start kubernetes cluster for Applications: Cannot connect to host 127.0.0.1:6443 ssl:default [Connect call failed ('127.0.0.1', 6443)]​

 

unholyeyebrows

Explorer
Joined
Apr 19, 2012
Messages
55
I'm starting to conclude apps just don't work on a fresh install of Scale 22.0.2.1. Looking at the release notes for 22.0.2.0 these two bugs were fixed but sound strangely similar to my problem:

[NAS-113630] - Kubernetes will not start on fresh install
[NAS-114667] - SCALE Nightlies - Failed to start kubernetes cluster for Applications

Is anyone else either seeing the same problems as I or instead been successful in installing apps, especially on a clean install? I have tried Plex and Nextcloud from both the official and Truecharts repos and nothing ever deploys.
 

DaSnipe

Explorer
Joined
Jun 26, 2021
Messages
86
Apps def work but there's still some people getting issues with their kubernutes so never a bad idea to submit bug reports to fix things.
 

scubawags

Cadet
Joined
Jan 13, 2023
Messages
1
I ran into the same problem. I found that turning off SMB file sharing to the folder contining my media, Plex deployed as advertised. I was able to turn SMB sharing back on once Plex deployed.
 

Whe3zy

Dabbler
Joined
Sep 4, 2020
Messages
21
Anyone know if it matters what pool the App is installed to vs the pool the media resides? Can the plex app be on one pool of disks, while the media resides on a different Disk of pool?
 
Joined
Jan 20, 2023
Messages
1
I ran into the same problem. I found that turning off SMB file sharing to the folder contining my media, Plex deployed as advertised. I was able to turn SMB sharing back on once Plex deployed.
As someone new to trueNAS does this mean I have to stop plex, turn on SMB, add files to the folder, then turn off SMB again to redeploy?
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
no, with the latest update, iX has implemented a hostpath validation. so if you use the same path for smb share and hostpath the app wont deploy.
you can either disable the check, but that's not really recommended or change the structure of your datasets.
e.g.
smb /mnt/yourpool/yourdataset
hostpath /mnt/yourpool/yourdataset/media

if you set permissions correctly your apps will deploy and you can still acces the child datasets via smb.
 

kamalov

Dabbler
Joined
Dec 14, 2022
Messages
43
no, with the latest update, iX has implemented a hostpath validation. so if you use the same path for smb share and hostpath the app wont deploy.
you can either disable the check, but that's not really recommended or change the structure of your datasets.
e.g.
smb /mnt/yourpool/yourdataset
hostpath /mnt/yourpool/yourdataset/media

if you set permissions correctly your apps will deploy and you can still acces the child datasets via smb.
how do i do that? can u be more specific plz?
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
When i'm back from work this evening i'll try to write up some kind of tutorial.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
how do i do that? can u be more specific plz?

So here we go.

For simplicity reasons i will call the pool "tank", change this for whatever your pool is called.
On this pool we'll create a Dataset called "media".
Inside this "media" Dataset we'll create another Datased called "movies"

tank
I->media
I->movies

the path for the media Dataset is /mnt/tank/media
the path for the movies Dataset is /mnt/tank/media/movies


The smb part:
When you create the smb share use the first path, so: /mnt/tank/media

Create a user you want to use to access the smb share and edit the permissions of the Datasets so you user also has access to the movies Dataset.

you can acccess the smb at \\yourtruenasip\media from the windows explorer

Copy your movies inside the smb share.

the app part for plex:

when setting up or editing plex you can add additional storage as a hostpath

the path on the machine is: /mnt/tank/media/movies
Inside my plex app i mapped it to /media, and when adding a Media library in the plex setup i chose media as the folder plex should look for my movies.

You must know which user runs your app. For Truecharts the user is 568 or "apps"
For the official app and the big blue launch docker button i dont know the users, but you can see which user runs the app when you edit it.

If you've found out which user runs the app you have to give that user permissions to access both Dataset. Without permissions the app can "see" the Dataset, but when setting up the Media library inside plex the movies will be greyed out and not accessible.

I hope this was somewhat understandable
 

oncdoc

Dabbler
Joined
Dec 19, 2022
Messages
46
I want to thank you for the time to write that up. It was very educational and helpful for me.
 
Top