Plex jail/vm, unable to "Claim server"

Status
Not open for further replies.

Finnless

Dabbler
Joined
Apr 1, 2016
Messages
29
One more piece of information...

I created a warden jail as described here:
https://forums.freenas.org/index.ph...to-install-plex-in-a-freenas-11-0-jail.19412/

Same original problem described at the top of this thread for the warden jail: everything appears to be working from a networking standpoint (can ping the jail, can point the router from within the jail, Plex web interface appears after installing plex), but the Plex server can't be claimed.

Then as a test, I went to the Freenas web interface -> Jails -> Edit jail -> Advanced Mode and unchecked the VIMAGE box for this warden jail running Plex. Immediately able to claim the server (with the side effect that the FreeNAS web gui appears at the plex IP address as well as as its own address).

An issue with VIMAGE/VNET for both warden and iocage? I don't know enough to appreciate all the consequences of unchecking that box.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Using a jail without VIMAGE means the jail is sharing its ip address with the host system. This is the correct behavior for a FreeBSD jail. For Plex to run properly, you want to implement a fully independent stack within the jail. To do this, you must have VIMAGE selected.

Since you have the same issue with both Warden and iocage and you can claim the server when VIMAGE is disabled, would seem to indicate that something in your network configuration is not quite right.

I would destroy your jail and start over, using standard iocage commands. Avoid the json file, ca_root_nss, and all the other unnecessary things.

As an experiment, I just created a new jail and installed Plex manually. When it came time to log in and claim the server, I was not able to log in using FireFox browser. However, it did work OK with Microsoft Edge - so I think there may be some incompatibility between Plex and Firefox.

Edit: I normally restrict cookies in Firefox to sites I trust and know. When I enabled all cookies in Firefox, everything worked as expected.

Here are the steps to manually create an iocage jail under FreeNAS 11.1 and install Plex. This is not a complete guide to iocage. This is to address the original poster's problem...

# iocage activate (only necessary the first time an iocage jail is created)
# iocage fetch (select 11.1-RELEASE, it should be the default choice)
# iocage create -r 11.1-RELEASE --name JAILNAME boot=on (Where JAILNAME = your desired jail name)

At this point, you have created a Shared IP jail which shares the network interface with the system. For Plex, you need to configure a VNET networking stack and convert the jail to a VNET jail.

# iocage stop JAILNAME
# iocage set vnet=on JAILNAME
# iocage set defaultrouter=192.168.0.1 JAILNAME (Where this is the IP address of your router)
# iocage set ip4_addr="vnet0|192.168.0.17/24" JAILNAME (Where you set the desired IP address for Plex, in the form of "vnet0|xxx.xxx.xxx.xxx/24")
# iocage start JAILNAME

To test the networking stack, you can log into the jail and ping an address:

# iocage console JAILNAME
# ping 192.168.1.1 (the default gateway, for example)

To install Plexpass (you must be logged in to the jail)
# pkg install plexmediaserver-plexpass

There will be a message from the system "The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]:"

Enter yes and then things began to happen. Follow the instructions from there.

Good luck.
 
Last edited:

Finnless

Dabbler
Joined
Apr 1, 2016
Messages
29
Here are the steps to manually create an iocage jail under FreeNAS 11.1 and install Plex. This is not a complete guide to iocage. This is to address the original poster's problem...

I had already tried essentially those steps without success.

Code:
iocage create -n "plex" -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.17/24" defaultrouter="192.168.0.1" vnet="on"
iocage start plex


I have repeated it exactly as you suggested anyway so you can see the results, starting with the tail end of the output from the iocage fetch command.

Code:
WARNING: FreeBSD 11.1-RELEASE HAS PASSED ITS END-OF-LIFE DATE.
Any security issues discovered after Sun Sep 30 20:00:00 EDT 2018
will not have been corrected.
src component not installed, skipped
Installing updates... done.
[root@freenas ~]# iocage create -r 11.1-RELEASE --name TESTJAIL boot=on
TESTJAIL successfully created!
* Starting TESTJAIL
  + Started OK
  + Starting services OK
[root@freenas ~]# iocage stop TESTJAIL
* Stopping TESTJAIL
  + Running prestop OK
  + Stopping services OK
  + Removing jail process OK
  + Running poststop OK
[root@freenas ~]# iocage set vnet=on TESTJAIL
Property: vnet has been updated to on
[root@freenas ~]# iocage set defaultrouter=192.168.0.1 TESTJAIL
Property: defaultrouter has been updated to 192.168.0.1
[root@freenas ~]# iocage set ip4_addr="vnet0|192.168.0.17/24" TESTJAIL
Property: ip4_addr has been updated to vnet0|192.168.0.17/24
[root@freenas ~]# iocage start TESTJAIL
* Starting TESTJAIL
  + Started OK
  + Configuring VNET OK
  + Starting services OK
[root@freenas ~]# iocage list
+-----+----------+-------+--------------+--------------+
| JID |   NAME   | STATE |   RELEASE	|	 IP4	  |
+=====+==========+=======+==============+==============+
| 4   | TESTJAIL | up	| 11.1-RELEASE | 192.168.0.17 |
+-----+----------+-------+--------------+--------------+
[root@freenas ~]# iocage console TESTJAIL
...
root@TESTJAIL:~ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
ping: sendto: Host is down
^C
--- 192.168.0.1 ping statistics ---
9 packets transmitted, 0 packets received, 100.0% packet loss


So there is clearly no network connectivity now. This is using 11.1-U6. Earlier, when I was back on 11.1, I had network connectivity (could ping out and the jail responded to pings) doing these steps but Plex was never able to claim the server, so something still wasn't quite right.

I suppose the complete lack of network connectivity under 11.1-U6 counts as progress since it takes Plex entirely out of the picture as the source of the problem.
 

Finnless

Dabbler
Joined
Apr 1, 2016
Messages
29
Could this be the problem?

https://redmine.ixsystems.com/issues/27780

As mentioned earlier, I have an Ubuntu VM running as well. Do I need manually destroy a bridge (bridge1?) and reassign the interfaces (tap0, igb0) to the other bridge?

Code:
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		ether 02:5a:e3:a7:5c:00
		nd6 options=1<PERFORMNUD>
		groups: bridge
		id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
		maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
		root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
bridge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		ether 02:5a:e3:a7:5c:01
		nd6 options=9<PERFORMNUD,IFDISABLED>
		groups: bridge
		id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
		maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
		root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
		member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 9 priority 128 path cost 2000000
		member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 1 priority 128 path cost 20000
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=80000<LINKSTATE>
		ether 00:bd:49:18:db:00
		hwaddr 00:bd:49:18:db:00
		nd6 options=1<PERFORMNUD>
		media: Ethernet autoselect
		status: active
		groups: tap
		Opened by PID 26424
 

Finnless

Dabbler
Joined
Apr 1, 2016
Messages
29
Used these commands

ifconfig bridge1 destroy
ifconfig bridge0 addm igb0

and iocage jails have network connectivity. Can ping into and out of them. Partial ifconfig output with that change above:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:5a:e3:a7:5c:00
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: vnet0:11 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 2000
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 7 priority 128 path cost 2000000
member: igb0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 20000
tap0: flags=8d43<UP,BROADCAST,RUNNING,PROMISC,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:bd:41:32:91:00
hwaddr 00:bd:41:32:91:00
nd6 options=1<PERFORMNUD>
media: Ethernet autoselect
status: active
groups: tap
Opened by PID 46760
vnet0:11: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: associated with jail: plex
options=8<VLAN_MTU>
ether 02:ff:60:14:fa:09
hwaddr 02:0d:90:00:08:0a
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair


Progress! Open a console in the jail, 'pkg install plexmediaserver-plexpass', and....get errors because there is a mismatch between the package 1102000 and running kernel 1101001??? Read another thread or few leading to here:

https://forums.freenas.org/index.ph...ge-jails-are-now-useless-what-do-we-do.70461/

<sighs, crosses fingers, says 'YES' to override>

Plex installs. Start up the service. Connect to the Plex web interface............

...........unable to claim server.

<opens web page, starts looking for a NUC to run a Plex server on>
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I actually made a point of creating a test jail just to make certain all the steps were configured correctly, so I know they work under a straightforward 11.1-U6 configuration. Granted, I don't have any VM's set up.

If you did exactly what I did, and have no network connectivity whatsoever, then I suspect something is hosed in your network or your network connection.

Good luck
 

Finnless

Dabbler
Joined
Apr 1, 2016
Messages
29
I actually made a point of creating a test jail just to make certain all the steps were configured correctly, so I know they work under a straightforward 11.1-U6 configuration. Granted, I don't have any VM's set up.

Without a VM running you wouldn't have hit Issue 27780. I can actually get network connectivity (successful pings) by following the suggestion in that bug report: destroying bridge1 and adding igb0 to bridge0 where the jail expects it to be.

Summarizing what I've learned:

1. Updating from 11.1 to 11.1-U6 breaks SMB shares in a bhyve Ubuntu VM unless you explicitly add the CIFS vers=2.1 to the command in the fstab file.
2. Plex doesn't like interfaces beginning with the letter "v"; iocage was update to change them to epair0b.
3. bhyve VMs and iocage jails don't play nice together with bridged interfaces in 11.1-U6.
4. The 11.1 version of FreeBSD now raises package incompatibility warnings (like when installing Plex) because it is no longer supported.

After working through all of that I still can't 'claim the server' through Plex. I guess something still isn't quite right in a way that isn't obvious. An issue with Plex? Freenas? Iocage? My network? Who knows? Not me.

Unless someone else has a suggestion I'm giving up.
 
Status
Not open for further replies.
Top