Bug 676921

Summary: "ipa cert-show abc" reports "internal error"
Product: [Retired] freeIPA Reporter: Yi Zhang <yzhang>
Component: ipa-serverAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: benl, dpal, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeipa-2.1.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-27 07:22:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Yi Zhang 2011-02-11 20:53:20 UTC
Description of problem:

test is below:
[yi@works4me ipa-cert]$ ipa cert-show abc
ipa: ERROR: an internal error has occurred

Version-Release number of selected component (if applicable):freeipa-server-2.0-0.2011020119gitec59e61.fc14.i686


How reproducible: always


Steps to Reproduce:
1. ipa cert-show abc 

Additional info:

set /etc/ipa/server.conf to debug level, found following error msg in httpd's error_log

[Fri Feb 11 12:47:58 2011] [error] ipa: INFO: Created connection context.ldap2
[Fri Feb 11 12:47:58 2011] [error] ipa: DEBUG: raw: cert_show(u'abc')
[Fri Feb 11 12:47:58 2011] [error] ipa: INFO: cert_show(u'abc')
[Fri Feb 11 12:47:58 2011] [error] ipa: INFO: IPA: virtual verify retrieve certificate
[Fri Feb 11 12:47:58 2011] [error] ipa: DEBUG: ipaserver.plugins.dogtag.ra.get_certificate()
[Fri Feb 11 12:47:58 2011] [error] ipa: ERROR: non-public: ValueError: invalid literal for int() with base 0: 'abc'
[Fri Feb 11 12:47:58 2011] [error] Traceback (most recent call last):
[Fri Feb 11 12:47:58 2011] [error]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 211, in wsgi_execute
[Fri Feb 11 12:47:58 2011] [error]     result = self.Command[name](*args, **options)
[Fri Feb 11 12:47:58 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 422, in __call__
[Fri Feb 11 12:47:58 2011] [error]     ret = self.run(*args, **options)
[Fri Feb 11 12:47:58 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 728, in run
[Fri Feb 11 12:47:58 2011] [error]     return self.execute(*args, **options)
[Fri Feb 11 12:47:58 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/cert.py", line 438, in execute
[Fri Feb 11 12:47:58 2011] [error]     result=self.Backend.ra.get_certificate(serial_number)
[Fri Feb 11 12:47:58 2011] [error]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/dogtag.py", line 1386, in get_certificate
[Fri Feb 11 12:47:58 2011] [error]     serial_number = int(serial_number, 0)
[Fri Feb 11 12:47:58 2011] [error] ValueError: invalid literal for int() with base 0: 'abc'
[Fri Feb 11 12:47:58 2011] [error] ipa: INFO: response: InternalError: an internal error has occurred
[Fri Feb 11 12:47:58 2011] [error] ipa: INFO: Destroyed connection context.ldap2

Comment 1 Dmitri Pal 2011-02-11 21:10:29 UTC
https://fedorahosted.org/freeipa/ticket/953

Comment 2 Dmitri Pal 2011-02-23 20:18:55 UTC
master: 36070555d1bd49aa1b25180db982a31dbac694a1

Comment 3 Jenny Severance 2011-06-10 20:13:45 UTC
verified

# ipa cert-show abc
ipa: ERROR: Certificate operation cannot be completed: EXCEPTION (Certificate serial number 0xabc not found)

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server