Multiple problems with vnet in jails

jeberhardt

Cadet
Joined
Feb 3, 2020
Messages
2
Hi,

my name is Jürgen and I am quite new to FreeNAS. I'm using FreeNAS-11.3-RELEASE
My network setup looks like this:
bridge0 with member lagg0 --> internal net
bridge1 with member lagg1 --> DMZ net

I have the following problems with vnet in jails and couldn't find help in the documentation and the web:
1. MAC addresses are no longer automatically generated
2. Other vnet beside vnet0 are not generated and/or working
3. I can't create two or more interfaces. As soon as I select the IPv4 interface from the drop down menu in the jail settings nothing works anymore. The command iocage -D start nextcloud shows me the following:

Grabbing IPv4 default route Default IPv4 Gateway: 10.0.0.1 Grabbing IPv6 default route No default gateway found for ipv6. Default IPv6 Gateway: none * Starting nextcloud ioc-nextcloud: run command: /sbin/mount -t devfs -oruleset=6 . /mnt/share/iocage/jails/nextcloud/root/dev ioc-nextcloud: run command: /sbin/mount -t fdescfs . /mnt/share/iocage/jails/nextcloud/root/dev/fd ioc-nextcloud: run command: /usr/bin/true ioc-nextcloud: jail_set(JAIL_CREATE) name=ioc-nextcloud vnet=new allow.set_hostname=true sysvmsg=new sysvsem=new sysvshm=new host.domainname=none host.hostname=nextcloud path=/mnt/share/iocage/jails/nextcloud/root securelevel=2 host.hostuuid=nextcloud devfs_ruleset=6 enforce_statfs=2 children.max=0 persist ioc-nextcloud: created + Started OK + Using devfs_ruleset: 6 Setting default route 10.0.0.1 + Configuring VNET FAILED route: writing to routing socket: Network is unreachable add net default: gateway 10.0.0.1 fib 0: Network is unreachable ioc-nextcloud: removed ioc-nextcloud: run command: /sbin/umount /mnt/share/iocage/jails/nextcloud/root/dev/fd ioc-nextcloud: run command: /sbin/umount /mnt/share/iocage/jails/nextcloud/root/dev Stopped nextcloud due to VNET failure

As soon as I remove the selection of IPv4 interfaces the jail works again but only with one address. What I want to do is to give the nextcloud server two interfaces to connect to the mysql server in another subnet. Existing jails work without problems even after restarting the jail or FreeNAS.

Here is the config for the jail:
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:0 boot:0 bpf:1 children_max:0 cloned_release:11.3-RELEASE 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:4 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:nextcloud host_hostuuid:nextcloud host_time:1 hostid:a88fcb34-0a0f-11ea-9f45-ac1f6b483830 hostid_strict_check:0 interfaces:vnet0:bridge0,vnet1:bridge1 ip4:new ip4_addr:vnet0:bridge0|10.0.0.203/24 ip4_saddrsel:1 ip6:new ip6_addr:none ip6_saddrsel:1 ip_hostname:0 jail_zfs:0 jail_zfs_dataset:iocage/jails/nextcloud/data jail_zfs_mountpoint:none last_started:2020-02-03 17:09:23 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:none plugin_repository:none priority:99 pseudoterminals:off quota:none readbps:off readiops:off release:11.3-RELEASE-p5 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:jail used:readonly vmemoryuse:off vnet:1 vnet0_mac:ac1f6bbab581 ac1f6bbab582 vnet1_mac: vnet2_mac:none vnet3_mac:none vnet_default_interface:auto vnet_interfaces:none wallclock:off writebps:off writeiops:off

Best regards

Jürgen
 

jeberhardt

Cadet
Joined
Feb 3, 2020
Messages
2
I got following error message right now when using the iocage command:

Code:
root@freenas[/tmp/iocage_debug]# iocage --help
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 83, in <module>
    refresh()
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 73, in refresh
    if not Git.refresh(path=path):
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 227, in refresh
    cls().version()
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 692, in execute
    cwd = self._working_dir or os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 6, in <module>
    from iocage_cli import cli
  File "/usr/local/lib/python3.7/site-packages/iocage_cli/__init__.py", line 38, in <module>
    import iocage_lib.ioc_check as ioc_check
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_check.py", line 29, in <module>
    import iocage_lib.ioc_common
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 44, in <module>
    import iocage_lib.ioc_exec
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_exec.py", line 28, in <module>
    import iocage_lib.ioc_json
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 38, in <module>
    import iocage_lib.ioc_create
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_create.py", line 35, in <module>
    import iocage_lib.ioc_fstab
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_fstab.py", line 34, in <module>
    import iocage_lib.ioc_list
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_list.py", line 35, in <module>
    import iocage_lib.ioc_plugin
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_plugin.py", line 33, in <module>
    import git
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 85, in <module>
    raise ImportError('Failed to initialize: {0}'.format(exc))
ImportError: Failed to initialize: [Errno 2] No such file or directory
root@freenas[/tmp/iocage_debug]# iocage --help
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 83, in <module>
    refresh()
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 73, in refresh
    if not Git.refresh(path=path):
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 227, in refresh
    cls().version()
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 548, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 1014, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/usr/local/lib/python3.7/site-packages/git/cmd.py", line 692, in execute
    cwd = self._working_dir or os.getcwd()
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 6, in <module>
    from iocage_cli import cli
  File "/usr/local/lib/python3.7/site-packages/iocage_cli/__init__.py", line 38, in <module>
    import iocage_lib.ioc_check as ioc_check
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_check.py", line 29, in <module>
    import iocage_lib.ioc_common
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 44, in <module>
    import iocage_lib.ioc_exec
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_exec.py", line 28, in <module>
    import iocage_lib.ioc_json
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 38, in <module>
    import iocage_lib.ioc_create
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_create.py", line 35, in <module>
    import iocage_lib.ioc_fstab
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_fstab.py", line 34, in <module>
    import iocage_lib.ioc_list
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_list.py", line 35, in <module>
    import iocage_lib.ioc_plugin
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_plugin.py", line 33, in <module>
    import git
  File "/usr/local/lib/python3.7/site-packages/git/__init__.py", line 85, in <module>
    raise ImportError('Failed to initialize: {0}'.format(exc))
ImportError: Failed to initialize: [Errno 2] No such file or directory
root@freenas[/tmp/iocage_debug]#                                                             
*** FINAL System shutdown message from root@freenas.local ***
 

Darren David

Explorer
Joined
Feb 27, 2014
Messages
54
I'm getting the same issue with iocage on a recently upgraded server. Were you able to figure out a solution?
 
Top