Bug 101281 - Package fails when proxy is set.
Summary: Package fails when proxy is set.
Status: RESOLVED FIXED
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-02 21:29 UTC by Trevor Davenport
Modified: 2018-01-16 17:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Trevor Davenport 2017-06-02 21:29:53 UTC
PackageKit(and anything that uses it) fails to work with a proxy.  This makes gnome-software unusable as well as all features that gnome tries to rely on for installing software when its needed (like drivers or codecs).  Manually running dnf works fine for updates or installing software.

For example:
$ pkcon refresh
Command failed: The proxy could not be set: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._pk_2dengine_2derror_2dquark.Code3: setting the proxy failed: failed to get the session


Verbose logging reports this:
$ sudo killall packagekitd
$ sudo /usr/libexec/packagekitd --verbose
15:18:35	PackageKit          Verbose debugging enabled (on console 1)
15:18:35	PackageKit          daemon shutdown set to 0 seconds
15:18:35	PackageKit          setting config file watch on /etc/PackageKit/PackageKit.conf
15:18:35	PackageKit          Trying to load : dnf
15:18:35	PackageKit          dlopening '/usr/lib64/packagekit-backend/libpk_backend_dnf.so'
15:18:35	PackageKit-DNF      Using Dnf 0.8.0
15:18:35	PackageKit-DNF      Using librepo 1.7.20
15:18:35	PackageKit          trying to open database '/var/lib/PackageKit/transactions.db'
15:18:35	PackageKit          job count is now at 213
15:18:35	PackageKit          PkEngine: acquired name: org.freedesktop.PackageKit
15:18:58	PackageKit          SetProxy method called: http://10.0.0.1:8000/, ftp://10.0.0.1:2100
15:18:58	PackageKit          failed to get session, errno -6
15:18:58	PackageKit          failed to get the session for :1.169
15:18:58	PackageKit          failed to get session, errno -6


The following environment variables are set:
ftp_proxy="ftp://10.0.0.1:2100"
http_proxy="http://10.0.0.1:8000/"
https_proxy="http://10.0.0.1:8000/"
no_proxy="localhost,127.0.0.0/8,::1,172.29.131.1,10.0.0.0/24"
rsync_proxy="10.0.0.1:8000"


See redhat bug https://bugzilla.redhat.com/show_bug.cgi?id=1348843
Comment 1 Trevor Davenport 2017-06-02 21:31:14 UTC
Forgot to add, this issues has been present for a while as can be seen in the redhat bug.  It is still present in F26 beta(or whatever is current as of 2-JUN-2017)
Comment 2 Trevor Davenport 2017-06-13 21:56:18 UTC
The first "failed to get session, errno -6" appears to be from sd_pid_get_session which says it will return -ENODATA for "processes not being part of a login session."
Comment 3 Kalev Lember 2018-01-16 17:29:00 UTC
Thanks, should be fixed in https://github.com/hughsie/PackageKit/commit/404c9c1e02c5b06d816b5ec5a4fcabbed9cade8a


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.