[Spacewalk-list] Spacewalk client - yum - proxy behavior

Jan Arild Lindstrøm jal at online.no
Mon Mar 12 08:26:35 UTC 2012


Hi,

I see te same problem with 1.7.

When I have finished installing the client, and before I disable all the 
normal repos:

        lintest3-virt(root) yum.repos.d 373# yum repolist
        Loaded plugins: fastestmirror, refresh-packagekit, rhnplugin, security
        Loading mirror speeds from cached hostfile
        Excluding mirror: centos.copahost.com
         * base: ftp.funet.fi
         * epel: be.mirror.eurid.eu
         * extras: ftp.funet.fi
        Excluding mirror: centos.copahost.com
         * updates: ftp.funet.fi
        repo id                                       repo name                                                  status
        base                                          CentOS-6 - Base                                            6,294
        centos6-x86_64                                CentOS 6 (x86_64)                                          6,294
        centos6-x86_64-addons                         CentOS 6 Addons (x86_64)                                       0
        centos6-x86_64-contrib                        CentOS 6 Contrib (x86_64)                                      0
        centos6-x86_64-extras                         CentOS 6 Extras (x86_64)                                       4
        centos6-x86_64-fasttrack                      CentOS 6 FastTrack (x86_64)                                    6
        centos6-x86_64-updates                        CentOS 6 Updates (x86_64)                                    556
        epel                                          Extra Packages for Enterprise Linux 6 - x86_64             7,084
        epel6-centos6-x86_64                          EPEL 6 for CentOS 6 (x86_64)                               7,775
        extras                                        CentOS-6 - Extras                                              4
        spacewalk-client                              Spacewalk Client Tools                                        21
        spacewalk17-client-centos6-x86_64             Spacewalk Client 1.7 for CentOS 6 (x86_64)                    21
        updates                                       CentOS-6 - Updates                                           556
        repolist: 28,615
        
        ( No attempt to contact Spacewalk server directly on 10.123.0.60 (cached). )

lintest3-virt(root) yum.repos.d 374# yum clean all
        Loaded plugins: fastestmirror, refresh-packagekit, rhnplugin, security
        Cleaning repos: base centos6-x86_64 centos6-x86_64-addons centos6-x86_64-contrib centos6-x86_64-extras
                      : centos6-x86_64-fasttrack centos6-x86_64-updates epel epel6-centos6-x86_64 extras
                      : spacewalk-client spacewalk17-client-centos6-x86_64 updates
        Cleaning up Everything
        Cleaning up list of fastest mirrors
        
Then running: yum repolist

        --cut--
        138.987509 10.123.30.183 -> 10.123.0.62  TLSv1 Application Data
        139.031659  10.123.0.62 -> 10.123.30.183 HTTP GET http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras HTTP/1.1 
        139.185659 10.123.30.183 -> 10.123.0.62  HTTP HTTP/1.0 200 OK  (text/plain)
        139.190307  10.123.0.62 -> 10.123.30.183 HTTP GET http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates HTTP/1.1 
        139.347891 10.123.30.183 -> 10.123.0.62  HTTP HTTP/1.0 200 OK  (text/plain)
        139.666128  10.123.0.62 -> 10.123.30.183 HTTP GET http://ftp.funet.fi/pub/mirrors/centos.org/6.2/os/x86_64/repodata/repomd.xml HTTP/1.1 
        139.674216 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 
        139.679305  10.123.0.62 -> 10.123.30.183 HTTP GET http://ftp.funet.fi/pub/mirrors/centos.org/6.2/os/x86_64/repodata/ceb77f94eaccd4b2ec5546135bdd06692393e7deb6e8aaf86d6f479b84bec06b-primary.sqlite.bz2         HTTP/1.0 
        141.536301  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64/repodata/repomd.xml HTTP/1.1 
        141.540032  10.123.0.60 -> 10.123.0.62  HTTP/XML HTTP/1.1 200 OK 
        141.545230  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64/repodata/primary.xml.gz HTTP/1.1 
        146.299674  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64-addons/repodata/repomd.xml HTTP/1.1 
        146.303247  10.123.0.60 -> 10.123.0.62  HTTP/XML HTTP/1.1 200 OK 
        146.308868  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64-addons/repodata/primary.xml.gz HTTP/1.1 
        146.312134  10.123.0.60 -> 10.123.0.62  HTTP HTTP/1.1 200 OK  (application/x-gzip)
        --cut--
        
That is, yum goes directly to the Spacewalk server to get the Spacewalk repos 
(centos6-x86_64*).

Same goes for yum install aso; it uses the Spacewalk server and not the proxy.

lintest3-virt(root) yum.repos.d 378# tail -1 /etc/yum.conf 
proxy=http://proxy-z2.nsc.no:8080

lintest3-virt(root) yum.repos.d 379# cat /etc/sysconfig/rhn/up2date | egrep 'enableProxy=|httpProxy='
enableProxy=1
httpProxy=proxy-z2.nsc.no:8080

E.g installing xemacs:
        lintest3-virt(root) ~ 247# tshark -c 50000 -R 'http'
        Running as user "root" and group "root". This could be dangerous.
        Capturing on eth0
          7.905700  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
          7.925698 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 
         22.856590  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
         22.875342 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 
         37.838431  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
         37.859712 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 
         55.538316  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
         55.559385 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 
         64.665521  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/Canna-libs-3.7p3-28.el6.x86_64.rpm HTTP/1.1 
         64.751627  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/compface-1.5.2-11.el6.x86_64.rpm HTTP/1.1 
         64.781524  10.123.0.60 -> 10.123.0.62  HTTP HTTP/1.1 200 OK  (application/octet-stream)
         64.786159  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/neXtaw-0.15.1-14.el6.x86_64.rpm HTTP/1.1 
         64.832345  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/xemacs-21.5.29-15.el6.2.x86_64.rpm HTTP/1.1 
         64.933681  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/xemacs-common-21.5.29-15.el6.2.x86_64.rpm HTTP/1.1 
         65.189576  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/epel6-centos6-x86_64/getPackage/xemacs-packages-base-20100727-1.el6.noarch.rpm HTTP/1.1 
         65.438919  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64/getPackage/xorg-x11-fonts-ISO8859-1-75dpi-7.2-9.1.el6.noarch.rpm HTTP/1.1 
         65.535681  10.123.0.62 -> 10.123.0.60  HTTP GET /XMLRPC/GET-REQ/centos6-x86_64/getPackage/xorg-x11-fonts-misc-7.2-9.1.el6.noarch.rpm HTTP/1.1 
         81.180792  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
         81.193799 10.123.30.183 -> 10.123.0.62  HTTP HTTP/1.0 200 OK 
         81.377621  10.123.0.62 -> 10.123.30.183 HTTP/XML POST http://spacewalk01.nsc.no/XMLRPC HTTP/1.1 
         82.437006 10.123.30.183 -> 10.123.0.62  HTTP/XML HTTP/1.0 200 OK 

Yum uses the Spacewalk server directly (10.123.0.60).

Yum will only fetch the Spacwalk repos via the proxy if I do the following:
        lintest3-virt(root) yum.repos.d 380# http_proxy=http://proxy-z2.nsc.no:8080
        lintest3-virt(root) yum.repos.d 381# export http_proxy

Running yum repolist, yum search, yum install aso after this yield no attempt
to go directly to the Spacewalk server.

So the question is still with 1.7 as it was with 1.6: Why do http_proxy need 
to be set in the environment to have yum always use the proxy it has in 
/etc/yum.conf?

Does perhaps the Spacewalk client repos/software have proxy settings hidden in 
a file I have not updated with proxy settings? If so, where is it and where
is the docs describing it?

I can not get yum to work correctly without http_proxy in the environment for
the Spacewalk client.

Spacewalk client: 10.123.0.62
Spacewalk server: 10.123.0.60
Squid proxy: 10.123.30.183


Regards
Jan Arild


At 18:50 27.02.2012, Jan Arild Lindstrøm wrote:
>Hi,
>
>installed CentOS the normal way, updated everything, rebooted
>and then installed the Spacewalk client.
>
>1)
>
>lintest3-virt(root) ~ 32# egrep 'proxy=|enableProxy=|httpProxy=' /etc/yum.conf /etc/sysconfig/rhn/up2date 
>/etc/yum.conf:proxy=http://proxy-z2.mydomain.no:8080
>/etc/sysconfig/rhn/up2date:enableProxy=1
>/etc/sysconfig/rhn/up2date:httpProxy=proxy-z2.mydomain.no:8080
>
>2)
>
>lintest3-virt(root) ~ 33# spacewalk-channel --list
>centos6-x86_64
>centos6-x86_64-addons
>centos6-x86_64-contrib
>centos6-x86_64-extras
>centos6-x86_64-fasttrack
>centos6-x86_64-updates
>epel6-centos6-x86_64
>spacewalk16-client-centos6-x86_64
>
>That is, "spacewalk-channel --list" uses the proxy all the way. It does not
>try to connect to the Spacewalk server directly.
>
>3)
>
>lintest3-virt(root) ~ 34# yum update
>Loaded plugins: refresh-packagekit, rhnplugin, security
>Loading mirror speeds from cached hostfile
>Error: Cannot retrieve repository metadata (repomd.xml) for repository: centos6-x86_64. Please verify its path and try again
>
>( - "yum update" starts here - )
>14:20:33.362368 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 0
>14:20:33.375652 IP 10.10.30.183.8080 > 10.10.0.62.51822: tcp 0
>14:20:33.375852 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 0
>14:20:33.377344 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 627
>14:20:33.377522 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 1380
>14:20:33.378321 IP 10.10.30.183.8080 > 10.10.0.62.51822: tcp 0
>--cut--
>14:20:33.402821 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 0
>14:20:33.402825 IP 10.10.30.183.8080 > 10.10.0.62.51822: tcp 467
>14:20:33.402829 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 0
>14:20:33.402846 IP 10.10.30.183.8080 > 10.10.0.62.51822: tcp 0
>14:20:33.406011 IP 10.10.0.62.51822 > 10.10.30.183.8080: tcp 0
>14:20:33.406976 IP 10.10.30.183.8080 > 10.10.0.62.51822: tcp 0
>14:20:33.460341 IP 10.10.0.62.50796 > 10.10.0.60.80: tcp 0
>14:20:36.460258 IP 10.10.0.62.50796 > 10.10.0.60.80: tcp 0
>14:20:42.460278 IP 10.10.0.62.50796 > 10.10.0.60.80: tcp 0
>--cut--
>
>Proxy = 10.10.30.183
>Spacewalk server = 10.10.0.62
>
>That is "yum update" starts using the proxy, but after some packets start using
>the Spacewalk server directly without going through the proxy, and hence it 
>fails.
>
>4)
>
>lintest3-virt(root) ~ 105# yum repolist
>Loaded plugins: refresh-packagekit, rhnplugin, security
>repo id                                       repo name                                              status
>centos6-x86_64                                CentOS 6 (x86_64)                                      0
>centos6-x86_64-addons                         CentOS 6 Addons (x86_64)                               0
>centos6-x86_64-contrib                        CentOS 6 Contrib (x86_64)                              0
>centos6-x86_64-extras                         CentOS 6 Extras (x86_64)                               0
>centos6-x86_64-fasttrack                      CentOS 6 FastTrack (x86_64)                            0
>centos6-x86_64-updates                        CentOS 6 Updates (x86_64)                              0
>epel6-centos6-x86_64                          EPEL 6 for CentOS 6 (x86_64)                           0
>spacewalk16-client-centos6-x86_64             Spacewalk Client 1.6 for CentOS 6 (x86_64)             0
>repolist: 0
>
>( - "yum repolist" starts here - )
>14:56:17.023945 IP 10.10.0.62.51838 > 10.10.30.183.8080: tcp 0
>14:56:17.035872 IP 10.10.30.183.8080 > 10.10.0.62.51838: tcp 0
>14:56:17.035922 IP 10.10.0.62.51838 > 10.10.30.183.8080: tcp 0
>14:56:17.037405 IP 10.10.0.62.51838 > 10.10.30.183.8080: tcp 627
>14:56:17.037487 IP 10.10.0.62.51838 > 10.10.30.183.8080: tcp 1380
>14:56:17.038154 IP 10.10.30.183.8080 > 10.10.0.62.51838: tcp 0
>--cut--
>14:56:17.296432 IP 10.10.0.62.51838 > 10.10.30.183.8080: tcp 0
>14:56:17.297259 IP 10.10.30.183.8080 > 10.10.0.62.51838: tcp 0
>14:56:17.352620 IP 10.10.0.62.50812 > 10.10.0.60.80: tcp 0
>14:56:20.351199 IP 10.10.0.62.50812 > 10.10.0.60.80: tcp 0
>14:56:26.351144 IP 10.10.0.62.50812 > 10.10.0.60.80: tcp 0
>--cut--
>
>Proxy = 10.10.30.183
>Spacewalk server = 10.10.0.62
>
>That is "yum repolist" starts using the proxy, but after some packets start using
>the Spacewalk server directly without going through the proxy. It finds the channels,
>but fail to find any packages in the channels.
>
>
>Yum only works all the way if I do the following:
>  lintest3-virt(root) ~ 49# http_proxy=http://proxy-z2.mydomain.no:8080
>  lintest3-virt(root) ~ 50# export http_proxy
>
>Why do one need to use http_proxy in the environment? Should not yum and the 
>Spacewalk client stuff read all the proxy settings it needs from /etc/yum.conf 
>and /etc/sysconfig/rhn/up2date?
>
>If I remove Spacewalk client and enable the "normal" repos again, yum uses the 
>proxy all the way. It seems to be something in the Spacewalk client that does 
>not care about proxy settings found in /etc/yum.conf and /etc/sysconfig/rhn/up2date. 
>
>Anyone got this to work without http_proxy in the environment after intalling
>Spacewalk client?
>
>---
>Regards
>Jan Arild
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-list at redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list





More information about the Spacewalk-list mailing list