Assign static IP to plexjail

matclou

Dabbler
Joined
Feb 15, 2020
Messages
33
Hello everybody,

we already had this topic here in the forum, but that didn't help me so far. Maybe you can help!

I installed Plex via the plugin menu and created a jail for it. The IP assignment currently works via DHCP, but I would like to use a statistical IP address. This is not as easy as I thought.

If I stop and edit the jail and then disable DHCP I have to set settings for:

IPv4 interface
IPv4 address
IPv4 Netmask
IPv4 Default Router

1583160418713.png

When I input/ select the following:

IPv4 interface - vnet0:bridge0
IPv4 address: 192.168.2.201 [e.g. -> my IP address of choice which is not in the DHCP range of my routter]
IPv4 Netmask - 24
IPv4 Default Router - auto

... and start the jail, the following errror message appears:

plexjail: [EFAULT] Stopped plexjail due to VNET failure


... by typing "iocage get all plexjail" into the shell I get the following output:

Code:
CONFIG_VERSION:26
allow_chflags:0
allow_mlock:0
allow_mount:0
allow_mount_devfs:0
allow_mount_fusefs:0
allow_mount_nullfs:0
allow_mount_procfs:0
allow_mount_tmpfs:0
allow_mount_zfs:0
allow_quotas:0
allow_raw_sockets:0
allow_set_hostname:1
allow_socket_af:0
allow_sysvipc:0
allow_tun:0
allow_vmm:0
assign_localhost:0
available:readonly
basejail:1
boot:1
bpf:1
children_max:0
comment:none
compression:lz4
compressratio:readonly
coredumpsize:off
count:1
cpuset:off
cputime:off
datasize:off
dedup:off
defaultrouter:auto
defaultrouter6:auto
depends:none
devfs_ruleset:5
dhcp:0
enforce_statfs:2
exec_clean:1
exec_created:/usr/bin/true
exec_fib:0
exec_jail_user:root
exec_poststart:/usr/bin/true
exec_poststop:/usr/bin/true
exec_prestart:/usr/bin/true
exec_prestop:/usr/bin/true
exec_start:/bin/sh /etc/rc
exec_stop:/bin/sh /etc/rc.shutdown
exec_system_jail_user:0
exec_system_user:root
exec_timeout:60
host_domainname:none
host_hostname:plexjail
host_hostuuid:plexjail
host_time:1
hostid:00000000-0000-0000-0000-ac1f6bd4b05e
hostid_strict_check:0
interfaces:vnet0:bridge0
ip4:new
ip4_addr:vnet0:bridge0|192.168.2.201/24
ip4_saddrsel:1
ip6:new
ip6_addr:none
ip6_saddrsel:1
ip_hostname:0
jail_zfs:0
jail_zfs_dataset:iocage/jails/plexjail/data
jail_zfs_mountpoint:none
last_started:2020-03-02 14:41:06
localhost_ip:none
login_flags:-f root
mac_prefix:ac1f6b
maxproc:off
memorylocked:off
memoryuse:off
mount_devfs:1
mount_fdescfs:1
mount_linprocfs:0
mount_procfs:0
mountpoint:readonly
msgqqueued:off
msgqsize:off
nat:0
nat_backend:ipfw
nat_forwards:none
nat_interface:none
nat_prefix:172.16
nmsgq:off
notes:none
nsem:off
nsemop:off
nshm:off
nthr:off
openfiles:off
origin:readonly
owner:root
pcpu:off
plugin_name:plexmediaserver
plugin_repository:https://github.com/freenas/iocage-ix-plugins.git
priority:99
pseudoterminals:off
quota:none
readbps:off
readiops:off
release:11.3-RELEASE-p6
reservation:none
resolver:/etc/resolv.conf
rlimits:off
rtsold:0
securelevel:2
shmsize:off
stacksize:off
state:down
stop_timeout:30
swapuse:off
sync_state:none
sync_target:none
sync_tgt_zpool:none
sysvmsg:new
sysvsem:new
sysvshm:new
template:0
type:pluginv2
used:readonly
vmemoryuse:off
vnet:1
vnet0_mac:ac1f6bb4ff07 ac1f6bb4ff08
vnet1_mac:none
vnet2_mac:none
vnet3_mac:none
vnet_default_interface:auto
vnet_interfaces:none
wallclock:off
writebps:off
writeiops:off


Does anyone have an idea what wents wrong? I am working with FreeNAS 11.3 ...
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
If DHCP is working, could you instead set an IP reservation on your router or wherever DHCP is handing out IP assignments?
 

matclou

Dabbler
Joined
Feb 15, 2020
Messages
33
Hi fracai, unfortunately not - our router (Speedport 724V from Deutsche Telekom) is very rudimentary and you can't set something like that there.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Ugh, I'd replace the router ;-)

Unfortunately I'm out of my depth at this point as I use DHCP for everything and what you have posted looks sensible to me. Sorry I can't suggest anything further.

Maybe try creating a new jail that you configure statically from the start? Are there any other errors around that VNET error? A stack trace maybe?
 

hervon

Patron
Joined
Apr 23, 2012
Messages
353
Leave "IPv4 interface" blank. I had the same issue this week and it cleared my problem.
 
Joined
Jul 2, 2019
Messages
648
There appears to be a bug in 11.3. I posted my similar issue on the Jira site and it was closed as being a duplicate. Should be fixed in 11.3-U2.

Edit: see NAS-104963
 

matclou

Dabbler
Joined
Feb 15, 2020
Messages
33
Thanks for your ideas, hervon & Fredda! I will try them both at the weekend and report about it.
And in case it's a bug, I'll wait for the new version - or follow fracais advice: ;-)
Ugh, I'd replace the router ;-)
 

sdgenxr

Contributor
Joined
Sep 4, 2014
Messages
131
Leaving the "IPv4 interface" blank worked for me.

Thanks!
 
Top