Jail not starting at Boot

Ricky G ricky1252 at hotmail.com
Sun Aug 30 20:12:11 UTC 2015


Hello, I dunno if this will help... but I decided I would try. I'm not sure why the one jail wont start, however I suggest trying to clean up your config file. The issue could be parsing the config because its so long, I will provide an example.
### jail.conf ###
host.hostname = ${name}.dweimer.local;interface = LAN;path = /jails/${name}/ROOT;allow.mount.devfs;mount.devfs;
mount.fstab = "/jails/${name}/fstab";allow.sysvipc;allow.dying;exec.start = "/bin/sh /etc/rc";exec.stop = "/bin/sh /etc/rc.shutdown";
exec.prestart = "/jails/${name}/poststop.sh";exec.poststop = "/jails/${name}/poststop.sh";exec.consolelog = "/jails/${name}/console.log";
pgsql {ip4.addr = 192.168.5.6;}
mysql {ip4.addr = 192.168.5.9;}
### EOF ###
Basically when not in { } it is treated as a default value, this will make the file much easier to read and manage. If you have a jail that does not follow the defaults, then just add the value to that jail.
Unfortunately I don't think this will solve the issue. I am wondering if the same jail will act up shutting down all jails then starting them via service jail start.
> To: freebsd-questions at freebsd.org
> Subject: Jail not starting at Boot
> Date: Wed, 26 Aug 2015 08:50:02 -0500
> From: dweimer at dweimer.net
> 
> I have seven jails configured on my system, I have them configured to 
> start at boot with the following lines in /etc/rc.conf
> 
> jail_enable="YES"
> jail_parallel_start="YES"
> 
> They are all defined in /etc/jail.conf, here is the configuration from 
> the first two. They are all basically the same, except IP address and 
> directories. A couple of the ones not included do have one additional 
> entry, depend = "pgsql"; as they have services that can't start without 
> the pgsql databases up.
> 
> # Define PostgreSQL Jail
> pgsql {
>    host.hostname = pgsql.dweimer.local;
>    ip4.addr = 192.168.5.6;
>    interface = LAN;
>    path = /jails/pgsql/ROOT;
>    allow.mount.devfs;
>    mount.devfs;
>    mount.fstab = "/jails/pgsql/fstab";
>    allow.sysvipc;
>    allow.dying;
>    exec.start = "/bin/sh /etc/rc";
>    exec.stop = "/bin/sh /etc/rc.shutdown";
>    exec.prestart = "/jails/pgsql/prestart.sh";
>    exec.poststop = "/jails/pgsql/poststop.sh";
>    exec.consolelog = "/jails/pgsql/console.log";
> }
> 
> # Define MySQL Jail
> mysql {
>    host.hostname = mysql.dweimer.local;
>    ip4.addr = 192.168.5.9;
>    interface = LAN;
>    path = /jails/mysql/ROOT;
>    allow.mount.devfs;
>    mount.devfs;
>    allow.sysvipc;
>    allow.dying;
>    mount.fstab = "/jails/mysql/fstab";
>    exec.start = "/bin/sh /etc/rc";
>    exec.stop = "/bin/sh /etc/rc.shutdown";
>    exec.prestart = "/jails/mysql/prestart.sh";
>    exec.poststop = "/jails/mysql/poststop.sh";
>    exec.consolelog = "/jails/mysql/console.log";
> }
> 
> The issue I have is that the mysql jail above doesn't start at boot, I 
> can't find any errors in any of the logs, all the other 6 start just 
> fine. The exec.prestart and exec.poststop commands were added for 
> troubleshooting, all they do is echo out the date and time that the 
> command was called to the console log file for each jail. The mysql one 
> doesn't get called at boot. All the jails cleanly shutdown when the 
> server is shutdown, and the jail loads fine if I run jail -c mysql. I 
> originally didn't have the jail_parallel_start="YES" set, and had the 
> same issue.
> 
> Does anyone have any clue what to look for to determine what's stopping 
> this jail from loading at boot?
> 
> 
> -- 
> Thanks,
>     Dean E. Weimer
>     http://www.dweimer.net/
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
 		 	   		  


More information about the freebsd-questions mailing list