Plex Media Server (PlexPass) vs 11.2-U3

Mark Holtz

Contributor
Joined
Feb 3, 2015
Messages
124
I'll state up front, some of this is my fault. I moved halfway across the country, and had to reset my FreeNAS server to some new IP space. I have a working Plex distro in the legacy 11.1, and unintentionally deleted it. So, I have to reset Plex under a new jail instance, and have been encountering issues. Maybe it's me, maybe it's a defect. I don't know.

I have used this video as a guide:

The configuration is as follows:
  • FreeNAS 11.2-U3 (hardware config is detailed here). The U3 patch was installed this morning.
  • Plex Media Server (PlexPass) 1.14.1.5488 from the PlugIns interface. I have the Lifetime subscription.
  • Arris TR4400 Gateway
  • Plex Media Mount Point: /mnt/pool/plex
My home IP space is configured as follows:
  • Gateway: 192.168.1.1
  • Static IP Space: 192.168.1.2-192.168.1.9
    • FreeNAS Server: 192.168.1.2
    • Plex Server: 192.168.1.3 (eventually)
    • Transmission: 192.168.1.4
    • Unused: 192.168.1.5-192.168.1.8
    • Printer: 192.168.1.9
  • DHCP Space: 192.168.1.10-192.168.1.254
So, I have blown away and attempted to install Plex several times, and removed the servers through the plex.tv link. Here is the documentation on the latest install process:

Step 1: Install the Plex plugin. For now, I'm going to use DHCP. The Plug-In is successful:
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 20-45-12.png


Step 2: Login via Management and set up the server. Since drive mapping is not yet set up, I don't set up any libraries. Thus, the media server error is expected.
Plex_-_Google_Chrome 2019-03-29 20-49-01.png

Step 3: Shut down the Jail and add the mount point:
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 20-53-38.png FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 20-55-03.png

Step 4: Restart the Jail and get the following RuntimeError:
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 20-56-03.png

Code:
Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 609, in start
    iocage.start()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1663, in start
    callback=self.callback
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 66, in __init__
    self.__start_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 401, in __start_jail__
    silent=self.silent)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 90, in logit
    _callback(content, exception)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
    raise callback_exception(message)
RuntimeError: mount: /mnt/pool/plex: Operation not supported by device
jail: /sbin/mount -t Media -o Server/Fezzik /mnt/pool/plex /mnt/pool/iocage/jails/plex/root/Plex: failed

"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1141, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1078, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
    job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError: mount: /mnt/pool/plex: Operation not supported by device
jail: /sbin/mount -t Media -o Server/Fezzik /mnt/pool/plex /mnt/pool/iocage/jails/plex/root/Plex: failed


I'm seeing a partial problem already. In the iocage, "Plex Media Server" has spaces, and the command isn't in quotes. Why?

Step 5. Since this is a space issue, I will remap to the media directory instead as a workaround. Instead I get this:
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 21-03-46.png
See 2019-03-29 21-01-03.zip attached to this message for a MP4 recording.

Step 6. Take two. I will remap to the media directory instead.
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 21-07-03.png

Step 7. I attempt to start up the Plex jail again and get the following:
FreeNAS_-_192.168.1.2_-_Google_Chrome 2019-03-29 21-08-56.png

Code:
Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 609, in start
    iocage.start()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1663, in start
    callback=self.callback
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 66, in __init__
    self.__start_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 491, in __start_jail__
    _callback=self.callback)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 90, in logit
    _callback(content, exception)
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
    raise callback_exception(message)
RuntimeError:
Stopped plex due to VNET failure
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1141, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1078, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
    job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
RuntimeError:
Stopped plex due to VNET failure


Sigh.... I must not been kind to someone during the move. I miss my Plex server.
 

Attachments

  • 2019-03-29 21-01-03.zip
    129.4 KB · Views: 315

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Well done for testing a corner case, finding a bug and reporting it!

The mount point I’m using ... and that is probably most common ... is media/ in the root of the plugin jail. That way, there are no spaces. Also, subdirectories have no spaces: Movies, TV, Music, Photos, etc, instead of “Really Weird Movies”, “Daytime TV”, “Music That My Neighbors Would Hate”.

Good find though!
 

Nvious1

Explorer
Joined
Jul 12, 2018
Messages
67
I just reloaded my plexpass install this morning cause I broke the plugin forcing an early plex update. Here are the steps I used to setup mine as a straight jail.

Key notes:
  • I force my metadata location to be located in a different dataset and mount it as /config. This way I can blow away the jail and still keep all my stuff. Dataset is called apps with a child-dataset called plex.
    • For this setup, you need to either use the media user or I created a plex user and group with uid/gid 972 to match inside the jail. This account hows the plex dataset.
  • I mount my media as /storage for path simplicity.
  • I build my jail via command lines cause I just don't trust the gui as much.
  • This will build you with DHCP and the jail name "plex". Execute commands from the Freenas console.
Code:
#plex iocage jail creation script
echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss","nano"]}' > /tmp/pkg.json
iocage create -n "plex" -p /tmp/pkg.json -r 11.2-RELEASE vnet="on" bpf="yes" dhcp="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage exec plex "mkdir /config"
iocage exec plex "mkdir /storage"
iocage fstab -a plex /mnt/media01/apps/plex /config nullfs rw 0 0
iocage fstab -a plex /mnt/media01/media /storage nullfs rw 0 0
iocage exec plex chown -R plex:plex /config
iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
iocage exec plex service plexmediaserver_plexpass start
 

Mark Holtz

Contributor
Joined
Feb 3, 2015
Messages
124
I know that on 11.1 and earlier, you did the drive mapping to the media directory and all was well because of a different jail system. With 11.2 and later, we are dealing with IOCage, and that is a slightly different beast.

The problem I see is that, from the GUI, there is no way to change the jail directory name when installing the plug-in. Otherwise, I would have named it just "Plex" instead of "Plex Media Server". Of course, I remember the days of cryptic eight-character file names and three-character extensions, and I'm glad that you can have spaces in file names. As a programmer, you have to anticipate this. Again, corner case.... and something that I have to wait for a fix in U4..... in about two months.....
 

Velcade

Contributor
Joined
Mar 28, 2019
Messages
108
Well done for testing a corner case, finding a bug and reporting it!

The mount point I’m using ... and that is probably most common ... is media/ in the root of the plugin jail. That way, there are no spaces. Also, subdirectories have no spaces: Movies, TV, Music, Photos, etc, instead of “Really Weird Movies”, “Daytime TV”, “Music That My Neighbors Would Hate”.

Good find though!

I found this 'work around' too. Had to rename my 'TV Shows' folder to 'tv' then it worked just fine.
 
Joined
Apr 12, 2019
Messages
3
So I am totally new to this-- I just installed FreeNAS for the very first time today and I have the exact same issues as the OP does. Same error when I try to set a mount point and I select "Plex Media Server" with the spaces, and when I try to select a space-less alternative, I get the "VNET Failure" error. I don't know enough about all of this to discern from all of your replies whether or not there is a fix for it! Am I just doing something wrong or is this an issue with the Plex plugin? I have followed the FreeNAS Plex tutorial to a tee multiple times now, but the same thing still happens-- and what I really don't understand is that, if the issue is related to spaces in "Plex Media Server", why is he able to use that with no problem on the video?
 

technoholic

Dabbler
Joined
Oct 4, 2012
Messages
46
Wow, I have been up all night fighting this same Plex plugin problem. Glad to see its not me but hate to think I will be without my Plex server until U5!
 
Top