All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
apt-get update really slow on OVH classic VPS with debian, related to IPv6?
Hey,
I'm a bit confused in regards to my OVH VPS Classic 1.
It runs debian 7 and obviously I run apt-get update often to keep every package on the server updated and prevent any security issues.
When I first set up the server I already noticed that the actual package database update was much slower than on any other VPS I have. I got the VPS Classic 1 after I had a VPS Classic 2 with OVH, so a small downgrade. On the VPS Classic 2 I used ubuntu server 14.04 LTS and this problem didn't exist.
I tried re-installing the debian image multiple times, but it didn't solve it and I just ignored it. Now that I have time, I'd prefer to resolve the problem, though.
Now, what happens if I run apt-get update you might ask.
Basically, the process gets stuck right at the beginning, displaying
0% [Connecting with ftp.debian.org (2001:610:1908:b000::148:12)] [Connecting with
and then finally successfully finishing after a long time (a minute or so).
Searching for this problem I found lots of explanations that this is related to apt-get trying to connect to the ipv6 package server (instead of the ipv4 one) and being unsuccessful.
What I'm confused about is that I had another VPS Classic as explained before and that it didn't happen there. I was using Ubuntu server on there though as opposed to Debian 7 now.
Trying to ping ipv6 adresses results in 100% package loss.
I'm not an expert in network related issues, especially in regards to IPv6 (yet ) but running ifconfig shows me that an IPv6 adress is assigned to my server and this is what (a relevant part of) my /etc/network/interfaces looks like:
iface venet0 inet6 manual
up ifconfig venet0 add 2001:*******::***/56
down ifconfig venet0 del 2001:*******::***/56
up route -A inet6 add default dev venet0
down route -A inet6 del default dev venet0
(***** = censored by me )
I did never actively try to ping a v6 address on my former vps with ovh, because I had no doubt that everything was working just fine and I assumed that IPv6 is properly configured automatically when installing the OS.
So does anybody have an idea what's going on here and could give me a bit of help?
Thanks
Comments
I have problems like that with IPv6 all the time -_- so I just disable it.
Maybe you can specify an IP address for ftp.debian.org in your hosts file?
Yeah that would be a workaround but I'd like to know why ipv6 is not working. It is kind of bothering me and I want to learn
I'm wondering if I have to manually specify an IPv6 address in my interfaces-file? I had to do this for another VPS I have (from another provider) but they actually told me to do so. I though OVH does this automatically (also the other server, where I had to do this was KVM, while VPS Classic by OVH is OpenVZ afaik, so no idea here...)
Because the part I've posted above is the only thing that's in there related to ipv6. Or is this enough normally?
The thing is I can't find any information about configuring IPv6 on the Classic VPS, only for OVH dedicated servers...
IPV6 is always slow for me with updates and sometimes doesn't work no matter what VPS I'm on. I would just stick to IPV4 for now.
-edit- nevermind saw you did pretty much everything I wrote
is ifconfig showing ipv6 as global?
yep
edit /etc/gai.conf and add (uncomment) this line:
This will make ipv4 preferred over ipv6 (by default ipv6 is preferred).
Yes. IPv6 is very slow usually. Not only in VPS, but i also see the same result on highend dedicated servers. (I don't know the reason, i am in lack of IPv6 knowledges for now, unfortunately)
If you care about this, just do this command in command line and you should be fine.
@rds100 solution can be better though. ( I doubt does all software honor /etc/gai.conf )
Why make system-wide changes to IPv6? Just disable it in apt:
echo "Acquire::ForceIPv4 true;" >> /etc/apt/apt.conf.d/99force-ipv4
I would say probably a poor choice of IPv6 carriers or mirrors.
Min our case we get very similar and sometimes even faster results over IPv6.
I was having the same issues. Nice fix!
@madtbh that's not a fix. That's a blunt way of going around the problem without fixing it.
thank you so much, you help me
14 posts left
3 year necro. Platinium medal.
User was warned, but at least it was on-topic.