<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Upgrading Ubuntu from Jaunty to Karmic Behind a Proxy</title>
	<atom:link href="http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/</link>
	<description>A guy like me?</description>
	<lastBuildDate>Tue, 08 Jun 2010 14:32:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: asen</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-7331</link>
		<dc:creator>asen</dc:creator>
		<pubDate>Tue, 08 Jun 2010 14:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-7331</guid>
		<description>@Richard Baldry
Dude!  Thanks a lot.  Works like a charm.  Had I known this fix, would have been able to save atleast a couple of hours trying to search for a solution.  Anyway, better late than never :-).</description>
		<content:encoded><![CDATA[<p>@Richard Baldry<br />
Dude!  Thanks a lot.  Works like a charm.  Had I known this fix, would have been able to save atleast a couple of hours trying to search for a solution.  Anyway, better late than never <img src='http://blog.danfego.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim B</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-7108</link>
		<dc:creator>Tim B</dc:creator>
		<pubDate>Thu, 20 May 2010 00:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-7108</guid>
		<description>Richard&#039;s hack works wonders - upgrading to 10.04 on my laptop at work now, although I did have to slightly modify the hack. Had to match the indent of the lines below and leave off the semi-colon.

Also, remember to add the proxy username and password to apt.conf if you need one! I forgot the first time, and was left wondering why it was still failing (though not hanging at least).</description>
		<content:encoded><![CDATA[<p>Richard&#8217;s hack works wonders &#8211; upgrading to 10.04 on my laptop at work now, although I did have to slightly modify the hack. Had to match the indent of the lines below and leave off the semi-colon.</p>
<p>Also, remember to add the proxy username and password to apt.conf if you need one! I forgot the first time, and was left wondering why it was still failing (though not hanging at least).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-6857</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 03 May 2010 12:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-6857</guid>
		<description>&lt;a href=&quot;#comment-6833&quot; rel=&quot;nofollow&quot;&gt;@Richard Baldry&lt;/a&gt;
Ah Richard, you&#039;re the problem-solver I can&#039;t muster in myself in the morning. :-) Thanks for the hack!</description>
		<content:encoded><![CDATA[<p><a href="#comment-6833" rel="nofollow">@Richard Baldry</a><br />
Ah Richard, you&#8217;re the problem-solver I can&#8217;t muster in myself in the morning. <img src='http://blog.danfego.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks for the hack!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buge</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-6854</link>
		<dc:creator>buge</dc:creator>
		<pubDate>Mon, 03 May 2010 07:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-6854</guid>
		<description>&lt;a href=&quot;#comment-6833&quot; rel=&quot;nofollow&quot;&gt;@Richard Baldry&lt;/a&gt; Thanks for the hack! I managed to successfully upgrade that way. It&#039;s annoying that there seems to be a proxy bug of some sort in every release.</description>
		<content:encoded><![CDATA[<p><a href="#comment-6833" rel="nofollow">@Richard Baldry</a> Thanks for the hack! I managed to successfully upgrade that way. It&#8217;s annoying that there seems to be a proxy bug of some sort in every release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Baldry</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-6833</link>
		<dc:creator>Richard Baldry</dc:creator>
		<pubDate>Fri, 30 Apr 2010 18:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-6833</guid>
		<description>I&#039;ve just tried upgrading to Lucid from Jaunty behind a proxy and experienced the same problem.

The problem is not authenticating vs non-authenticating proxy. It happens with any explicit proxy - any situation where you have to specify a proxy address in order for any HTTP to work.

The problem stems from the function url_downloadable() in /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py. It looks like this function is called during the process of deciding which mirror to use. The intent of this function is simply to check whether a given URL works and I think it is used here to check whether a given mirror is up and available and serving the right files.

Unfortunately something in the way this function invokes the http library  means that the proxy settings are ignored. The library tries to make a direct connection to the site serving the url in question. You can see this by running &#039;netstat -at&#039; while the update process is hung - you will see a connection to a canonical.com host in the SYN_SENT state.

I don&#039;t have the inclination at this stage to work out how to re-plumb all this so the url_downloadable() check does respect proxy settings. However, I did use the following hack to make the installation work:

$ sudo vi /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py

Search for the &#039;url_downloadable&#039; function def. Now look for the following lines of code within that function and add &#039;return True;&#039; as shown:
    if scheme == &quot;http&quot;:
    import httplib
    try:
      return True;
      c = httplib.HTTPConnection(netloc)
      c.request(&quot;HEAD&quot;, path)

This basically bypasses the &#039;url_downloadable&#039; check and forces the upgrade process to assume it&#039;s succeeded. When the upgrade process comes to actually download and install stuff, it uses the proxy settings correctly.

This is clearly a bug in the Upgrade process.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve just tried upgrading to Lucid from Jaunty behind a proxy and experienced the same problem.</p>
<p>The problem is not authenticating vs non-authenticating proxy. It happens with any explicit proxy &#8211; any situation where you have to specify a proxy address in order for any HTTP to work.</p>
<p>The problem stems from the function url_downloadable() in /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py. It looks like this function is called during the process of deciding which mirror to use. The intent of this function is simply to check whether a given URL works and I think it is used here to check whether a given mirror is up and available and serving the right files.</p>
<p>Unfortunately something in the way this function invokes the http library  means that the proxy settings are ignored. The library tries to make a direct connection to the site serving the url in question. You can see this by running &#8216;netstat -at&#8217; while the update process is hung &#8211; you will see a connection to a canonical.com host in the SYN_SENT state.</p>
<p>I don&#8217;t have the inclination at this stage to work out how to re-plumb all this so the url_downloadable() check does respect proxy settings. However, I did use the following hack to make the installation work:</p>
<p>$ sudo vi /usr/lib/python2.6/dist-packages/UpdateManager/Core/utils.py</p>
<p>Search for the &#8216;url_downloadable&#8217; function def. Now look for the following lines of code within that function and add &#8216;return True;&#8217; as shown:<br />
    if scheme == &#8220;http&#8221;:<br />
    import httplib<br />
    try:<br />
      return True;<br />
      c = httplib.HTTPConnection(netloc)<br />
      c.request(&#8220;HEAD&#8221;, path)</p>
<p>This basically bypasses the &#8216;url_downloadable&#8217; check and forces the upgrade process to assume it&#8217;s succeeded. When the upgrade process comes to actually download and install stuff, it uses the proxy settings correctly.</p>
<p>This is clearly a bug in the Upgrade process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-4374</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 01 Dec 2009 15:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-4374</guid>
		<description>&lt;a href=&quot;#comment-4373&quot; rel=&quot;nofollow&quot;&gt;@Adam C&lt;/a&gt; 
Good catch! Though I&#039;m still not sure why a correct proxy value in that file (mine is there, though I never manually put it there) would cause failure. In any case, I&#039;ll certainly revisit your advice come the next upgrade if it&#039;s still an issue!</description>
		<content:encoded><![CDATA[<p><a href="#comment-4373" rel="nofollow">@Adam C</a><br />
Good catch! Though I&#8217;m still not sure why a correct proxy value in that file (mine is there, though I never manually put it there) would cause failure. In any case, I&#8217;ll certainly revisit your advice come the next upgrade if it&#8217;s still an issue!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam C</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-4373</link>
		<dc:creator>Adam C</dc:creator>
		<pubDate>Tue, 01 Dec 2009 15:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-4373</guid>
		<description>I had the same problem, with a bit of investigating it appears that the python file /usr/share/pyshared/DistUpgrade/utils.py is the cause of the problem. There is a function called init_proxy() which clears out the environment proxy and replaces it with whatever it finds in apt.conf/synaptic/gconf. 

My problem was that I had set a proxy in apt.conf a long time ago which was not wrong, clearing this out solved my problem. 

Might be worth a try checking those files or adding Acquire::http::Proxy &quot;http:///&quot;; 
to your /etc/apt/apt.conf file.</description>
		<content:encoded><![CDATA[<p>I had the same problem, with a bit of investigating it appears that the python file /usr/share/pyshared/DistUpgrade/utils.py is the cause of the problem. There is a function called init_proxy() which clears out the environment proxy and replaces it with whatever it finds in apt.conf/synaptic/gconf. </p>
<p>My problem was that I had set a proxy in apt.conf a long time ago which was not wrong, clearing this out solved my problem. </p>
<p>Might be worth a try checking those files or adding Acquire::http::Proxy &#8220;http:///&#8221;;<br />
to your /etc/apt/apt.conf file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-4010</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 04 Nov 2009 22:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-4010</guid>
		<description>&lt;a href=&quot;#comment-4009&quot; rel=&quot;nofollow&quot;&gt;@Tim B&lt;/a&gt; 
Good to point out: mine was an authenticating proxy. Didn&#039;t think about that being a factor. Not that I really had a choice about it. :)</description>
		<content:encoded><![CDATA[<p><a href="#comment-4009" rel="nofollow">@Tim B</a><br />
Good to point out: mine was an authenticating proxy. Didn&#8217;t think about that being a factor. Not that I really had a choice about it. <img src='http://blog.danfego.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim B</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-4009</link>
		<dc:creator>Tim B</dc:creator>
		<pubDate>Wed, 04 Nov 2009 22:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-4009</guid>
		<description>My laptop:
Authenticating proxy (workplace 1) = shows upgrade, but hangs when told to install.
Transparent proxy (workplace 2) = Goes fine. Not one error.

Workplace 1 desktop = Fail. Does not even show up an upgrade. Tried command line and GUI. Not happy as I specifically sat down 20 minutes ago with the intention of doing this today.


Canonical is going to lose a lot of Ubuntu users if they don&#039;t drop the stupidity and arrogance. They are becoming as bad as Microsoft and Apple.</description>
		<content:encoded><![CDATA[<p>My laptop:<br />
Authenticating proxy (workplace 1) = shows upgrade, but hangs when told to install.<br />
Transparent proxy (workplace 2) = Goes fine. Not one error.</p>
<p>Workplace 1 desktop = Fail. Does not even show up an upgrade. Tried command line and GUI. Not happy as I specifically sat down 20 minutes ago with the intention of doing this today.</p>
<p>Canonical is going to lose a lot of Ubuntu users if they don&#8217;t drop the stupidity and arrogance. They are becoming as bad as Microsoft and Apple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wenbert</title>
		<link>http://blog.danfego.net/2009/11/upgrading-ubuntu-from-jaunty-to-karmic-behind-a-proxy/comment-page-1/#comment-4001</link>
		<dc:creator>wenbert</dc:creator>
		<pubDate>Wed, 04 Nov 2009 11:14:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.danfego.net/?p=285#comment-4001</guid>
		<description>Hi,

Thanks for this. Not one article in the Ubuntu forums mentioned problems when upgrading behind a proxy server.

Thanks,
Wenbert</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for this. Not one article in the Ubuntu forums mentioned problems when upgrading behind a proxy server.</p>
<p>Thanks,<br />
Wenbert</p>
]]></content:encoded>
	</item>
</channel>
</rss>
