Synaptic, update-manager, apt-get and wget should share proxy settings

Bug #283500 reported by Scott Ritchie
180
This bug affects 45 people
Affects Status Importance Assigned to Milestone
synaptic
New
Undecided
Unassigned
apt (Ubuntu)
Fix Released
Undecided
Unassigned
synaptic (Ubuntu)
Fix Released
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: synaptic

I installed Intrepid on one of my lab machines today. It needs to use a proxy server to get updates.

What I did was:
Go to Synaptic, Settings->Preferences->Network

I then entered my proxy server information there. Things seemed to work since I could then refresh packages, so I closed it.

The update manager then told me I had updates to install, so I clicked on the update manager. The update manager, however, doesn't use Synaptic's proxy configuration settings -- it uses its own. So, everything failed, and in order to fix it I had to go to the Gnome Network Proxy preferences and configure one there globally (then click "apply system-wide")

This is all less than ideal.

I can't think of a use case where a user would want to have different proxy configuration for Synaptic and update manager (or command-line apt-get, for that matter). So, they should use the same setting, in a standard way. It would be nice if Synaptic made it obvious if it was using a system-wide setting that Gnome set as well - something like a checkbox or radio button for "use system-wide proxy settings".

Revision history for this message
Charlie Kravetz (charlie-tca) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in apt:
importance: Undecided → Low
status: New → Confirmed
Changed in synaptic:
importance: Undecided → Low
status: New → Confirmed
Changed in update-manager:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Jairo Sanchez (xjrsanchezx) wrote :

Synaptic sometimes fails too when reconfiguring it to direct connection. If you configure it to connect via proxy and then you reconfigure it to direct connection it still tries to connect via proxy. I think that it would be interesting that synaptic accesses the network using gnome proxy configuration.

Revision history for this message
at78rpm (ehoops) wrote :

I too have been bedeviled by this bug for a long time. I thought Intrepid might have a fix. What I don't understand is why NTLmaps works for some but not for others. I'm behind a proxy whose port is 800; those I've seen where NTL works use port 5865. Not sure if that's germaine, but it's something I've noticed.

This is a really bothersome bug, because I'm unable to update any computers in our lab here at school. They're still running Ubuntu Gutsy -- with no updates since it was installed.

Revision history for this message
Akdo (menoft) wrote :

Confirmed on jaunty !!!!!

Please this is horrible when we change often proxy configuration.

I think this is a security bug too because in that case synaptic AND network proxy save at the same time the squid login & password.

tags: added: apt proxy synaptic update-manager wget
summary: - Synaptic, update-manager, and apt-get should share proxy settings
+ Synaptic, update-manager, apt-get and wget should share proxy settings
Revision history for this message
Mike Smith - dominoconsultant (dominoconsultant) wrote :

me too - bump

This get's me twice every day when I change between my work and home networks

Revision history for this message
Naaman Campbell (naamanc) wrote :

Confirmed on Karmic - Alpha 5.

A fix needs to be contributed to utilise the Network Proxy Preferences tool to ensure that all package management applications honour the settings defined.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

What proxy settings do you have? Is this a proxy that requires authentication? The bug should be fixed already in jaunty (unless authentication is used). What happens if you open a gnome-termianl and type:
$ echo $http_proxy ?

Revision history for this message
Naaman Campbell (naamanc) wrote : Re: [Bug 283500] Re: Synaptic, update-manager, apt-get and wget should share proxy settings

Yes, this is a proxy that requires authentication.
The results of $http_proxy does not include the authentication
credentials if it is set "system wide" on Karmic Alpha 5:

http_proxy=http://proxy.domain.com:8080/

For $http_proxy to work, I use the following:

http_proxy=http://username:<email address hidden>:8080/

Revision history for this message
at78rpm (ehoops) wrote :

Absolutely NOTHING works for me trying to get updates. $http_proxy output is http_proxy=http://myusername:<email address hidden>:800/ -- because the proxy port is 800. I've tried 5865, 8080, and others that I've seen posted in "fixes" that don't work for me.

I am absolutely at my wits' end in trying to figure this out. I started with Gutsy, updated to Hardy in hopes there was a fix; then to Intrepid, hoping the same; then to Jaunty; now to Karmic, and still no joy.

I've tried setting Network Proxy with authentication and without. With direct connection. Tried Synaptic with proxy settings and authentication, also with direct connection. 407: Proxy authentication required in all cases.

Has anyone found a solution to this maddening problem?

Revision history for this message
Eshwar Andhavarapu (eshwar.andhavarapu) wrote :

after setting global proxy settings in network proxy, also edit /etc/wgetrc and add a line http_proxy = http://username:password@host:port

edit the file as root obviously. everything then seems to work :)

Revision history for this message
Eshwar Andhavarapu (eshwar.andhavarapu) wrote :

oh similar for https as well. scroll down in wgetrc and you'll see a section about proxies.

Revision history for this message
QianHao (yorua007) wrote :

After upgrading to ubuntu10.10,I can not install packages in the terminal using the command "apt -get install packagenames" with the environment variable "http_proxy" set properly in the terminal.I have to set the proxy in the apt.conf file in the /etc/apt directory or use the "-o Acquire::http::Proxy" option in the command line.But in the man page of apt.conf, it still writes that "The http_proxy environment variable will override all settings".I don't know whether this is a bug or not.Maybe it's just time to update the man pages.

Revision history for this message
Hugh Parker (hcp) wrote :

I think the importance is labelled wrong, but I can't change it.

Schools, most other public sector organisations, and most medium-to-large businesses access the web from behind a firewall that blocks all web traffic except through a proxy. This means that anyone at those organisations who uses ubuntu is going to find that web pages can't use flash, several of their favourite fonts won't install, etc.

I think this is a serious obstacle to solving bug 1.

Revision history for this message
Fernando (fernando-018) wrote :

Please, see some additional technical information related to the bug here:
https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/604665
Regards.

Revision history for this message
at78rpm (ehoops) wrote :

Hugh Parker wrote, "Schools, most other public sector organisations, and most medium-to-large businesses..."

Indeed, this is the case. I'm in a school, and I have spent probably a total of 1000 hours trying to configure my Ubuntu (all the way back to 6.04) for updates -- all to no avail. I've tried everything. Absolutely this is the most annoying bug in any operating system I've ever encountered.

Revision history for this message
Dereck Wonnacott (dereck) wrote :

As noted in other comments setting the 'system wide proxy' did not work for me, even though I can see the env vars set correctly. The following fixed my problem with 'flashplugin-installer'

sudo gedit /etc/wgetrc

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://WWW.XXX.YYY.ZZZ:####/
http_proxy = http://WWW.XXX.YYY.ZZZ:####/
ftp_proxy = http://WWW.XXX.YYY.ZZZ:####/

# If you do not want to use proxy at all, set this to off.
use_proxy = on

Revision history for this message
Dereck Wonnacott (dereck) wrote :

Oh yes, I also needed to do this to get any updates to work:

sudo gedit /etc/apt/apt.conf

Acquire::http::Proxy "http://WWW.XXX.YYY.ZZZ:####";

Changed in synaptic:
status: New → Invalid
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Thank you for taking the time to report this issue in the One Hundred Paper Cuts project. However, I am rejecting this as a paper cut because it is not a simple usability issue in default or featured applications, but instead a larger, complex problem.
Don't worry, I'm ONLY setting this as Invalid for the One Hundred Paper Cuts project.

Because there appears to be quite some uncertainty about where this bug is caused and how widespread it is, I'm setting the statuses of this bug in the Ubuntu packages to Incomplete and the importances to Undecided. This should also help to make this bug show up on the radar of the right people again.

affects: hundredpapercuts → null
Changed in null:
status: New → Invalid
Changed in apt (Ubuntu):
importance: Low → Undecided
status: Confirmed → Incomplete
Changed in synaptic (Ubuntu):
importance: Low → Undecided
status: Confirmed → Incomplete
Changed in update-manager (Ubuntu):
importance: Low → Undecided
status: Confirmed → Incomplete
Changed in synaptic:
status: Invalid → New
Curtis Hovey (sinzui)
no longer affects: null
Revision history for this message
Brian Murray (brian-murray) wrote :

Currently in Precise, the development release of Ubuntu that will become 12.04, if you setup a network proxy in the Network portion of System Settings this will be set in /etc/environment and /etc/apt/apt.conf. Subsequently, update-manger, apt, synaptic and wget will all use the same settings. So I am setting this to Fix Released.

Changed in apt (Ubuntu):
status: Incomplete → Fix Released
Changed in synaptic (Ubuntu):
status: Incomplete → Fix Released
Changed in update-manager (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
ender (ender46) wrote :

I don't think this issue is fixed in 12.04 beta.

I have set my proxy settings in Network Settings, in ~/.bashrc, in /etc/apt.conf and in /etc/wgetrc (as I used to do in 10.04 and 10.10). Web browsers work, wget works and updates (both graphical and via apt-get) work, except for the flashplugin-installer, which times out when trying to download the file:

flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.233.orig.tar.gz
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 234, in process_download_requests
    dest_file = urllib.urlretrieve(files[i])[0]
  File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
IOError: [Errno socket error] [Errno 110] Connection timed out

I never heard of /etc/environment, and looking at the file I see nothing proxy related:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANGUAGE="en_US:en"
LANG="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"

It's definely a regression since with this very configuration I could update flash in 10.04 no problem. Should I open a new bug report or continue with this one? Also if you need more info on my system I'll be happy to provide it, I'm running an updated 12.04, with 3.2.0-23-generic kernel, x86_64.

Revision history for this message
PrivateUser132781 (privateuser132781-deactivatedaccount) wrote :

I also continue to see this issue in 12.04. Like @ender46 I have my proxy set up in Network Settings, apt.conf and /etc/wgetrc and also as an environment variable for root. Despite this, when flashplugin-installer and ttf-mscorefonts-installer try to download files the downloads time out.

Revision history for this message
Kalsan (info-kalsan) wrote :

Running apt-get upgrade through a proxy:

flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.236.orig.tar.gz
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 234, in process_download_requests
    dest_file = urllib.urlretrieve(files[i])[0]
  File "/usr/lib/python2.7/urllib.py", line 93, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 239, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
IOError: [Errno socket error] [Errno 110] Connection timed out

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.