Hide Forgot
Description of problem: Dnf does not inherit environment variables for proxy server http_proxy, ftp_proxy etc. Version-Release number of selected component (if applicable): dnf-1.1.8-1.fc24 How reproducible: Always Steps to Reproduce: 1. Set environment variable for proxy like # echo "export http_proxy=http://server:port" > /etc/profile.d/proxy.sh 2. Try to use dnf, and watch proxy server access log Actual results: dnf does not use proxy server from http_proxy Expected results: dnf inherits system variable Additional info: command line programs (wget, curl) uses variable
I confirm this bug, dns doesn't use proxy server even if its stated in /etc/dnf.conf
[root@localhost ~]# export http_proxy="http://user:pass@proxyhost:port" [root@localhost ~]# export https_proxy="http://user:pass@proxyhost:port" [root@localhost ~]# export ftp_proxy="http://user:pass@proxyhost:port" [root@localhost ~]# dnf list Error: Failed to synchronize cache for repo 'fedora' [root@localhost ~]# dnf -v list cachedir: /var/cache/dnf Loaded plugins: playground, reposync, builddep, needs-restarting, noroot, langpacks, copr, config-manager, download, Query, debuginfo-install, generate_completion_cache, protected_packages langpacks: No languages are enabled Error reading file : /var/lib/dnf/plugins/langpacks/installed_langpacks as it does not exist initialized Langpacks plugin DNF version: 1.1.8 Cannot download 'https://mirrors.fedoraproject.org/metalink?repo=updates-released-f24&arch=x86_64': Cannot prepare internal mirrorlist: Curl error (56): Failure when receiving data from the peer for https://mirrors.fedoraproject.org/metalink?repo=updates-released-f24&arch=x86_64 [Invalid file descriptor]. Error: Failed to synchronize cache for repo 'updates' [root@localhost ~]# curl "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f24&arch=x86_64" <?xml version="1.0" encoding="utf-8"?> <metalink version="3.0" xmlns="http://www.metalinker.org/" type="dynamic" pubdate="Fri, 20 May 2016 16:19:29 GMT" generator="mirrormanager" xmlns:mm0="http://fedorahosted.org/mirrormanager"> <files> <file name="repomd.xml"> <mm0:timestamp>1437058214</mm0:timestamp> <size>2970</size> <verification> <hash type="md5">9cee117ca21fdc68ec4d42525301cc16</hash> <hash type="sha1">8e8b2f316b7f0d9aa8e696bdb361055abdf5c025</hash> <hash type="sha256">0b96cd461103ed61d57f4aff62c4cb72736a752ec3f8ea1acef39503fbce86d4</hash> <hash type="sha512">d016b517c82db9cc987b58e231581bb2a2d5d6c6a58874d4c8789e9fcf60a8dc1072df73cdd565fb9e376f711a978d559b2246d664aea47b9482d85af9b1b380</hash> </verification> <resources maxconnections="1"> <url protocol="rsync" type="rsync" location="BR" preference="100" >rsync://fedora.c3sl.ufpr.br/fedora/linux/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="http" type="http" location="BR" preference="100" >http://fedora.c3sl.ufpr.br/linux/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="http" type="http" location="BR" preference="99" >http://mirror.globo.com/fedora/linux/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="ftp" type="ftp" location="EC" preference="98" >ftp://mirror.cedia.org.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="rsync" type="rsync" location="EC" preference="98" >rsync://mirror.cedia.org.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="http" type="http" location="EC" preference="98" >http://mirror.cedia.org.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="ftp" type="ftp" location="CL" preference="97" >ftp://fedora.gtdinternet.com/pub/Linux/Fedora/linux/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="http" type="http" location="CL" preference="97" >http://fedora.gtdinternet.com/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="rsync" type="rsync" location="EC" preference="96" >rsync://mirror.uta.edu.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="ftp" type="ftp" location="EC" preference="96" >ftp://mirror.uta.edu.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> <url protocol="http" type="http" location="EC" preference="96" >http://mirror.uta.edu.ec/fedora/updates/24/x86_64/repodata/repomd.xml</url> </resources> </file> </files> </metalink>
(In reply to Juan Pablo Firrincieli from comment #1) > I confirm this bug, dns doesn't use proxy server even if its stated in > /etc/dnf.conf Not sure if your path is wrong or you made a typo. Dnf keeps its configuration file under /etc/dnf/dnf.conf. For me it works if I specify a line in /etc/dnf/dnf.conf like: proxy=http://proxyserver:3128
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.