Version-Release number of selected component: packagedb-cli-2.9-1.fc24 Additional info: reporter: libreport-2.6.2 cmdline: /usr/bin/python /usr/bin/pkgdb-cli acl rubygem-i18n_data executable: /usr/bin/pkgdb-cli kernel: 4.3.0-0.rc2.git1.1.fc24.x86_64 runlevel: N 5 type: Python uid: 16025 Truncated backtrace: base.py:652:login:BugzillaError: Login failed: The username or password you entered is not valid. Traceback (most recent call last): File "/usr/bin/pkgdb-cli", line 9, in <module> load_entry_point('packagedb-cli==2.9', 'console_scripts', 'pkgdb-cli')() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point return ep.load() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load return self.resolve() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python2.7/site-packages/pkgdb2client/cli.py", line 28, in <module> import pkgdb2client.utils File "/usr/lib/python2.7/site-packages/pkgdb2client/utils.py", line 40, in <module> BZCLIENT = Bugzilla(url=RH_BZ_API) File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 396, in __init__ self.__class__.__init__(self, **kwargs) File "/usr/lib/python2.7/site-packages/bugzilla/rhbugzilla.py", line 55, in __init__ _parent.__init__(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 450, in __init__ self.connect(url) File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 603, in connect self.login() File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 652, in login raise BugzillaError("Login failed: %s" % str(e.faultString)) BugzillaError: Login failed: The username or password you entered is not valid. Local variables in innermost frame: self: <bugzilla.rhbugzilla.RHBugzilla object at 0x7fb876392b10> password: None e: <Fault 300: 'The username or password you entered is not valid.'> user: None
Created attachment 1078958 [details] File: backtrace
Created attachment 1078959 [details] File: dso_list
Created attachment 1078960 [details] File: environ
The source is python-bugzilla, I've asked on their mailing list for input as throwing an exception here seems odd to me. Let's see where the bug lays :)
Vit, on the affected system, can you run this mini script: $ cat test.py import bugzilla import logging logging.basicConfig(level=logging.DEBUG) bzapi = bugzilla.Bugzilla("https://bugzilla.redhat.com/xmlrpc.cgi") print bzapi.getbug(1267821) And post the output?
(In reply to Cole Robinson from comment #5) $ python test.py DEBUG:bugzilla:Detecting subclass for https://bugzilla.redhat.com/xmlrpc.cgi INFO:bugzilla:Using RHBugzilla for URL containing bugzilla.redhat.com INFO:bugzilla:Chose subclass RHBugzilla v0.1 DEBUG:bugzilla.base:Using tokenfile=/home/vondruch/.bugzillatoken DEBUG:bugzilla.base:Using cookiefile=/home/vondruch/.bugzillacookies DEBUG:bugzilla.base:Searching for config section matching https://bugzilla.redhat.com/xmlrpc.cgi DEBUG:bugzilla.base:Found matching section: bugzilla.redhat.com DEBUG:bugzilla.base:Setting 'user' from configfile DEBUG:bugzilla.base:Setting 'password' from configfile INFO:bugzilla.base:user and password present - doing login() INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): bugzilla.redhat.com DEBUG:requests.packages.urllib3.connectionpool:"POST /xmlrpc.cgi HTTP/1.1" 200 None Traceback (most recent call last): File "test.py", line 5, in <module> bzapi = bugzilla.Bugzilla("https://bugzilla.redhat.com/xmlrpc.cgi") File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 396, in __init__ self.__class__.__init__(self, **kwargs) File "/usr/lib/python2.7/site-packages/bugzilla/rhbugzilla.py", line 55, in __init__ _parent.__init__(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 450, in __init__ self.connect(url) File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 603, in connect self.login() File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 652, in login raise BugzillaError("Login failed: %s" % str(e.faultString)) bugzilla.base.BugzillaError: Login failed: The username or password you entered is not valid. Actually, I had to change my password after recent BZ update, while the old is persisted somewhere in ~/.bugzillarc presumably. So I tried to remove ~/.bugzilla* from my home and I got pkgdb-cli working. I tried to remove just ~/.bugzillarc and I got error "Error: <Fault 32000: 'The cookies or token provide were not valid or have expired. You may login again to get new cookies or a new token.'>". Fixing the password in ~/.bugzillarc helped as well. And a few additional remarks: 1) pkgdb-cli should handle all these states gracefully. 2) Why is Bugzilla queried anyway? The package name implies that it is CLI utility for pkgdb, so pkgdb is the only service which should be queried. 3) How the password actually got into the ~/.bugzillarc file? I am totally unaware that I have stored the password in plain text in such file.
> 1) pkgdb-cli should handle all these states gracefully. Agreed, but I'm first interested in finding out why this happens in the first place > 2) Why is Bugzilla queried anyway? The package name implies that it is CLI > utility for pkgdb, so pkgdb is the only service which should be queried. That's the beauty of this bug, bugzilla isn't being queried. I just instantiate a bugzilla object that is used by the pkgdb-admin script. > 3) How the password actually got into the ~/.bugzillarc file? I am totally > unaware that I have stored the password in plain text in such file. I checked on my system, I do not even have this file :-/
(In reply to Vít Ondruch from comment #6) > > > Actually, I had to change my password after recent BZ update, while the old > is persisted somewhere in ~/.bugzillarc presumably. > > So I tried to remove ~/.bugzilla* from my home and I got pkgdb-cli working. > I tried to remove just ~/.bugzillarc and I got error "Error: <Fault 32000: > 'The cookies or token provide were not valid or have expired. You may login > again to get new cookies or a new token.'>". Fixing the password in > ~/.bugzillarc helped as well. > If you delete .bugzillarc, then run '/usr/bin/bugzilla login', a bugzilla API token will be saved to ~/.bugzillatoken, and you won't need to keep a plain text password around. > 3) How the password actually got into the ~/.bugzillarc file? I am totally > unaware that I have stored the password in plain text in such file. FWIW python-bugzilla will never create that file, so my guess is you created it a long time ago and forgot about it? Also, I'll make a note to add better logging and possible error messages here if .bugzillarc is used
Fixed upstream in https://github.com/fedora-infra/packagedb-cli/pull/43