Jails aren't starting applications automatically.

Hi.

Recently I upgraded from RELEASE-8.1 to RELEASE-8.2. I upgraded the host OS and all the jails. I did rebuild World again for all the Jails and so on.

After I did put the Jails online, I noticed that none of the applications which I have in Jails' /etc/rc.conf won't start. I did not have this problem before upgrading. I have searched the logfiles and the internet, but I haven't found any information about this problem.

I can start some Jail service by adding the jail_jail1_exec_start command in the host OS'es /etc/rc.conf, but for me this isn't good solution.

All help is respected.

- folivora
 
Please post the relevant bits from your host's /etc/rc.conf.
 
Here is the host OS /etc/rc.conf

Code:
#JAIL
jail_enable="YES"
jail_list="jail_1"
jail_set_hostname_allow="NO"
jail_procfs_enable="NO"

Code:
#JAIL SECTION
#JAIL 1
jail_jail_1_rootdir="/usr/jail/jail_1"
jail_jail_1_hostname="jail_1"
jail_jail_1_interface="re0"
#jail_jail_1_exec_start="/usr/local/sbin/apachectl restart"
jail_jail_1_exec_start="/usr/sbin/sshd"
#jail_jail_1_exec_start="/usr/local/sbin/oidentd"
jail_jail_1_ip="xxx.xxx.81.4"
jail_jail_1_devfs_enable="YES"
jail_jail_1_devfs_ruleset="devfsrules_jail"

I have disabled those few lines, because sshd must start. Others can be started manually from the Jail, but it is not very useful.

- folivora
 
Remove all the _exec_ entries. Start the services inside the jail using the 'normal' way, i.e. enabling them in /etc/rc.conf. Treat a jail like you would treat any normal stand-alone system.
 
Thank you SirDice.

I removed all _exec_ entries. It seems that oidentd and pdnsd needed rc script. Should apache and mysql have rc scripts?

I am asking this because, I am not sure about that could I be missing some rc scripts from my Jails?
 
folivora said:
Should apache and mysql have rc scripts?
Yes, they do. Have a look in /usr/local/etc/rc.d/ (in the jail of course ;) ).
 
Yes I noticed this.

rcorder lists contents of /usr/local/etc/rc.d/.

But when I restart the jail from host OS none of the content of /usr/local/etc/rc.d/ isn't run.

I don't know if my upgrade of this has somehow failed.
 
The biggest question is, are those services enabled in the jail's /etc/rc.conf?
 
Yes the command are enabled in jail's /etc/rc.conf. This problem did appear after upgrading to RELEASE-8.2.

I have rebuild and installed world to Jails. Problem continues still.

All scripts in /etc/rc.d/ are starting just fine. None of the scripts which are in /usr/local/etc/rc.d/ aren't started.

Any good way to find logs about this kind of error.

-folivora
 
I am running RELEASE-8.2 with 5 jails and have no problems. My though is you messed up the jail upgrade process some how. Suggest you use the sysutils/qjail port to create and manage your jails.
 
folivora said:
Any good way to find logs about this kind of error.

Inside the jail, add the following to /etc/syslog.conf
Code:
*.*                                             /var/log/all.log
then do:
[cmd=]touch /var/log/all.log[/cmd]
and "reboot" the jail. After that, login and check the all.log file for any errors.
 
da1 said:
then do:
[cmd=]touch /var/log/all.log[/cmd]
and "reboot" the jail.
You can also just restart syslog:
Code:
service syslog restart
 
Ok, I did add
Code:
*.*                                             /var/log/all.log

to /etc/syslog.conf and then I did restart jail.

Here is everything from all.log

Code:
tail -f /var/log/all.log

Jun 17 12:15:51 jail_1 syslogd: restart
Jun 17 12:15:51 jail_1 syslogd: kernel boot file is /boot/kernel/kernel
Jun 17 12:15:51 jail_1 /usr/sbin/cron[53775]: (CRON) WARNING (madvise() failed)
Jun 17 12:15:57 jail_1 login: chflags(/dev/pts/9): No such file or directory
Jun 17 12:15:57 jail_1 login: chown(/dev/pts/9): No such file or directory
Jun 17 12:15:57 jail_1 login: login on pts/9 as root

-folivora
 
Back
Top