Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Fatal error 'Unable to read cipher data for 0' when linking to BitBucket Server repo.


Hi, when I attempt to link to a BitBucket Server repository with Bamboo 6.9.0 I get a fatal error 'Unable to read cipher data for 0'.

This is a brand-new install of Bamboo. It has been linked with our existing instance of BitBucket Server and the link has been configured on both instances. Each link shows a green 'connected' status.

Attempting to link a repository in the Admin console under Linked Repositories results in the same error:


Bamboo version: 6.9.0 build 60909 running on CentOS 7.6.1810
BitBucket Server: v5.6.2 running on CentOS 7.4.1708

Log file extract:


2019-06-04 15:05:07,967 WARN [http-nio-8085-exec-22] [CacheAwareness] Inheriting disabledCaches:[com.atlassian.bamboo.ANY]
2019-06-04 15:05:08,544 FATAL [http-nio-8085-exec-22] [InstanceSecretStorage] Cipher initialisation vector is unavailable
2019-06-04 15:05:08,547 ERROR [http-nio-8085-exec-22] [BambooActionSupport] java.lang.IllegalArgumentException: Unable to read cipher data for 0
java.lang.IllegalArgumentException: Unable to read cipher data for 0
at com.atlassian.bamboo.crypto.instance.InstanceSecretStorage.readKeyAndIv(
at com.atlassian.bamboo.crypto.instance.InstanceSecretStorage.getOrCreateCipherData(
at com.atlassian.bamboo.crypto.instance.InstanceSecretStorage.getCipherData(
at com.atlassian.bamboo.crypto.instance.InstanceSecretStorage.getKeyAndIv(
at com.atlassian.bamboo.crypto.instance.InstanceCipherProvider.getKeyAndIv(
at com.atlassian.bamboo.crypto.instance.InstanceCipherProvider.getCipher(
at com.atlassian.bamboo.crypto.instance.InstanceCipherProvider.getEncryptor(
at com.atlassian.bamboo.crypto.instance.SecretEncryptionServiceInternalImpl.encrypt(
at com.atlassian.bamboo.crypto.instance.SecretEncryptionServiceInternalImpl.encrypt(



1. I am able to create a plan without linking to a repository.
2. I get the same error if I make myself administrator on both Bamboo and BitBucket.
3. Removing and recreating the link between Bamboo and BitBucket does not solve the issue.
4. Bamboo is running has the 'bamboo' user. This user has drwx access on the 'cipher' directory and rw access on the file cipher.key_0 inside that directory.
5. I've looked at the questions linked but they don't fix my issue:

6. I have *not* tried a reinstallation with a new home directory and database. If I'm unable to resolve here that's my next step.


1 answer


I get the same error while linking to a repository

[BambooActionSupport] java.lang.IllegalArgumentException: Unable to read cipher data for 0


Bamboo version 6.9.1 build 60910 (Centos 7)

Hey, I lodged a support request with Atlassian about my issue and they helped me through resolving it.

The issue was an incomplete key generation, and the solution was to remove the partially-generated key from both the database and the filesystem to force regeneration.

These are the steps to resolve I was provided (paraphrased):


The database should have two rows, the com.atlassian.restricted.instance.cipher.key_0 and com.atlassian.restricted.instance.cipher.iv_0. They can be selected with:

select * from BANDANA where BANDANA_KEY like '%cipher%';

To regenerate the cipher:

  1. Shutdown Bamboo.
  2. Remove the com.atlassian.restricted.instance.cipher.key_0 and/or com.atlassian.restricted.instance.cipher.iv_0 row from the database (found in the select query above).
  3. Remove the cipher directory (under <bamboo-home>/xml-data/configuration)
  4. Start Bamboo.
  5. Before configuring anything else, create a Repository first. This will re-generate the cipher.

Hope this helps!

Like Haythem Benizid likes this

We have the same issue. Question is how did this occur? And can it happen again.

Next step - to look to follow this and regenerate the cipher....

Foong Atlassian Team Sep 18, 2019

Do not use the suggestion to delete and regenerate the cipher key. It is suggested depending on certain situation. Using this suggestion might cause an even severe problem without solution at the end.

Report the issue to Atlassian Support so that the logs can be analysed and a different solution might be suggested.

... which we had and did. And spent 2 weeks troubleshooting with them. Watch out for a blog post soon on how to really do this - now Atlassian know from experience the possible variants!

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events