OpenVZ Forum


Home » General » Support » vzpkgcache behind proxy
vzpkgcache behind proxy [message #7001] Fri, 29 September 2006 14:08 Go to next message
goeldi
Messages: 92
Registered: June 2006
Member
I am sitting behind a proxy with authentication. Using yum (not vzyum) works, when I change from bash to sh and enter:

export http_proxy=http://proxy.customer.ch:3128/
export ftp_proxy=http://proxy.customer.ch:3128/
export proxy_username=some.name
export proxy_password=******

additionally I had to change the standard /etc/nsswitch.conf of CentOS from old:
passwd: files
shadow: files
group: files
etc....

to new:
passwd: compat
shadow: files
group: compat

THEN using yum works. But vzpkgcache fails with this error message:

# vzpkgcache centos-4
Creating cache for centos-4-i386-default OS template
Setting up Install Process
Setting up repositories
centos4-vz-addons 100% |=========================| 951 B 00:00
http://mirror.centos.org/centos/4/os/i386/repodata/repomd.xm l: [Errno 14] HTTP Error 407: Proxy Authentication Required
Trying other mirror.
Cannot open/read repomd.xml file for repository: centos4-base
failure: repodata/repomd.xml from centos4-base: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from centos4-base: [Errno 256] No more mirrors to try.
ERROR: yum failed with 1 exit code

WTF?
Re: vzpkgcache behind proxy [message #7029 is a reply to message #7001] Sun, 01 October 2006 00:16 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Try setting proxy, proxy_username and proxy_password in /vz/template/centos/4/*/config/yum.conf. See man yum.conf for details.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
icon9.gif  Re: vzpkgcache behind proxy [message #7944 is a reply to message #7029] Tue, 31 October 2006 09:51 Go to previous messageGo to next message
rookie is currently offline  rookie
Messages: 12
Registered: October 2006
Location: CH
Junior Member
Hi!

My yum.conf (proxy with authentication):

# more /vz/template/centos/4/i386/config/yum.conf
[main]
cachedir=/vz/template/centos/4/i386/yum-cache/
# Ugly hack to make yum disregard /etc/yum.repos.d/*repo files
# from both the host system and from inside VPS
reposdir=/dev/null
# Fix for bug #78 - we do not want to install dummy,
# we want to upgrade it.
installonlypkgs=''
proxy=http://proxy.myhome.ch:3128/
proxy_username=rookie.myhome
proxy_password=ProxyPWD


[centos4-vz-addons]
name=OpenVZ add-ons for CentOS 4 - i386
baseurl=file:///vz/template/centos/4/i386/vz-addons/
enabled=1
gpgcheck=0

[centos4-base]
name=CentOS 4 - i386 - Base
baseurl=http://mirror.centos.org/centos/4/os/i386/
enabled=1
gpgcheck=1

[centos4-updates-released]
name=CentOS 4 - i386 - Released Updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
enabled=1
gpgcheck=1



So i try vzpkgcache:

# vzpkgcache centos-4
Creating cache for centos-4-i386-default OS template
Setting up Install Process
Setting up repositories
centos4-vz-addons 100% |=========================| 951 B 00:00
centos4-base 100% |=========================| 1.1 kB 00:00
http://mirror.centos.org/centos/4/updates/i386/repodata/repo md.xml: [Errno 14] HTTP Error 400: Bad Request
Trying other mirror.
Cannot open/read repomd.xml file for repository: centos4-updates-released
failure: repodata/repomd.xml from centos4-updates-released: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from centos4-updates-released: [Errno 256] No more mirrors to try.
ERROR: yum failed with 1 exit code

any idea?
Re: vzpkgcache behind proxy [message #8043 is a reply to message #7944] Fri, 03 November 2006 16:26 Go to previous message
rookie is currently offline  rookie
Messages: 12
Registered: October 2006
Location: CH
Junior Member
i tried it with wget and with a browser to download the xml file, and it works through the proxy. but using vzyum it doesn't Shocked Sad

vzyum seems to have a bug in some authenticated proxy environments !?

---------------------------
# vzyum 234 update
exec /usr/share/vzyum/bin/yum -c /vz/template/centos/4/i386/config/yum.conf --installroot /home/vz/root/234 --vps=234 update
Setting up Update Process
Setting up repositories
centos4-vz-addons 100% |=========================| 951 B 00:00
centos4-base 100% |=========================| 1.1 kB 00:00
http://mirror.centos.org/centos/4/updates/i386/repodata/repo md.xml: [Errno 14] HTTP Error 400: Bad Request
Trying other mirror.
Cannot open/read repomd.xml file for repository: centos4-updates-released
failure: repodata/repomd.xml from centos4-updates-released: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from centos4-updates-released: [Errno 256] No more mirrors to try.
-----------------------
Previous Topic: Transparent Squid in VE
Next Topic: *SOLVED* Memory errors
Goto Forum:
  


Current Time: Tue Jul 09 09:18:22 GMT 2024

Total time taken to generate the page: 0.03189 seconds