I have setup my apache to act as proxy server by configuring it as:

[server]# cat /etc/apache2/httpd.conf
ProxyRequests on
<Proxy *>
    Order deny,allow
    Deny from all
    Allow from

and a client at uses yum to update/install system packages via this proxy:

[client]# grep proxy /etc/yum.conf

I also have proper environment variables for proxy usage as follows:

[client]# cat .bashrc
export http_proxy=$mytunnel
export ftp_proxy=$mytunnel
export HTTP_PROXY=$http_proxy
export FTP_PROXY=$ftp_proxy

When yum tries to update its repositories, it complains about connection times out for certain FTP links as follows

[client]# yum -v repolist
Loading "fastestmirror" plugin
Loading "protectbase" plugin
Config time: 0.067
Yum Version: 3.2.22
Loading mirror speeds from cached hostfile
 * base: ftp.oss.eznetsols.org
 * centosplus: ftp.oss.eznetsols.org
 * extras: ftp.oss.eznetsols.org
 * rpmforge: apt.sw.be
 * updates: ftp.oss.eznetsols.org
ftp://ftp.oss.eznetsols.org/linux/centos/5.7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.

I can curl or wget the complaining URL as follows (I have proper *_proxy env vars):

[client]# wget ftp://ftp.oss.eznetsols.org/linux/centos/5.7/os/x86_64/repodata/repomd.xml
--2011-11-30 03:28:33--  ftp://ftp.oss.eznetsols.org/linux/centos/5.7/os/x86_64/repodata/repomd.xml
Connecting to connected.
Proxy request sent, awaiting response... 200 OK
Length: 1140 (1.1K) [application/xml]
Saving to: `repomd.xml'

I am guessing that the FTP connection from yum is not forwarded properly by my Apache Proxy server as I can see that its trying to connect to wrong port by looking at apache2 error logs as:

[server]# tail -n1 /var/log/apache2/error.log
[Wed Nov 30 15:50:39 2011] [error] (110)Connection timed out: proxy: FTP: attempt to connect to (*) failed
[server]# host domain name pointer ftp.oss.eznetsols.org.

The [server]# is a debian (ubuntu 11.04 desktop) while [client]# is CentOS-5.7 (yeah, I can see you are laughing)
What am I missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.