Plex server issues

Status
Not open for further replies.

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
I have Plex running in a (warden) jail. Yesterday, it worked fine. Today, I am not able to start the server. The only thing that changed between now and then is the creation of an IoCage jail. I haven't read anything to indicate such, but is it not possible to have warden and iocage jails coexist?

Code:
root@plexjail:/ # root@plexjail:/ # service plexmediaserver stop
root@plexjail:/: Command not found.
root@plexjail:/ # plexmediaserver not running? (check /var/run/plex/plex.pid).
Badly placed ()'s.
root@plexjail:/ # service plexmediaserver start
Starting plexmediaserver.
login class 'daemon' non-existent, using default
su: pam_start: system error
/usr/local/etc/rc.d/plexmediaserver: WARNING: failed to start plexmediaserver
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
hardware specs?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Both warden and iocage jails can coexist, I have some of each currently running on my server.

Might be time to switch to iocage for your plex installation, you're going to need to eventually anyway.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
Both warden and iocage jails can coexist, I have some of each currently running on my server.

Might be time to switch to iocage for your plex installation, you're going to need to eventually anyway.
I think that's what I will do. Do you know if Plex manages everything like previously watched videos and preferences in a single database? I'd like to just roll out an iocage jail from scratch and import the database if that's possible.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Well you've got 2 choices here. You can install plex in a new jail and copy the metadata and database over to the new jail or create a dataset and mount it to the plex jail and copy your metadata and database over to the mounted dataset. The advantage of the latter option is if your jail breaks again at some point all you will have to do it re create it and mount the dataset containing your database and your off and running again.

I recently switched Plex over to iocage and it took about a half hour to copy my metadata and database over to the new jail and my library isn't too big.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
Well you've got 2 choices here. You can install plex in a new jail and copy the metadata and database over to the new jail or create a dataset and mount it to the plex jail and copy your metadata and database over to the mounted dataset. The advantage of the latter option is if your jail breaks again at some point all you will have to do it re create it and mount the dataset containing your database and your off and running again.

I recently switched Plex over to iocage and it took about a half hour to copy my metadata and database over to the new jail and my library isn't too big.
Do you know what the mount points would need to be inside the Plex jail? Having a separate dataset does seem like the better option.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
After you create the dataset for your plex data you'll need to copy the metedata over to it. Once that's done and before you start the plex service on your new jail mount the dataset with your metedatato the jail.

iocage fstab -a your_plex_jail /mnt/your_pool/your_plex_dataset "/usr/local/plexdata/Plex Media Server" nullfs rw 0 0

Edit: fix improper quotes.
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Rather than simply accepting that it's suddenly broken, and using it as an opportunity to change your jails paradigm, may I ask: Do we have any idea what has gone wrong in the first place? We're not learning anything as a support community if we simply say "LOL it's broken but you should be switching to X anyway lololol".

Also, I'm intellectual curious as to what's happened.

:)
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Also, I'm intellectual curious as to what's happened.
Same here. But when there is going to inevitably be a switch to iocage is worth the time and effort to troubleshoot the problem? Or is that time and effort better spent switching the jail to iocage? I think the latter hence my suggestion.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Same here. But when there is going to inevitably be a switch to iocage is worth the time and effort to troubleshoot the problem? Or is that time and effort better spent switching the jail to iocage? I think the latter hence my suggestion.
I like to think that what differentiates the BSD communities from the Linux communities is our interest in understanding the "why"'s with as much vigor as we understand the "how"s.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
After you create the dataset for your plex data you'll need to copy the metedata over to it. Once that's done and before you start the plex service on your new jail mount the dataset with your metedatato the jail.

iocage fstab -a your_plex_jail "/mnt/your_pool/your_plex_dataset /usr/local/plexdata/Plex Media Server" nullfs rw 0 0

Don't I need to account for spaces in some way shape or form in fstab entries?

My fstab entry, based on my specs is

Code:
iocage fstab -a plex "/mnt/MediaVolume/plexdata /usr/local/plexdata/Plex Media Server nullfs rw 0 0"


I get the error messsage

Code:
The destination's mountpoint exceeds 88 characters, this may cause failure!
Successfully added mount to plex's fstab
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
	sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
	return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
	rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
	return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
	return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
	return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/fstab.py", line 126, in cli
	add_path=add_path, header=header)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 1060, in fstab
	exit_on_error=self.exit_on_error)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 65, in __init__
	self.__fstab_parse__()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 75, in __fstab_parse__
	self.__fstab_mount__()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_fstab.py", line 165, in __fstab_mount__
	raise RuntimeError(f"{stderr_data.decode('utf-8')}")
RuntimeError: mount_nullfs: /mnt/MediaVolume/plexdata : No such file or directory
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You moved the end quotes to the end of the command. But it doesn't matter I had the quotes in the wrong place to begin with, I edited my previous post with the correct location.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
You moved the end quotes to the end of the command. But it doesn't matter I had the quotes in the wrong place to begin with, I edited my previous post with the correct location.

Doh, looks like it still doesn't work.

Code:
iocage fstab -a plex /mnt/MediaVolume/plexdata "/usr/local/plexdata/Plex Media Server" nullfs rw 0 0 


Returns


Code:
root@freenas:~ # iocage restart plex
* Stopping plex
  + Running prestop OK
  + Stopping services OK
  + Removing jail process OK
  + Running poststop OK
* Starting plex
  + Start FAILED
jail: mount.fstab: /mnt/RangelVolume/iocage/jails/plex/root/usr/local/plexdata/Plex: No such file or directory



Obviously, in this instance iocage is activated on a different volume.... I'd assume that has something to do with it, but I don't see why that would be an issue.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Looks like a leftover mount point from a failed attempt. Run the following and try again.

iocage fstab -r plex /mnt/RangelVolume/iocage/jails/plex/root/usr/local/plexdata/Plex
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
Looks like a leftover mount point from a failed attempt. Run the following and try again.

iocage fstab -r plex /mnt/RangelVolume/iocage/jails/plex/root/usr/local/plexdata/Plex

No dice on that... It looks like the fstab entry is mounting to /mnt/...../plexdata/Plex instead of /mnt/..../plexdata/Plex Media Server
 

silverback

Contributor
Joined
Jun 26, 2016
Messages
134
I have had to use quotations around directory locations that have spaces in the name so, “Plex Media Server” in this case. Maybe?
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
I have had to use quotations around directory locations that have spaces in the name so, “Plex Media Server” in this case. Maybe?

No luck there, either. I'm not at home, but if I remember correctly, that gives me "incorrect fstab entry" or something to that effect.
 

flahiker76

Cadet
Joined
Jun 9, 2018
Messages
5
I had a similar problem 2 weeks ago with Plex. What I did was created a new jail and installed the plexmediaserver-plexpass package. I have a separate dataset for my media and link it up in the storage tab in my jail.


To see the mount inside Plex, you want to map your dataset to /usr/local/plexdata-plexpass/Plex Media Server . Just create an empty directory (eg our_media) and create the mount in there. Works great for Library creations in the tool.
 
Status
Not open for further replies.
Top