Bug 1226156 - yumex-dnf fails to sync cache when using proxy
Summary: yumex-dnf fails to sync cache when using proxy
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex-dnf
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-29 06:01 UTC by Per Arnold Blåsmo
Modified: 2015-11-18 17:13 UTC (History)
2 users (show)

Fixed In Version: dnfdaemon-0.3.10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-18 17:13:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Per Arnold Blåsmo 2015-05-29 06:01:49 UTC
Description of problem:
yumex-dnf fails when running behind a proxy

Version-Release number of selected component (if applicable):
yumex-dnf 4.1.3-1.fc22

How reproducible:
Add to /etc/dnf/dnf.conf the config line:
proxy=http://your.proxy.com:port

replace with a real proxy address and port.

Steps to Reproduce:
1. Open terminal window
2. start yumex-dnf
3. a window pops up with message "Could not refresh the DNG cache (root)"
4. terminall window shows error message below

Actual results:
on_ErrorMessage : Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64': Cannot prepare internal mirrorlist: Curl error (7): Couldn't connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64 [Failed to connect to mirrors.fedoraproject.org port 443: Connection refused]


Expected results:
No error message

Additional info:

Comment 1 Per Arnold Blåsmo 2015-05-29 06:10:14 UTC
I have tried setting the proxy by adding 
proxy = <proxy_host>:<proxy_port>
to the file ~/.curlrc , but that did not help.

I also have the 
export http_proxy=http://<proxy_host>:<proxy_port>

in my shell.

Comment 2 Tim Lauridsen 2015-05-29 10:34:06 UTC
Does dnf command line work ?

Comment 3 Per Arnold Blåsmo 2015-05-29 15:41:25 UTC
Yes, command line works.

Comment 4 Dave Windsor 2015-06-01 14:22:59 UTC
I have the exact same issue on Fedora 22, x86_64.  Command line dnf works behind a proxy, but yumex-dnf cannot refresh cache, even with root's .curlrc modified as mentioned above.

dnf-0:1.0.0-1.fc22.noarch
yumex-dnf-4.1.2-1.fc22.noarch

Comment 5 Tim Lauridsen 2015-06-04 04:30:27 UTC
Do you have added you proxy information to dnf.conf ?

I dont work to add it to ~/.curlrc or export http_proxy=http://<proxy_host>:<proxy_port>, because yumex-dnf is using a dbus backend running as root so it will not us the users environment.

you can try do a 'su -' and add a .curlrc for root

adding a proxy= line to /etc/dnf/dnf.conf should work for dnf, but will not work for yumex before next release, because an issue fixed upstream

https://github.com/timlau/dnf-daemon/commit/f45231c3707c46be6f7d3234b236550f50fc6793

you can test it by doing a git checkout of dnfdaemon

git clone https://github.com/timlau/dnf-daemon.git
cd dnf-daemon
make start-system

start yumex-dnf from the main menu

you must add the proxy=http://<proxy_host>:<proxy_port> to dnf.conf first

Comment 6 Per Arnold Blåsmo 2015-06-12 12:05:41 UTC
(In reply to Tim Lauridsen from comment #5)
> Do you have added you proxy information to dnf.conf ?
yes
> you can test it by doing a git checkout of dnfdaemon
> 
> git clone https://github.com/timlau/dnf-daemon.git
> cd dnf-daemon
> make start-system
> 
> start yumex-dnf from the main menu
> 

I tested, and it worked :-)
I will await the new version of the dnfdaemon then.

Comment 7 Dave Windsor 2015-06-12 14:03:05 UTC
I also tested the above fix, and  it worked.  yumex-dnf is now able to refresh the metadata and search for packages.  However, whenever I try to select a new package and apply pending changes, I get python errors.  The traceback shows errors in the test dnfdaemon code: 

g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/dbus/service.py", line 826, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/home/dlw3an/dnf/dnf-daemon/python/dnfdaemon/server/__init__.py", line 83, in newFunc
    rc = func(*args, **kwargs)
TypeError: RunTransaction() got multiple values for argument 'sender'
 (36)

dnf.conf has the "proxy= " entry, and my userid and root both have a .curlrc that also specifies the proxy.

I am happy, though.  I can use yumex-dnf to search, and the dnf command line works fine, so I can get by.  Thanks for your efforts!

Comment 8 Per Arnold Blåsmo 2015-08-17 09:31:46 UTC
Is there any plans for "bumping" a new version of dnfdaemon so that this fix get released? Current version 0.9.3 does not include this fix.


Note You need to log in before you can comment on or make changes to this bug.