rhn-plugin is using system proxy for connetting to rhn Happens on different version of redhat/Centos (>5.5, >6.3) How reproducible: Setup a system proxy and see that yum / up2date / osad can't work anymore Steps to Reproduce: 1. setup a system proxy vim /etc/profile.d/proxy.sh export http_proxy="http://10.102.43.53:3128" export HTTP_PROXY="http://10.102.43.53:3128" export no_proxy="spacewalk.foosoft.it,localhost,127.0.0.1,10.102.43.0/24" export NO_PROXY="spacewalk.foosoft.it,localhost,127.0.0.1,10.102.43.0/24" 2. apply this setting system wide source /etc/profile.d/proxy.sh 3. try to contact spacewalk.foosoft.it (10.102.43.250) for "yum update" or else Error: Cannot retrieve repository metadata (repomd.xml) for repository: production-rhel5. Please verify its path and try again 4. see the strace read(12, "SQLite format 3\0\4\0\1\1\0@ \0\0\0\23\0\0\0/"..., 100) = 100 stat("/var/cache/yum/production-rhel5/repomd.xml", 0x7fff20ae0990) = -1 ENOENT (No such file or directory) open("/var/cache/yum/production-rhel5", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 13 fcntl(13, F_SETFD, FD_CLOEXEC) = 0 getdents(13, /* 4 entries */, 32768) = 112 getdents(13, /* 0 entries */, 32768) = 0 close(13) = 0 stat("/var/cache/yum/production-rhel5/repomd.xml", 0x7fff20ae0990) = -1 ENOENT (No such file or directory) open("/dev/urandom", O_RDONLY) = 13 read(13, "\360\225\326\320^\302m-\341.x\221\202\241\351k", 16) = 16 close(13) = 0 lstat("/var/cache/yum/production-rhel5/repomdvgTeWQtmp.xml", 0x7fff20ae0810) = -1 ENOENT (No such file or directory) open("/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT", O_RDONLY) = 13 fstat(13, {st_mode=S_IFREG|0664, st_size=5188, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b587d00c000 read(13, "Certificate:\n Data:\n V"..., 4096) = 4096 read(13, "rJFUVs+ciZRvx2KailrcQAhIkURtgTA/"..., 4096) = 1092 read(13, "", 4096) = 0 close(13) = 0 munmap(0x2b587d00c000, 4096) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 13 fcntl(13, F_GETFL) = 0x2 (flags O_RDWR) fcntl(13, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(13, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.102.43.53")}, 16) = -1 EINPROGRESS (Operation now in progress) select(14, NULL, [13], NULL, {60, 0}) = 1 (out [13], left {60, 0}) connect(13, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("10.102.43.53")}, 16) = 0 select(14, NULL, [13], NULL, {60, 0}) = 1 (out [13], left {60, 0}) sendto(13, "GET http://spacewalk.foosoft.it/"..., 438, 0, NULL, 0) = 438 5. see that rhn-plugin is trying to use system proxy (10.102.43.53) which is different from the proxy defined in /etc/yum.conf (X:Y:Z:K:3128) 6. see that /etc/sysconfig/rhn/up2date does not have a defined proxy because we don't need a proxy for RHN here 7. see that no_proxy and NO_PROXY are defined but are ignored ( wget does honour them) 8. erase the system proxy: export http_proxy="" export HTTP_PROXY="" 9. now everthing is working Actual results: if a system wide proxy is defined there's no way to contact rhn repo without using the same proxy Expected results: if up2date proxy is not defined, rhn-plugin is supposed to contact directly the FQDN defined in serverURL in /etc/sysconfig/rhn/up2date, so it's supposed to ignore system wide proxy (export http_proxy= .... and export HTTP_PROXY= ...) and proxy defined in /etc/yum.conf ( proxy=http://10.102.XX.YY:3128 ) Additional info: Please correct me if I am wrong, I'm pretty sure that everthing was working before upgrade to 1.9 (i.e. 1.8 was working as stated)
I tried with rhn-client-tools-2.1.14-1, rhnlib and yum-rhn-plugin-2.1.6-1 on both RHEL-5 and RHEL-6 and with the above two env. variables defined or not, the thing was working for me just fine: yum install ..., rhn_check, rhn-profile-sync, etc. did not try to contact the proxy defined in http_proxy/HTTP_PROXY at all. Not unless I enabled use of http proxy in /etc/sysconfig/rhn/up2date. I'm closing this one with worskforme.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.