Jira doesn't start - multiple key issue

hbAlex March 16, 2018

Hello, 

I was upgrading the Jira server key and the web page crashed while the key change was underway.  I reloaded the page, re-entered the key, and upon restarting the jira process I get issues that prevent a full service start.

 

Snippet of the log is below.  I suspect there are literally two entries for my jira key now and this is causing the error.  Which tables is the jira-software entry in?  My jira instance is running against a postgre database - would it be possible to remove the duplicate entry?  If so could you please provide a sample command to do so.

I'd appreciate any help.

Thanks,

Alex

 

Below is a snippet of the log:

com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: Multiple entries with same key: jira-software=com.atlassian.jira.license.DefaultLicenseDetails@fce07be9 and jira-software=com.atlassian.jira.license.DefaultLicenseDetails@fce07be9 at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:83) at com.atlassian.jira.license.JiraLicenseManagerImpl.getLicenses(JiraLicenseManagerImpl.java:99) at com.atlassian.jira.license.JiraLicenseManagerImpl.getLicenses(JiraLicenseManagerImpl.java:50) at com.atlassian.jira.bc.license.JiraLicenseServiceImpl.getLicenses(JiraLicenseServiceImpl.java:193) at com.atlassian.jira.upgrade.UpgradeLauncher.ensureLicenseNotCorrupted(UpgradeLauncher.java:131) at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:84) at 

2 answers

1 accepted

3 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

That's strange.  The multiple entries with the same key would tend to indicate that you have two values in a database field that should only have one.

I have seen that kind of error for other data problems in Jira, but I have not seen this happen in regards to a license key in Jira. 

What version of Jira were you using before this upgrade?  And what version are you upgrading to?

I would recommend walking through this KB How to Get and Update JIRA License String from the Database, in order to see what values exist in the database right now.

Please let me know the results.

hbAlex March 16, 2018

 

I listed the contents of the table and there are two identical licenses listed.  

Do you think it would be safe to delete one of the entries.

 

As far as versions - I attempted this upgrade about 4 months ago and to be honest I don't remember what version I was on (couldn't have been more than a year old) and I was going to whatever the most recent version about 4 months ago was.

jiradb=# TABLE productlicense;
-[ RECORD 1 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 10200
license | AAABhA0ODAoPeNp9kU1vozAQhu/+FZb2sj2AIC1NEwmpLXi1VPmoQnZPe5maSeKKGDQ22WR//TpA1FRNe8My78zzvP72gxRPUfIw4sFgfDMaR0Oe5Es+CMIhWxOi3lR1jeRPlERtUBTKqkrHYrYUi+dFlgs2a7YvSPPVL4Nk4jBgSaUtSDuDLcZQ4p4XCv6x54bkBgymYDE+jveCkReErB+8PNTYJpL5dCoWSfYwOV2Jfa3o0OYaXaqtsliclogpqLLdcr+BcuW9gC58WW3ZqyLwa6qKRlr/ePBMtbJ/gdB3MbXD2FKD3W+fu11o4BKog9AWNWh5Dusk73rJL2g+1NfvydJ4kqW5mHnXw+sourll7js+P38xNLdAFqlznNMatDLQyv10LfFH1xJfotzoqqzWCg1LCNv7t9cJB14YsbKD+e3YjunBu0bQSVNNyvRlpmgkqbrd85QtHnje8/DvOdIO6YqHAW9F/4x5z8h7307ns7e51Po5ynlO7KBsOtsVlG7yfwMzAOswLQIVAIrD2/rEyaE6m9p+YRB/Wvcxb+suAhRfZmIsaz5ST+LHnEFaSVEHgoWFxQ==X02iu
-[ RECORD 2 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 10201
license | AAABhA0ODAoPeNp9kU1vozAQhu/+FZb2sj2AIC1NEwmpLXi1VPmoQnZPe5maSeKKGDQ22WR//TpA1FRNe8My78zzvP72gxRPUfIw4sFgfDMaR0Oe5Es+CMIhWxOi3lR1jeRPlERtUBTKqkrHYrYUi+dFlgs2a7YvSPPVL4Nk4jBgSaUtSDuDLcZQ4p4XCv6x54bkBgymYDE+jveCkReErB+8PNTYJpL5dCoWSfYwOV2Jfa3o0OYaXaqtsliclogpqLLdcr+BcuW9gC58WW3ZqyLwa6qKRlr/ePBMtbJ/gdB3MbXD2FKD3W+fu11o4BKog9AWNWh5Dusk73rJL2g+1NfvydJ4kqW5mHnXw+sourll7js+P38xNLdAFqlznNMatDLQyv10LfFH1xJfotzoqqzWCg1LCNv7t9cJB14YsbKD+e3YjunBu0bQSVNNyvRlpmgkqbrd85QtHnje8/DvOdIO6YqHAW9F/4x5z8h7307ns7e51Po5ynlO7KBsOtsVlG7yfwMzAOswLQIVAIrD2/rEyaE6m9p+YRB/Wvcxb+suAhRfZmIsaz5ST+LHnEFaSVEHgoWFxQ==X02iu

 

Like Mike Quentel likes this
hbAlex March 16, 2018

Not sure where my reply went - retyping - oh - probably removed since this is public - woops.  I redacted the keys from the entries below.

 

Below is a list of the entries in the license table  - there are two entries with identical keys listed.

Would it be safe to delete the 2nd duplicate entry.

 

Also, the upgraded process occurred about 4 months ago.  At that time I was upgrading a version that couldn't have been more than a year old to the must up to date at that time.

 

jiradb=# TABLE productlicense;
-[ RECORD 1 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 10200
license | [KEY REMOVED]
-[ RECORD 2 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 10201
license | [KEY REMOVED}
Like Mike Quentel likes this
hbAlex March 16, 2018

Well,

 

I ran the following command to delete the 2nd key entry.  That fixed the issue.  Jira started right up.  Thanks for pointer to where the key was located.

 

DELETE from productlicense
where id=10201;

 

Like Mike Quentel likes this
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2018

Glad to hear that worked.  I was going to recommend trying to delete both (if you have a database backup) and then follow the steps in that KB to update the license key via SQL.  

At least that way you know you have applied the updated key that way.

0 votes
Richard Cross January 26, 2023

"I have seen that kind of error for other data problems in Jira, but I have not seen this happen in regards to a license key in Jira."

Happened to our Jira instances today running 8.22.6.  Looking in the productlicense database, there are 4 entries, which are 2 identical pairs (apart from the ID).  We've got two copies of the old license and 2 copies of the new.

This was after updating the license via the WebUI.

Surely this is a bug/design flaw? 

Either make the license key itself the unique key on the productlicense table, or make sure software is smart enough to avoid writing duplicate entries and/or smart enough to cope better if they occur.

But from an Enterprise software point-of-view, entering a license key into a Web UI should not bring the entire system down!

Suggest an answer

Log in or Sign up to answer