Hyperledger : Not able to submit a transaction if one peer is down

377 views Asked by At

Currently, I am doing some negative testing for hyperledger fabric to understand the architecture properly. I wanted to test if one peer goes down due to some unwanted exceptions then how we workaround the situation. I have deployed the Fabric with the help of hyperledger cello anisible on aws. I have 2 instance with below configuration.

fabric001: {
  cas: ["ca1st.orga"],
  peers: ["[email protected]"],
  orderers: ["orderer1st.orgb"],
  zookeepers: ["zookeeper1st"],
  kafkas: ["kafka1st"]
},
fabric002: {
  cas: ["ca1st.orgb"],
  peers: ["[email protected]", "[email protected]"],
  orderers: ["orderer2nd.orgb"],
  zookeepers: ["zookeeper2nd"],
  kafkas: ["kafka2nd"]
}

By default, caraution BNA is deployed. I have submitted some transaction using composer-playgroud and then manually pause one of the peer's docker container with the help of docker pause container-id command. After that, I have tried to submit the transaction but composer-playground is not allowing me to submit the transaction.

Every peer is endorsing peer in default settings. Also, the default endorsing policy is as below:

{
  "identities": [
    {"role": { "name": "member", "mspId": "orga" } }
  ],
  "policy": {
    "1-of": [
      {"signed-by": 0 }
    ]
  }
}

As per my understanding if one member peer executes the transaction and submits it to the orderer it should be accepted according to the above policy but I am not seeing the same results. In my current testing case if I pause one peer's docker container, the fabric stops taking the transactions and as soon as I unpause it started to work normally.

Can anyone please help me understand the issue ??

1

There are 1 answers

0
Gaurang Singh On BEST ANSWER

If we pause the docker with "docker pause continerid", We were facing this behavior. Later I have tried to stop the peer with "docker stop" command and I was able to submit the transactions.

Thanks for the help.