Bug 1374448 - Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.createSQLException:1,078
Summary: Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.cr...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Richard Bernleithner
QA Contact: Jon Allen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 16:58 UTC by John Sefler
Modified: 2023-06-05 13:42 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2211434 (view as bug list)
Environment:
Last Closed: 2023-06-05 13:42:54 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2016-09-08 16:58:13 UTC
Description of problem:
Encountered this runtime error against stage candlepin during an automated test run.

Version-Release number of selected component (if applicable):
  subscription.rhn.stage.redhat.com
  subscription management server: 0.9.51.15-1

How reproducible:
  is not easy to reproducible

Steps to Reproduce:
Pasting from a test automation log...
2016-09-08 06:15:07.029  FINE: ssh root.eng.rdu.redhat.com subscription-manager subscribe --pool=8a99f9815582f734015585f9989d5047
2016-09-08 06:16:08.858  FINE: Stdout: 
2016-09-08 06:16:08.858  FINE: Stderr: Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.createSQLException:1,078

2016-09-08 06:16:08.859  FINE: ExitCode: 70
2016-09-08 06:16:08.859  FINE: ssh root.eng.rdu.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;
2016-09-08 06:16:08.957  WARNING: Last request from /var/log/rhsm/rhsm.log:
2016-09-08 06:15:20,797 [DEBUG] subscription-manager:30381:MainThread @connection.py:573 - Making request: POST /subscription/consumers/25f1a0fb-59cf-48aa-a089-897a01282502/entitlements?pool=8a99f9815582f734015585f9989d5047
2016-09-08 06:16:12,079 [DEBUG] subscription-manager:30381:MainThread @connection.py:602 - Response: status=500
2016-09-08 06:16:12,080 [ERROR] subscription-manager:30381:MainThread @managercli.py:1570 - Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.createSQLException:1,078
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 1560, in _do_command
    ents = self.cp.bindByEntitlementPool(self.identity.uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1169, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 697, in request_post
    return self._request("POST", method, params)
  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: Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.createSQLException:1,078


Actual results:
  above

Expected results:


Additional info:

Comment 10 William Poteat 2023-05-22 20:45:49 UTC
These activation keys "sudo subscription-manager register --activationkey=ak_nbg992,ak_nbg992_cc --org=NIMS-CC –force"
do not exist in the data dump for this org specified. They are all named a UUID. Do you have the UUID that corresponds to the keys?
Also, can you confirm that the dmi.system.uuid for each client you are attempting to register is unique?

Comment 24 Eric Helms 2023-05-31 16:01:15 UTC
As this original BZ is quite old, and this issue involves Satellite's workflow and use of Candlepin, I have opted to clone this BZ (trimmed a bit) to Satellite and discussion should continue there so that we can engage both the Candlepin and Satellite engineers.


I think this bug can return to it's closed state.


Cloned BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=2211434


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