Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1362535 - Unable to serialize objects to JSON.
Summary: Unable to serialize objects to JSON.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9.51
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: William Poteat
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 12:59 UTC by John Sefler
Modified: 2017-03-23 20:12 UTC (History)
7 users (show)

Fixed In Version: candlepin-2.0.28-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-23 20:12:55 UTC


Attachments (Terms of Use)

Description John Sefler 2016-08-02 12:59:56 UTC
Description of problem:
I've seen a small uptick in this response in automated test logs from stage candlepin recently.  It does not occur repeatably, but appears occasionally.  I'll paste below a few occurrences of the 500 error as logged by the initiating subscription-manager command and the stack trace in the rhsm.log file.  Timestamps are included, but I don't know the timezone of the machines.


Version-Release number of selected component (if applicable):

[root@jsefler-rhel7 ~]# subscription-manager config | head
[server]
   hostname = subscription.rhsm.stage.redhat.com
   insecure = [0]
   port = [443]
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   server_timeout = [180]

[root@jsefler-rhel7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.51.15-1
subscription management rules: 5.15.1
subscription-manager: 1.17.9-1.el7
python-rhsm: 1.17.5-1.el7


How reproducible:
  not

Steps to Reproduce:

Pasted from automated test logs...

--------------------------------------------------

ssh root@ibm-z10-77.rhts.eng.bos.redhat.com subscription-manager list --available
Stdout:
Stderr: Unable to serialize objects to JSON.
ExitCode: 70
ssh root@ibm-z10-77.rhts.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
Last request from /var/log/rhsm/rhsm.log:
2016-08-01 20:00:58,186 [DEBUG] subscription-manager:30729 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=4b7a3fff-2b66-4a82-9741-fb4821e4b364
2016-08-01 20:01:14,852 [DEBUG] subscription-manager:30729 @connection.py:602 - Response: status=500
2016-08-01 20:01:14,852 [ERROR] subscription-manager:30729 @managercli.py:174 - exception caught in subscription-manager
2016-08-01 20:01:14,852 [ERROR] subscription-manager:30729 @managercli.py:175 - Unable to serialize objects to JSON.
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 81, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 72, in main
return managercli.ManagerCLI().main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2732, in main
return CLI.main(self)
File "/usr/lib/python2.7/site-packages/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 526, in main
return_code = self._do_command()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2321, in _do_command
filter_string=self.options.filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 314, in get_available_entitlements
overlapping, uninstalled, text, filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 519, in get_filtered_pools_list
self.identity.uuid, self.facts, active_on=active_on, filter_string=filter_string):
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 278, in list_pools
active_on=active_on, owner=ownerid, filter_string=filter_string)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1260, in getPoolsList
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Unable to serialize objects to JSON.

--------------------------------------------------

ssh root@ibm-z10-77.rhts.eng.bos.redhat.com subscription-manager list --available
Stdout:
Stderr: Unable to serialize objects to JSON.
ExitCode: 70
ssh root@ibm-z10-77.rhts.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
Last request from /var/log/rhsm/rhsm.log:
2016-08-01 22:56:33,296 [DEBUG] subscription-manager:18452 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=e4816318-282c-4f3f-81cd-d6577e7ff943
2016-08-01 22:56:34,106 [DEBUG] subscription-manager:18452 @connection.py:602 - Response: status=500
2016-08-01 22:56:34,107 [ERROR] subscription-manager:18452 @managercli.py:174 - exception caught in subscription-manager
2016-08-01 22:56:34,107 [ERROR] subscription-manager:18452 @managercli.py:175 - Unable to serialize objects to JSON.
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 81, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 72, in main
return managercli.ManagerCLI().main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2732, in main
return CLI.main(self)
File "/usr/lib/python2.7/site-packages/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 526, in main
return_code = self._do_command()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2321, in _do_command
filter_string=self.options.filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 314, in get_available_entitlements
overlapping, uninstalled, text, filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 519, in get_filtered_pools_list
self.identity.uuid, self.facts, active_on=active_on, filter_string=filter_string):
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 278, in list_pools
active_on=active_on, owner=ownerid, filter_string=filter_string)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1260, in getPoolsList
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Unable to serialize objects to JSON.

--------------------------------------------------


ssh root@ibm-z10-77.rhts.eng.bos.redhat.com subscription-manager list --available
Stdout:
Stderr: Unable to serialize objects to JSON.
ExitCode: 70
ssh root@ibm-z10-77.rhts.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
Last request from /var/log/rhsm/rhsm.log:
2016-08-01 22:48:34,036 [DEBUG] subscription-manager:15910 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=70d521a7-430c-4299-bd14-d69a3b6a397b
2016-08-01 22:48:39,646 [DEBUG] subscription-manager:15910 @connection.py:602 - Response: status=500
2016-08-01 22:48:39,647 [ERROR] subscription-manager:15910 @managercli.py:174 - exception caught in subscription-manager
2016-08-01 22:48:39,647 [ERROR] subscription-manager:15910 @managercli.py:175 - Unable to serialize objects to JSON.
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 81, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 72, in main
return managercli.ManagerCLI().main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2732, in main
return CLI.main(self)
File "/usr/lib/python2.7/site-packages/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 526, in main
return_code = self._do_command()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2321, in _do_command
filter_string=self.options.filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 314, in get_available_entitlements
overlapping, uninstalled, text, filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 519, in get_filtered_pools_list
self.identity.uuid, self.facts, active_on=active_on, filter_string=filter_string):
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 278, in list_pools
active_on=active_on, owner=ownerid, filter_string=filter_string)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1260, in getPoolsList
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Unable to serialize objects to JSON.

--------------------------------------------------

ssh root@tigger.idmqe.lab.eng.bos.redhat.com subscription-manager list --all --available
Stdout:
Stderr: Unable to serialize objects to JSON.
ExitCode: 70
ssh root@tigger.idmqe.lab.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
Last request from /var/log/rhsm/rhsm.log:
2016-08-01 21:15:50,415 [DEBUG] subscription-manager:19697 @connection.py:573 - Making request: GET /subscription/owners/7964055/pools?consumer=7a4022f5-848a-4e88-a833-54e251ea2f22&listall=true
2016-08-01 21:15:54,032 [DEBUG] subscription-manager:19697 @connection.py:602 - Response: status=500
2016-08-01 21:15:54,033 [ERROR] subscription-manager:19697 @managercli.py:174 - exception caught in subscription-manager
2016-08-01 21:15:54,033 [ERROR] subscription-manager:19697 @managercli.py:175 - Unable to serialize objects to JSON.
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 81, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 72, in main
return managercli.ManagerCLI().main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2732, in main
return CLI.main(self)
File "/usr/lib/python2.7/site-packages/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 526, in main
return_code = self._do_command()
File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 2321, in _do_command
filter_string=self.options.filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 314, in get_available_entitlements
overlapping, uninstalled, text, filter_string)
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 523, in get_filtered_pools_list
self.identity.uuid, self.facts, list_all=True, active_on=active_on, filter_string=filter_string):
File "/usr/lib/python2.7/site-packages/subscription_manager/managerlib.py", line 278, in list_pools
active_on=active_on, owner=ownerid, filter_string=filter_string)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1260, in getPoolsList
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 694, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Unable to serialize objects to JSON.
--------------------------------------------------

Comment 1 John Sefler 2016-09-09 14:35:49 UTC
lowering severity because the frequency of occurrences has diminished since the bug was reported.

Comment 3 Chris Snyder 2016-09-30 15:02:05 UTC
Please supply the stage candlepin logs from the time period this occurred for further debugging.

Comment 5 William Poteat 2017-03-10 18:34:40 UTC
Fixed for CP 2.0 in master with commit 0e3d591cf071bd649eee7c340766e01a12a8b928


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