This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 704697 - Error getting subscription: %s / Serial number must be > 0
Error getting subscription: %s / Serial number must be > 0
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 6.2
Assigned To: Bryan Kearney
John Sefler
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
Reported: 2011-05-14 00:38 EDT by John Sefler
Modified: 2012-02-29 03:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-12-06 12:14:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
circled error %s message and traceback (671.91 KB, image/png)
2011-05-14 00:48 EDT, John Sefler
no flags Details

  None (edit)
Description John Sefler 2011-05-14 00:38:17 EDT
Description of problem:
There are two problems here, but i think one of them is already fixed by a newer version of m2crypto.  Anyway...
On an i386 provisioned box from beaker, I am getting an error when subscribing to a subscription.

Problem 1: Using the subscription-manager-gui, an error occurs when subscribing.  From the attached screenshot, the error message is not getting populated in the error dialog:
Error getting subscription: %s

The corresponding traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.4/logging/", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python2.4/logging/", line 149, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib/python2.4/logging/", line 617, in format
    return fmt.format(record)
  File "/usr/lib/python2.4/logging/", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.4/logging/", line 272, in getMessage
    msg = str(self.msg)
TypeError: __str__ returned non-string (type NoneType)

Problem 2: Using the command line tool, you will also see an error when subscribing...

[root@dell-pe2550-01 ~]# subscription-manager list --avail
    Available Subscriptions

ProductName:       	Red Hat Employee Subscription
ProductId:         	SYS0395                  
PoolId:            	8a85f9812ede00af012edf01c89f5cf9
Quantity:          	9993                     
Expires:           	10/07/2011               

[root@dell-pe2550-01 ~]# subscription-manager subscribe --pool=8a85f9812ede00af012edf01c89f5cf9
Entitlement Certificate(s) update failed due to the following reasons:
	- Serial number must be > 0
	- Serial number must be > 0

Version-Release number of selected component (if applicable):
Verifying Version on i686...
[root@dell-pe2550-01 ~]# rpm -qa | grep subscription-manager

[root@dell-pe2550-01 ~]# subscription-manager facts --list | grep uname
uname.machine: i686
uname.release: 2.6.18-259.el5
uname.sysname: Linux
uname.version: #1 SMP Fri Apr 29 01:10:46 EDT 2011

[root@dell-pe2550-01 ~]# rpm -q m2crypto

I suspect a newer version of m2crypto will fix the subscribe errors.  However, it may avoid the problem of the error string not getting populated in the error message dialog:  
  Error getting subscription: %s

PS. I don't think the i386 arch is a factor in this bugzilla.
Comment 1 John Sefler 2011-05-14 00:48:34 EDT
Created attachment 498900 [details]
circled error %s message and traceback
Comment 2 John Sefler 2011-05-14 00:55:00 EDT
yes - installing newer m2crypto fixed the command line subscribe...

[root@dell-pe2550-01 ~]# rpm -q m2crypto
[root@dell-pe2550-01 ~]# subscription-manager unsubscribe --all[root@dell-pe2550-01 ~]# subscription-manager subscribe --pool=8a85f9812ede00af012edf01c89f5cf9
[root@dell-pe2550-01 ~]# 

In fact,the error messages string "Error getting subscription: %s" is indeed avoided in the subscription-manager-gui with the newer version of m2crypto.

Therefore we could use a fix for problem 1 and to test it, we need to install  m2crypto-0.16-7.el5 and NOT a newer version of it.
Comment 4 Chris Duryee 2011-08-15 14:32:23 EDT

I tested this with subscription-manager 700098a master and python-rhsm d42033a master. I then altered python-rhsm to make the "Serial number must be > 0" error happen every time.

However, I was unable to reproduce the issue described in the bug (the %s message in sm-gui). Marking as MODIFIED since I'm assuming this was fixed via some other bugfix. Let me know if you need any help reproducing the issue.
Comment 5 J.C. Molet 2011-08-16 13:33:36 EDT
I cannot reproduce this bug on any system.  I am marking it verified as it seems to be a non issue as of:

Comment 6 errata-xmlrpc 2011-12-06 12:14:16 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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