OpenVZ Forum


Home » General » Support » Ubuntu VE starts only one process (After Update to karmic the VE did not come up)
icon9.gif  Ubuntu VE starts only one process [message #38832] Mon, 08 February 2010 09:12 Go to next message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
Hello,

I've a Problem with OpenVZ and Ubuntu Karmic Koala. After i had updated the VE to karmic, i was wondering why cron isnt running. Ive tried /etc/init.d/cron start but it fails with that message:
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

So it seems to be a upstart problem, was my 1st thought. But because the ve is in use, ive created a clone of it for experimenting wit that problem. And that seems to be my 1st luck that day. The new VE fails to start properly!

# vzctl start 2094
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.2.94
Setting CPU units: 4290
Configure meminfo: 153949
Set hostname: ve2094
File resolv.conf was modified
VE start in progress...

# vzlist 2094
VEID NPROC STATUS IP_ADDR HOSTNAME
2094 1 running 192.168.2.94 ve2094

It seems to have only One process started! Is there any way to find out whats happening with that VE? vzvtl enter is not possible. (no pty)

btw I'running Ubuntu on a Debian host with vzctl version 3.0.22 and kernel 2.6.26-2-openvz-amd64.

I hope you could help me.
Thanks

Robert

[Updated on: Mon, 08 February 2010 10:21]

Report message to a moderator

Re: Ubuntu VE starts only one process [message #38871 is a reply to message #38832] Sun, 14 February 2010 07:15 Go to previous messageGo to next message
nuno is currently offline  nuno
Messages: 43
Registered: January 2010
Member
The problem is indeed upstart.
You need to mount some directories, usually done by initramfs, and start some things manually.

Maybe this will help:

description "upstart with openvz"

start on startup

task
pre-start script
    mount -t proc proc /proc
    mount -t devpts devpts /dev/pts
    mount -t sysfs sys /sys
    mount -t tmpfs varrun /var/run
    mount -t tmpfs varlock /var/lock
    mkdir -p /var/run/network
    cat /proc/mounts > /etc/mtab
end script

script
    init 2
    ifconfig lo 127.0.0.1
    /etc/init.d/networking restart
    start rsyslog
end script



Create this file and copy it to (the container) /etc/init/openvz.conf

Both Karmic and Lucid expect a newer kernel version, but most things will work.

Regards,

[Updated on: Mon, 15 February 2010 10:28]

Report message to a moderator

Re: Ubuntu VE starts only one process [message #38877 is a reply to message #38871] Mon, 15 February 2010 09:45 Go to previous messageGo to next message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
Thanks for your reply, but creating that upstart config seems to have no effect.

Is there no way to log the complete output of init to a logfile for debugging?

Will updating to a newer Kernel help?

Robert
Re: Ubuntu VE starts only one process [message #38878 is a reply to message #38877] Mon, 15 February 2010 10:13 Go to previous messageGo to next message
nuno is currently offline  nuno
Messages: 43
Registered: January 2010
Member
It works here with hardy's default openvz kernel.

To make upstart talk a bit more you must add --verbose (or --debug, can't remember) to the kernel command line. The easiest way to do that is modifying grub or lilo.

Re: Ubuntu VE starts only one process [message #38879 is a reply to message #38877] Mon, 15 February 2010 10:15 Go to previous messageGo to next message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
I've executed the script below by
vzctl exec 2094 /etc/init.d/vztest
and the VE comes to life!

mount -t proc proc /proc
mount -t devpts devpts /dev/pts
mount -t sysfs sys /sys
mount -t tmpfs varrun /var/run
mount -t tmpfs varlock /var/lock
mkdir -p /var/run/network
cat /proc/mounts > /etc/mtab

init 2        
ifconfig lo 127.0.0.1 
/etc/init.d/networking restart


After that I've got an idea:
vzctl exec 2094 ls /proc
has NO output because proc is empty! I think its not mounted.
But why?

Robert
Re: Ubuntu VE starts only one process [message #38880 is a reply to message #38879] Mon, 15 February 2010 10:28 Go to previous messageGo to next message
nuno is currently offline  nuno
Messages: 43
Registered: January 2010
Member
robig1 wrote on Mon, 15 February 2010 10:15
I've executed the script below by
vzctl exec 2094 /etc/init.d/vztest
and the VE comes to life!

mount -t proc proc /proc
mount -t devpts devpts /dev/pts
mount -t sysfs sys /sys
mount -t tmpfs varrun /var/run
mount -t tmpfs varlock /var/lock
mkdir -p /var/run/network
cat /proc/mounts > /etc/mtab

init 2        
ifconfig lo 127.0.0.1 
/etc/init.d/networking restart


After that I've got an idea:
vzctl exec 2094 ls /proc
has NO output because proc is empty! I think its not mounted.
But why?

Robert


The openvz.conf I posted should go in /etc/init/ (not /etc/init.d).

vzctl exec 2094 mount -t proc proc /proc
fails?

I don't know why...


Re: Ubuntu VE starts only one process [message #38882 is a reply to message #38880] Mon, 15 February 2010 12:08 Go to previous messageGo to next message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
Sorry, it seems I did'nt explain it correctly.

The upstart config is there:
# readlink -f openvz.conf                       
/mnt/data/vz/private/2094/etc/init/openvz.conf


Since that has no effect at all, ive tried to run the script contents manually using vzctl exec. So ive created a file in /etc/init.d/vz and made it executable so i could run it:
vzctl start 2094
vzctl exec 2094 /etc/init.d/vz


That works just fine. The ve continues to start and after a minute I can enter the VE and also the services have been started.

So ive tried another thing:
#vzctl restart 2094
#vzctl exec 2094 ls -l /proc
total 0


So the issue seems to be clear, /proc isn't mounted.
Yes, I can mount it manually with vzctl exec, but thats still not a nice solution.

Robert
Re: Ubuntu VE starts only one process [message #38883 is a reply to message #38882] Mon, 15 February 2010 12:27 Go to previous messageGo to next message
nuno is currently offline  nuno
Messages: 43
Registered: January 2010
Member

There's a bug in launchpad that may point you in the right direction:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/4361 30

Re: Ubuntu VE starts only one process [message #38884 is a reply to message #38883] Mon, 15 February 2010 13:21 Go to previous messageGo to next message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
OK, I will try a kernel update today evening.

Thanks
Robert
Re: Ubuntu VE starts only one process [message #38895 is a reply to message #38884] Tue, 16 February 2010 13:25 Go to previous message
robig1 is currently offline  robig1
Messages: 6
Registered: February 2010
Junior Member
ok im back with kernel 2.6.26-2-openvz-amd64

Still the same issue. I could only bring the VE to life by running the script above (in /etc/init.d/vz) manually. Sad

Its an acceptable workaround, since I dont restart the ve usually.

But there still seems to be a problem tith tty, here the syslog:
Feb 16 13:57:30 mail2 init: tty4 main process (20844) terminated with status 1  
Feb 16 13:57:30 mail2 init: tty4 main process ended, respawning                 
Feb 16 13:57:30 mail2 init: tty2 main process (20843) terminated with status 1  
Feb 16 13:57:30 mail2 init: tty2 main process ended, respawning                 
Feb 16 13:57:30 mail2 init: tty3 main process (20845) terminated with status 1  
Feb 16 13:57:30 mail2 init: tty3 main process ended, respawning

is repeated every half a minute!
Previous Topic: CPUs support in 2.6.24+
Next Topic: 2.6.27-chistyakov.1 and cpulimit/cpus questune
Goto Forum:
  


Current Time: Wed Aug 07 01:01:38 GMT 2024

Total time taken to generate the page: 0.05015 seconds