Duplicate entry for key 'uk_token_id_hash' in crwod log


I am wondering if anyone has noticed this error in crowd log. 

I am using latest crowd 2.7.2 and JIRA 6.3.6. I noticed that there are always some errors in crowd logs like:

2014-09-29 08:35:59,575 http-bio-8095-exec-21 WARN [engine.jdbc.spi.SqlExceptionHelper] SQL Error: 1062, SQLState: 23000
2014-09-29 08:35:59,575 http-bio-8095-exec-21 ERROR [engine.jdbc.spi.SqlExceptionHelper] Duplicate entry 'DExcfx0O9tpVuoIqjtqREw00' for key 'uk_token_id_hash'
2014-09-29 08:35:59,589 http-bio-8095-exec-21 ERROR [jdbc.batch.internal.BatchingBatch] HHH000315: Exception executing batch [could not perform addBatch]


so, what is wrong is my crowd and how to get rid of this error?

3 answers

Would you please attach the full exception stack trace, e.g. on http://pastebin.com/ ?

Hi, if you're running Crowd previous to version 2.7.2 it's possible that you're running into a bug as this one, in this case you may switch the token storage to in memory or upgrade Crowd to the latest version.

I hope it helps.


i swither it to memory and error occurred. http://pastebin.com/Zub9B3wL

I am using crowd 2.7.2 build 626. the Authentication Token Storage is in database.

I tried to switch it to memory from web interface and error occurred can be seen from web interface and log.


Hi, since you're facing problem to switch the token storage via web interface, you can do it directly via database:

  1. Shutdown crowd - ensure the pid is stopped
  2. Perform a database backup
  3. Connect to the database
  4. Execute this sql:
    update cwd_property 
    set property_value='false'
    where property_name='database.token.storage.enabled';
  5. Restart Crowd
  6. Validate the session storage is now in-memory by Navigating to Administration > Session Config


i try to switch Token Storage to memory and error occurred. http://pastebin.com/Zub9B3wL

Suggest an answer

Log in or Join to answer
Community showcase
Maggie Roney
Published Feb 27, 2018 in Crowd

The Crowd team is looking for feedback on Server & Data Center customers' identity strategies!

Do you own more than one Server or Data Center product? Do you have challenges provisioning users across your Atlassian products? Are you spending a lot of time integrating each Atlassian product wit...

453 views 5 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot