Bug 688816 - subscription-manager unsubscribe command line returns remote server error [code: 500] when run with invalid serial number
Summary: subscription-manager unsubscribe command line returns remote server error [co...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.7
Hardware: i386
OS: Linux
low
low
Target Milestone: rc
: 5.7
Assignee: Chris Duryee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 675214
TreeView+ depends on / blocked
 
Reported: 2011-03-18 05:50 UTC by Kenichi Takemura
Modified: 2014-08-04 22:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-04 15:28:18 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Kenichi Takemura 2011-03-18 05:50:58 UTC
Description of problem:

Running # subscription-manager unsubscribe --serial=7777 where 7777 is invalid number ends up with 'Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.'

When checked the log, response code 500 is recorded.

Presumably this may not be a subscription-manager bug..but the host bug.

2011-03-18 05:44:09,325 [INFO] _request() @connection.py:163 - handler: https://subscription.rhn.webqa.redhat.com:443/subscription/consumers/baeb224c-8deb-4299-b343-26c968768558/certificates/8
2011-03-18 05:44:13,969 [INFO] _request() @connection.py:177 - status code: 500
2011-03-18 05:44:13,970 [ERROR] validateResponse() @connection.py:189 - No JSON object could be decoded


Version-Release number of selected component (if applicable):
subscription-manager-firstboot-0.95.4-1.el6.x86_64
subscription-manager-0.95.4-1.el6.x86_64
subscription-manager-gnome-0.95.4-1.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. Run # subscription-manager unsubscribe --serial=7777 from a terminal
2.
3.
  
Actual results:
An error. 

Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

Expected results:
At least. 'Invalid serial number' or something.

Additional info:

Comment 2 RHEL Program Management 2011-04-04 01:55:30 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Chris Duryee 2011-04-14 14:30:14 UTC
This works for me in 0.95.5, and 0.95.5.7, against both hosted and standalone.

JC, can you verify that this works for you as well?

Comment 4 John Sefler 2011-05-26 21:51:07 UTC
Verifying Version....
[root@jsefler-rhel57-i386 ~]# rpm -q subscription-manager
subscription-manager-0.95.5.19-1.git.1.8278e3d.el5

[root@jsefler-rhel57-i386 ~]# subscription-manager register --username=stage_test_38
Password: 
6e1ce0fb-f297-4ee1-8d48-0c219c29e35f jsefler-rhel57-beta12-i386.usersys.redhat.com
[root@jsefler-rhel57-i386 ~]# subscription-manager unsubscribe --serial=7777
Entitlement Certificate with serial number 7777 could not be found.


Verifying Version....
[root@jsefler-stage-6workstation ~]# rpm -q subscription-manager
subscription-manager-0.95.14-1.el6_1.x86_64
[root@jsefler-stage-6workstation ~]# grep hostname /etc/rhsm/rhsm.conf 
# Server hostname:
hostname=subscription.rhn.stage.redhat.com
proxy_hostname =
[root@jsefler-stage-6workstation ~]# subscription-manager register --username=stage_test_38
Password: 
27098965-a934-424a-921b-533bb908492a jsefler-stage-6workstation.usersys.redhat.com
[root@jsefler-stage-6workstation ~]# subscription-manager unsubscribe --serial=7777
Entitlement Certificate with serial number 7777 could not be found.


Also verifying against the production host...

[root@jsefler-stage-6workstation ~]# grep hostname /etc/rhsm/rhsm.conf 
# Server hostname:
hostname=subscription.rhn.redhat.com
proxy_hostname =
[root@jsefler-stage-6workstation ~]# subscription-manager register --username=qa
Password: 
2f36f0ab-8996-44b8-8d20-1d4f5f7a339e jsefler-stage-6workstation.usersys.redhat.com
[root@jsefler-stage-6workstation ~]# subscription-manager unsubscribe --serial=7777
Entitlement Certificate with serial number 7777 could not be found.


Works for me too.


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