Unable to read cipher data for 0

Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2017

Hi,

I seem to get the error "Unable to read cipher data for 0" every time i try to add a shared credential in bamboo. Same error occure when i try to add a repo from Bitbucket.

The problem reminds of this:

https://community.atlassian.com/t5/Questions/bamboo-cipher-keys-are-seemingly-not-generated/qaq-p/277225

With the exception that bamboo HAS access to the filesystems, and will replace a removed cipher file with a new file (32 bytes).

This happens on Bamboo 5.15.5 build 51518 when adding repos from Bitbucket v4.14.3.

I started a case with atlassian a week back but except for pointing out that bamboo needs to be able to write to the filesystem (something i told them when opening the ticket) they are now aiming on reverting the upgrade that might have caused it, redo the upgrade again, and expect a completely different end-results, which i am prone to not believe..

Has anyone run into the "Unable to read cipher data for 0" during other circumstances (i.e. not due to lack of permissions on filesystem)?

Thankful for anything that can push this forward.

2 answers

1 vote
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2017

There should be a fatal error reported in the log file when that happens. What does it say?

 

Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2017

{noformat}

2017-05-09 14:41:26,515 FATAL [16-ImmutablePlanCacheServiceImpl.initialiseCache:pool-31-thread-1] [InstanceSecretStorage] Database part of instance key is unavailable
2017-05-09 14:41:26,516 FATAL [16-ImmutablePlanCacheServiceImpl.initialiseCache:pool-31-thread-1] [InstanceSecretStorage] Cipher initialisation vector is unavailable
2017-05-09 14:41:26,516 FATAL [16-ImmutablePlanCacheServiceImpl.initialiseCache:pool-31-thread-1] [SecretEncryptionServiceImpl]
java.lang.IllegalArgumentException: Unable to read cipher data for 0
at

{noformat}

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2017

So your problem is that the database part of the key is missing, not the filesystem part. One reason for that is that you've deleted the content of BANDANA table, the other is that you may have done some database juggling during upgrade and ended up using unupgraded database with an upgraded home directory.

Like Adam Davis likes this
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2017
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2017

Przemyslaw, do you know what keys in the BANDANA table that the keys rest in? Will try to extrude them and reinsert them into the database again.

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2017

Anything that matches '%instance.cipher%'.

0 votes
Jonas Andersson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2017

No good still.. Have to take the windows approach on this (reinstall and try again). Can only hope this never happens on our production, because then i will lose my job.

lamarant November 14, 2018

so are you still employed? I just got the same error on a fresh/new install.

Ashley Lewis May 13, 2019

I'm also getting this on a new install

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events