Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1374448

Summary: Runtime Error could not obtain pessimistic lock at com.mysql.jdbc.SQLError.createSQLException:1,078
Product: [Community] Candlepin (Migrated to Jira) Reporter: John Sefler <jsefler>
Component: candlepinAssignee: Richard Bernleithner <rbernlei>
Status: CLOSED WORKSFORME QA Contact: Jon Allen <jallen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1CC: csnyder, ehelms, hyu, it-eng-bz, jsefler, mschibli, nmoumoul, pmoravec, redakkan, skallesh, vrjain, wpinheir, wpoteat
Target Milestone: ---Keywords: Reopened, TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2211434 (view as bug list) Environment:
Last Closed: 2023-06-05 13:42:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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