Portsnap with (broken) transparent proxy on 6.2
Craig Boston
craig at feniz.gank.org
Wed Apr 11 18:30:38 UTC 2007
Colin,
Normally I would contact you directly (off-list) with this report,
however I had tried searching Google for these symptoms and found no
resolutions, so I'm copying -stable for archival purposes in case
someone runs into a similar problem.
I recently decided to try out portsnap on a few machines. So far so
good, except for a few. There are several systems that I maintain which
are behind a transparent proxy (that I don't control and don't even
really know what it is). It seems this proxy doesn't correctly support
HTTP pipelining, and so the metadata updates fail.
It looks like this:
Fetching 2 metadata files... /usr/sbin/portsnap: cannot open
26700e16d411367c92b53d1aa48ab460fc64c4796b7aa15915e5de39eedab1cc.gz: No
such file or directory
metadata is corrupt.
The debug output doesn't add much to it other than
phttpget: Connection failure
It looks like it does successfully get the first file each time, but
loses the connection afterward. It would take a lot of invocations of
portsnap to get them all :)
I looked through the portsnap / phttpget source and didn't see an easy
way to disable pipelining. Perhaps some sort of override could be
added in the future to work around broken proxies? In the meantime, I
have replaced /usr/libexec/phttpget with the following shell script and
now everything is working fine:
-------------------------------
#!/bin/sh
SERVER=$1
shift
for x in "$@"; do
fetch "http://${SERVER}/${x}"
done
-------------------------------
Craig
More information about the freebsd-stable
mailing list