Bug 1136896 - DNF doesn't appear to obey proxy settings in dnf.conf
Summary: DNF doesn't appear to obey proxy settings in dnf.conf
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 14:30 UTC by Kodiak Firesmith
Modified: 2015-07-20 11:06 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-15 11:56:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kodiak Firesmith 2014-09-03 14:30:51 UTC
Description of problem:
DNF doesn't obey proxy settings as yum does.  This causes problems for those operating in an environment using a proxy.  

Version-Release number of selected component (if applicable):
dnf.noarch                             0.4.8-1.fc20                    @anaconda


How reproducible:
Step 1: Put a Fedora 20 computer behind a proxy.
Step 2: Set proxy setting in /etc/dnf/dnf.conf
Step 3: systemctl restart dnf-makecache.service
Step 4: watch the fail as logged to /var/log/messages


Actual results:
DNF makecache attempts to curl out directly to Fedora mirrors.

Expected results:
DNF makecache should utilize the proxy as defined in it's own conf file as documented in DNF docs.

Additional info:

Sep  3 10:11:23 vm-ksftest01 systemd: Starting dnf makecache...
Sep  3 10:11:24 vm-ksftest01 dnf: Config time: 0.004
Sep  3 10:11:24 vm-ksftest01 dnf: cachedir: /var/cache/dnf/x86_64/20
Sep  3 10:11:24 vm-ksftest01 dnf: dnf version: 0.4.8
Sep  3 10:11:24 vm-ksftest01 dnf: Making cache files for all metadata files.
Sep  3 10:11:24 vm-ksftest01 dnf: fedora: has expired and will be refreshed.
Sep  3 10:11:24 vm-ksftest01 dnf: updates: has expired and will be refreshed.
Sep  3 10:11:24 vm-ksftest01 dnf: repo: downloading from remote: fedora
Sep  3 10:11:39 vm-ksftest01 dnf: not found deltainfo for: Fedora 20 - x86_64
Sep  3 10:11:55 vm-ksftest01 dnf: repo: downloading from remote: updates
Sep  3 10:12:05 vm-ksftest01 dnf: Error: Problem with repo 'updates': Cannot download repomd.xml: Curl error: Timeout was reached for ftp://mirror.uoregon.edu/fedora/updates/20/x86_64/repodata/repomd.xml
Sep  3 10:12:06 vm-ksftest01 systemd: dnf-makecache.service: main process exited, code=exited, status=1/FAILURE
Sep  3 10:12:06 vm-ksftest01 systemd: Failed to start dnf makecache.
Sep  3 10:12:06 vm-ksftest01 systemd: Unit dnf-makecache.service entered failed state.


[root@vm-ksftest01 log]# ls -lah /etc/dnf/dnf.conf 
-rw-r--r--. 1 root root 131 Sep  3 09:11 /etc/dnf/dnf.conf
[root@vm-ksftest01 log]# grep proxy /etc/dnf/dnf.conf 
proxy=https://proxy.some.edu:8080

Comment 1 Ales Kozumplik 2014-09-04 05:34:22 UTC
Hello, can you please confirm still seeing this in dnf-0.5.5 or more recent? There has been several changes to the proxy feature prior to this release. Thank you!

Comment 2 Kodiak Firesmith 2014-09-04 12:56:46 UTC
Latest I can get on Fedora 20 is dnf-0.5.4-2.fc20.noarch, which I've upgraded to and re-enabled the services on.  We'll see if the issue pops back up.

Comment 3 Ales Kozumplik 2014-09-04 13:12:31 UTC
let's keep this in needinfo please until then.

Comment 4 Ales Kozumplik 2014-09-04 13:14:37 UTC
Note that proxy username and password don't work until 0.5.5. That's a documented issue.

Comment 5 Kodiak Firesmith 2014-09-04 13:15:57 UTC
Good to know - luckily this is an unauthenticated proxy within our enterprise so that is not part of my problem.  Hopefully updating to latest Fedora 20 package will sort me out.

Thanks again.

Comment 6 Kodiak Firesmith 2014-09-15 11:56:35 UTC
This appears to be good in 0.5.4.  Thanks again.

Comment 7 Joe Borg 2015-02-06 09:03:51 UTC
This seems to still be broken if you're using a proxy username and password.  I've tried the yum way like

proxy=https://proxyserver:8080
proxy_username=user
proxy_password=pwd

And the shell way like

proxy=https://user:pwd@proxyserver:8080

But always get 

('Connection aborted.', error(111, 'Connection refused'))

Comment 8 Honza Silhan 2015-03-03 15:00:42 UTC
Joe, can you set up temporary remote proxy server and share with us username/pass (in form you prefer) as your the only one who has the problems?

Comment 9 Joe Borg 2015-07-20 11:06:01 UTC
Sorry Jan, it's in a company so I cannot.  I can confirm that it's fixed though.

Thanks


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