No good proxy conf, for synaptic...

Bug #56655 reported by Robert Casanova
14
Affects Status Importance Assigned to Milestone
synaptic (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When the gnome proxy is configured (host,port,user,pass), at gnome-network-preferences every gnome applet works fine, and the configuration helper export the information correctly to the console.
But for some reason the configuration doesn't work for synaptic, which has to be initialized from the console to make it work, don't know if there other application affected.
Maybe synaptic doesn't use the gnome configuration?

Revision history for this message
Sebastien Bacher (seb128) wrote :

that's a synaptic issue, reassigning

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

Could you please open a gnome-terminal and run:
$ echo http_proxy
and attach the result to this bugreport?
(and edit the password if it is changed there). How do you start synaptic? Via gksu? Or the gnome-terminal? It should pick up the proxy information from the http_proxy environment.

Cheers,
 Michael

Changed in synaptic:
status: Unconfirmed → Needs Info
Revision history for this message
Robert Casanova (secoder) wrote :

with dapper it shows :

"http://proxy.empresa.com:8080/"

and with edgy :

"http://robert:<email address hidden>:8080/"

I usually start synaptic from the System menu, but when I'm at my workplace with a proxy I use the terminal. "sudo synaptic".

Revision history for this message
Robert Casanova (secoder) wrote :

More info :

1.- gnome proxy set
2.- synaptic proxy set
3.- run from console

1 2 3 Result
Y N N N
Y Y N N
Y Y Y Y
Y N Y Y
N N Y N
N Y N Y

I tested all the possible options... it looks like the synaptic configuration excludes all other configurations and the gnome proxy configuration only works from console.

Revision history for this message
Robert Casanova (secoder) wrote :

I was wondering if the info I supplied was enough to confirm the problem?

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

Thanks for your detailed test and the added information. I didn't managed to test/debug the problem yet, sorry for this.

It seems like there is a bug in gksu somehow because gksu should export the current gconf proxy information to the applications started via gksu. So if synaptic is started from the system menu, the http_proxy information should be set in the environment of synaptic. I don't know (currently) why this dosn't work for you.

Cheers,
 Michael

Changed in synaptic:
status: Needs Info → Unconfirmed
importance: Undecided → Medium
Revision history for this message
blackbit (blackbit-net) wrote :

I can confirm this problem. Exactly the same behavior on my Edgy Eft laptop.

Revision history for this message
Jens (jens-launchpad-net) wrote :

Same behaviour here. I am behind a firewall that mandates proxy usage. So i cannot use the web without a proxy, and neither can APT.

When I activate my network connection this little Synaptic helper pops up in my deskbar saying there are updates available, but cannot download them (nor can it download the changelog information that the application-updater wants to display).

I wonder where it gets the info there are updates available, when it can't pass the proxy ... but maybe this helps track the problem. it seems only apps started with admin privileges have this problem.

Specifying http_proxy and ftp_proxy in the console and then using 'apt-get update; apt-get upgrade' works fine.
(Although I would really like this config to be read from the globale configuration too ... also for Firefox. Why is there not a _single_ place to configure your proxy, or set an automatic proxy? That would really be a plus.)

Jens

Revision history for this message
Robert Casanova (secoder) wrote :

It still happens here, edgy and feisty

Changed in synaptic:
status: Unconfirmed → Confirmed
Revision history for this message
Chris Clonch (cacack) wrote :

I can confirm this in feisty. Only updating via the console using apt-get works. I have the proxy configured in /etc/apt/apt.conf, in Control Center > Network Proxy, and in Synaptic. Neither the update manager nor Synaptic work.

Also can not get Adept (in Kubuntu Feisty) to work either. Same problem there; updating from the console only works.

Revision history for this message
pastk (pastk) wrote :

I can confirm it too.
Edgy i386 ran on VirtualBox VM under WinXP.

I did some investigation and here are the results:

Synaptic works fine when proxy settings are specified in a 'user:<email address hidden>' form either in apt.conf or in synaptic gui (prefs -> network). Although it's somewhat confusing, because synaptic doesn't show if it is using settings from apt.conf (prefs -> network set to direct) and all works. It will be better to store settings from gui directly to apt.conf, or to provide a third option 'use proxy settings from apt.conf'.

Now I set proxy settings in gnome config (prefs -> network proxy).
And this is where the real fun is :)
If specified in the form 'user:<email address hidden>', then synaptic works fine! But apt-get fails! Because 'env' says, that var http_proxy is set to 'user:pwd@user:<email address hidden>'. Now let's start synaptic from the terminal: 'gksu synamptic' - it fails as apt-get.

Now I specify 'proxy.com' in gnome network proxy settings (creditentials are specified now only in 'details'). 'env' says, that http_proxy is set to 'user:<email address hidden>' and now apt-get works. But synaptic doesn't (407 proxy auth required)! And when started from term as 'gksu synaptic' - guess what? Of course, it works! :)

The real mess, right?

But here is more:
(don't know - maybe it's better to file it as a new bug)

All previos test were done with a login and password generously provided by my collegue.
Because I didn't manage to succed with my own creditentials. The reason is that my pwd contains following sequence of characters like '&%f)'.

When such pwd is specified in apt.conf nor synaptic, neither apt-get work. When specified as env var all is fine. So, I think, that apt-get (and synaptic) doesn't handle some characters correctly. When specified through apt.conf synaptic even showed (in it's prefs -> network) some ugly special symbol instead of '&%f)' in the middle of my password - as it handled it like a html entity.

Hope, that my comments will help you to resolve the problem.

Revision history for this message
Henning Moll (drscott) wrote :

Here's an easy way to reproduce the problem (tested with feisty):

1. Set (fake) proxy information via "System->Preferences->Network proxy". Enter also (fake) authentication data (Button "Details").
2. Use Alt-F2 to start "gnome-terminal". In that terminal execute the command "echo $http_proxy".
3. Use Alt-F2 to start "gksu gnome-terminal". In that terminal execute the command "echo $http_proxy". The authentication data is now missing.

The problem is, that synaptic is started in the same way...

As a workaround clear the authentication data in the "Details" dialog (don't forget to clear the checkbox in that dialog!) and change the proxy domain name in the main dialog from

<proxy>

to

<user>:<password>@<proxy>

Revision history for this message
Sascha Grossenbacher (berdir) wrote :

Since my test upgrade to hardy, I have a similiar probem with gksudo *and* normal sudo.

Every application (apt-get, apport, hwdb, ...) startet with (gk)sudo does not use the proxy and the connection times out. For apt-get I configured the proxy directly in /etc/apt/apt.conf.d/, but this is not possible for every program.

For example, I tried to "apport-retrace" a crash report, it begins to work until it finds a file, which is not part of a package:
sudo apport-retrace -g _usr_bin_php5.1000.crash

[...]
WARNING: libc6-i686-dbgsym is not available
WARNING: libpng12-0-dbgsym is not available
Traceback (most recent call last):
  File "/usr/bin/apport-retrace", line 446, in <module>
    options.unpack_only, options.no_dpkg, options.extra_packages)
  File "/usr/bin/apport-retrace", line 271, in install_missing_packages
    pkg = apport.packaging.get_file_package(l, True)
  File "/var/lib/python-support/python2.5/apport/packaging_impl.py", line 205, in get_file_package
    return self._search_contents(file, map_cachedir)
  File "/var/lib/python-support/python2.5/apport/packaging_impl.py", line 357, in _search_contents
    urllib.urlretrieve(url, map)
  File "/usr/lib/python2.5/urllib.py", line 89, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.5/urllib.py", line 222, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.5/urllib.py", line 190, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.5/urllib.py", line 325, in open_http
    h.endheaders()
  File "/usr/lib/python2.5/httplib.py", line 856, in endheaders
    self._send_output()
  File "/usr/lib/python2.5/httplib.py", line 728, in _send_output
    self.send(msg)
  File "/usr/lib/python2.5/httplib.py", line 695, in send
    self.connect()
  File "/usr/lib/python2.5/httplib.py", line 679, in connect
    raise socket.error, msg
IOError: [Errno socket error] (110, 'Connection timed out')
Exception exceptions.ImportError: ImportError('No module named shutil',) in <bound method __AptDpkgPackageInfo.__del__ of <apport.packaging_impl.__AptDpkgPackageInfo instance at 0x835520c>> ignored
---------------

When I explicitly set the proxy, for example with the following command, it does work:
sudo http_proxy=$http_proxy apport-retrace -g _usr_bin_php5.1000.crash
[....]
WARNING: libpng12-0-dbgsym is not available
WARNING: /usr/lib/php5/20060613+lfs/ssh2.so is needed, but cannot be mapped to a package
WARNING: libtidy-0.99-0-dbgsym is not available
WARNING: libexpat1-dbgsym is not available
WARNING: libc6-i686-dbgsym is not available
WARNING: libtasn1-3-dbgsym is not available
[...]
Core was generated by `/usr/bin/php -d html_errors=off -qC /usr/share/php/phing.php -logger phing.list'.
Program terminated with signal 11, Segmentation fault.
#0 0x0829e00c in ?? ()

I hope this does help to resolve the problem.

 (the php problem has to do with a self compiled php extension, so I am not reporting it as a bug, it is only an example)

Revision history for this message
verb3k (verb3k) wrote :

I confirm this bug, proxy configurations don't take effect in synaptic and apt-get until you log out/in or reboot. Really bad to know this hasn't been fixed in Hardy :(

Revision history for this message
Stonekeeper (lea-anthony) wrote :

Can confirm this is a problem with hardy. Really, we should have a single proxy config which all programs use. There are too many proxy configs.

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.