Cannot start jail after upgrade to TrueNAS

NealNye

Cadet
Joined
Mar 12, 2014
Messages
4
Yesterday I upgraded from FreeNAS-11.3-U5.1 --> TrueNAS 12.0-U6.1. Everything went smoothly, no complaints. However, I am unable to start one of my jails and I receive the following message.

<user>@freenas:~ % sudo iocage console sandbox2 -f
Password:
sandbox2 is not running, starting jail

Command output:
jexec: jail "ioc-sandbox2" not found
Command: login -p -f root failed!
Console failed!
The cause could be bad permissions for /mnt/tank/iocage/jails/sandbox2/root/usr/lib.

I have two jails of interest: plex and sandbox2. I upgraded both of them to 12.2-RELEASE, each without issue. plex started just fine before and after the upgrade but sandbox2 gave the above message both before and after the upgrade.

The permissions between the two appear to be the same, so I don't understand the meaning of the message. Please help, thanks.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Not sure if you already did that, but upgrading the jail can also require pkg upgrade to complete the process.

If you can't start the jail (maybe it's a basejail and refers to FreeBSD 11 files?) you may try iocage pkg ioc-sandbox upgrade but I don't know if it will manage to succeed without the jail running.

You may find that you have to rebuild the jail from scratch under 12.2-RELEASE (and then copy over any application data from the old jail root filesystem).
 

NealNye

Cadet
Joined
Mar 12, 2014
Messages
4
Thanks for your response @sretalla ! I was actually able to get my jail working with minor changes, though I don't fully understand what the problem was.

I took a step back and tried simply starting the jail instead:
Neal@freenas:~ % sudo iocage start sandbox2
Password:
No default gateway found for ipv6.
* Starting sandbox2
sandbox2 devfs_ruleset 6 does not exist! - Not starting jail

Looking up the docs for iocage and also the TrueNAS GUI, I found a discrepancy between my two jails:
Neal@freenas:~ % iocage get devfs_ruleset plex
1000
Neal@freenas:~ % iocage get devfs_ruleset sandbox2
6

So I changed the "Jail Properties" --> "devfs_ruleset" from "6" to "4" and it was able to start!
Neal@freenas:~ % iocage get devfs_ruleset sandbox2
4
Neal@freenas:~ % sudo iocage start sandbox2
Password:
No default gateway found for ipv6.
* Starting sandbox2
+ Started OK
+ Using devfs_ruleset: 1001 (iocage generated default)
+ Configuring VNET OK
+ Using IP options: vnet
+ Starting services OK
+ Executing poststart OK
+ DHCP Address: 192.168.0.218/24
 
Top