OpenVZ Forum


Home » General » Support » Host: CentOS4, Guest: Debian, apt-get not working, strange problems
Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #581] Wed, 21 December 2005 18:22 Go to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

Hello,

i have strange problems with my test server (CentOS4) and a debian sarge guest.
The sarge guest was created for linux vserver and worked there without problems. To test the migration from linux vserver to OpenVZ I try to run that guest on an OpenVZ host.

I just tar-ed everything on the vserver host and untar-ed it again in /vz/private/101
so far so good.
Then I executed the following steps:
vzctl set 101 --applyconfig vps.basic --save
echo "OSTEMPLATE=debian-3.1" >> /etc/vz/101.conf
vzctl set 101 --ipadd 10.10.201.101 --save
vzctl start 101


The guest runs now.
So I enter the guest via
vzctl enter 101


Now there are a few problems:
proc is not mounted so I can't do df, ps, ifconfig, ...
The network does not work too.
I did the following:
mount -t proc proc /proc
/etc/init.d/networking start

Now the network works fine and proc is mounted.

The next step I tried to do was to update.
apt-get update


Ok, it downloads all package lists. Fine!

Now:
apt-get upgrade

And I got the following error:
Quote:


E: you don't have enough free space in /var/cache/apt/archives.



Strange, df -h says that I have about 5.3G of free space!
And even more strange: if I delete the package lists. He is able to download them again (no free space error).

FYI:
The the / and the /vz are one the same partition (ext3, defaults).

Another problem I have is that vzctl start 101 does NOT start the network and some other services and does not mount the proc, why?

I hope someone of you can help me.

Thank you

Bernhard, from Germany
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #582 is a reply to message #581] Wed, 21 December 2005 18:31 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

This most likely is not your problem as it was not indicated in the error as far as I can see. Check /etc/sysconfig/vz-scripts/101.conf and make sure

DCACHESIZE="524288:548864"

Is a larger level that cd / ; du -h or how much disk space the template is using.

Good luck.



Just Because You Have One, Doesn't Mean You Have To Be One!
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #583 is a reply to message #582] Wed, 21 December 2005 22:43 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

It is even more strange... if I use the "aptitude upgrade" command (instead of "apt-get upgrade") everything works fine.

Can someone explain me why? Is this a bug in OpenVZ?

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #584 is a reply to message #581] Thu, 22 December 2005 01:10 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

If you want to try a second template from this post enclosed below it only took me about 15 minutes to complete a working debian template. I am going to try and attach a file which is a debootstrap RPM. I downloaded the deb bootstrap and emerged a program into gentoo to transform the deb file into an RPM. It works great and I made a template for Debian 3.1 sarge using the installed RPM on a CentOS 4.2 host. Here is the forum post:

http://forum.openvz.org/index.php?t=msg&th=80&start= 0

The attachment is the debootstrap RPM


Just Because You Have One, Doesn't Mean You Have To Be One!

[Updated on: Thu, 22 December 2005 09:58] by Moderator

Report message to a moderator

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #588 is a reply to message #584] Thu, 22 December 2005 09:49 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

devnu11, debootstrap is available for Gentoo natively; just emerge debootstrap Smile

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #589 is a reply to message #583] Thu, 22 December 2005 09:56 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Absent /proc and no networking are clear signs of VServer - in OpenVZ it is VPS who should mount its /proc itself, and in VServer there is no normal networking, so it is not started. Use update-rc.d to add networking into boot process.

First of all, check /proc/user_beancounters inside your VPS -- if you see ones that were failing (last column - failcnt - is greater than zero), you should increase them accordingly (using vzctl set).

You should also usually check not just free blocks (df) but also free inodes (df -i) -- sometimes it happens that there are no more free inodes.

It is also recommended to have a separate /vz partition, for several reasons.

If nothing else works, try debugging apt-get using strace - so you could see the actual syscall and an error.

Also, you can try creating a Debian template from scratch, as described here.

Any problems - please ask.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #590 is a reply to message #581] Thu, 22 December 2005 10:15 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

Quote:

devnu11, debootstrap is available for Gentoo natively; just emerge debootstrap


Yes, that is correct. I wanted to build Debian on a CentOS Host so I didn't have to upload ~200 MB from a local machine. It's also not very practical to install a "Bear" such as Gentoo if your main purpose is only to debootstrap from an RPM based box. I was lucky to have just installed Gentoo recently on a local machine. I had trouble finding a RPM for debootstrap which was functional for 3.1 sarge. Now I have the RPM for future use Smile


Just Because You Have One, Doesn't Mean You Have To Be One!
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #591 is a reply to message #590] Thu, 22 December 2005 10:26 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Now I see. BTW thanks for the debootstrap rpm; I will attach it to my howto article

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #592 is a reply to message #581] Thu, 22 December 2005 10:33 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

Thanks for help - I will post my results as soon as possible.

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #602 is a reply to message #581] Thu, 22 December 2005 21:56 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

Hi,

now I created a template using the howto from kir. /proc is mounted now and the network works too. But the apt-get problem is still there. I will do a strace in a few minutes and post my results. I hope this helps. I will also publish my precreated debian template. Maybe someone of you can download it and try if he sees the same error for apt-get install something (the same command for aptitude works).
Some further remarks:
If I use the same system via chroot apt-get works fine.
After some apt-get install command there is NO entry with a failcount>0 in /proc/user_beancounters.

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #603 is a reply to message #581] Thu, 22 December 2005 22:07 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

See attachment for strace output of "apt-get install mc".

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #604 is a reply to message #603] Fri, 23 December 2005 09:34 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Can you rerun strace with -Ff arguments, so children will be catched as well?

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #605 is a reply to message #581] Fri, 23 December 2005 12:35 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

Here is the full strace of apt-get install quota

I really hope you can find the error.

Bernhard

btw. I have migrated my server from Linux VServer to OpenVZ successfully. Smile
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #606 is a reply to message #605] Fri, 23 December 2005 12:49 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Can you tell if you have assigned a valid IP to the VPS? Are you able to ping the outside world from the VPS? Does name resolution work there? Are you able to download stuff from the network?

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #607 is a reply to message #581] Fri, 23 December 2005 13:26 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

I did everything via SSH and did not use vzctl enter (the server is about 250km away).
Network is OK, I can ping the VPS and the host.
If I use aptitude instead of apt-get everything works ok therefore I don't think it is a network problem.

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #616 is a reply to message #581] Tue, 27 December 2005 19:43 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

Did someone of you found the reason for that problem?
In the meantime I tried the same VPS on another hardware - same result.
The first test was done on:
Pentium M 740
The second test was done on:
2xPentium III SMP

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #617 is a reply to message #581] Wed, 28 December 2005 12:38 Go to previous messageGo to next message
bjmg is currently offline  bjmg
Messages: 32
Registered: December 2005
Location: Puettlingen, Germany
Member

kir solved the problem. It is a kernel bug. You have to recompile the kernel without "CONFIG_LBD" set. Or you can just wait for a updated kernel image.

Bernhard
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #619 is a reply to message #617] Wed, 28 December 2005 13:13 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

New kernel fixing this bug will be available next week. Patch fixing the issue is already available from here.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png

[Updated on: Wed, 28 December 2005 13:16]

Report message to a moderator

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #733 is a reply to message #619] Sun, 08 January 2006 05:48 Go to previous messageGo to next message
phpfreak is currently offline  phpfreak
Messages: 47
Registered: January 2006
Member
Has this Kernel been released yet? Just curious, I'd like to create some VHCS with Debian and apt Smile

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #734 is a reply to message #733] Sun, 08 January 2006 06:11 Go to previous messageGo to next message
vmvmvm is currently offline  vmvmvm
Messages: 51
Registered: January 2006
Member
VHCS ? not familiar with that acroymn.
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #736 is a reply to message #734] Sun, 08 January 2006 06:24 Go to previous messageGo to next message
phpfreak is currently offline  phpfreak
Messages: 47
Registered: January 2006
Member
Google it. It's an open source hosting control panel. Very buggy though. I can't get it to work much and we dropped it about 4 months ago when it was causing major support issues for our VPS users.



Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems [message #747 is a reply to message #733] Mon, 09 January 2006 07:09 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Not yet. Will try hard to do that today or tomorrow.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Hybodus OpenVZ Template :)
Next Topic: Existing Templates
Goto Forum:
  


Current Time: Sun Jul 21 12:13:27 GMT 2024

Total time taken to generate the page: 0.02393 seconds