Why do I get a "resource unavailable" error on DB, while launching peer pod?

2/1/2019

I am deploying an hyperledger network to an Openshift (Kubernetes) infrastructure. I've already started CA, orderer, and peer0, but using the same yaml configuration that I used to launch peer0 (with obvious changes) to launch peer1, the pod never lauches. Checking peer1 logs I can see the message:

panic: Error while trying to open DB: resource temporarily unavailable.

Any idea of why could this be happening? There's a related question here Hyperledger Fabric "panic: Error while trying to open DB: resource temporarily unavailable" during starting a peer, but the suggestion does not apply to my case, because I'm not running the network in a local machine, but in an openshift environment running kubernetes in the background, and peer0 and peer1 are in different pods.

I'm trying to run the peers with LevelDB (default for HLF)

Versions:

  • Hyperledger Fabric 1.1
  • Openshift 3.5.5.31.66
  • Kubernetes 1.5.2

Update: Problem solved thanks to Gari Singh comment. Peer1 was using a production volume mount pointing to the same directory as Peer0's.

Thanks

-- jfc
hyperledger-fabric
kubernetes
leveldb

1 Answer

2/4/2019

That error typically occurs when the peer cannot get a lock on DB files. Make sure that peer0 and peer1 are not mounting the same shared volume.

-- Gari Singh
Source: StackOverflow