0

I have my network running with 3 machines, each one with:

  • 1 orderer
  • 1 peer
  • 1 ca
  • 1 Node.Js client

They are deployed on AWS and a load balancer correctly distributes the requests to the 3 different clients. The clients are not using discovery service, it is disabled.

Client1 only contacts orderer1 and peer1 and ca1, and so on and so forth for the others. I want to try the high availability of Hyperledger so when I am inserting data I shutdown a machine, let's suppose machine1, and others should continue the execution.

What happens is that while the machine is down, the network stops the execution. The clients are not moving at all (they do not crash, just stop). When I bring up the machine again, I see errors coming but it continues the execution now. It seems like there are calls to machine 1 suspended but they recover as soon as the machine is up.

What I want is that if machine1 goes down, the requests to it are rejected and machine 2-3 continue the execution. How to obtain it?

[EDIT] Additional information: I have inserted some logs in the client, especially in my endpoint for creation of transactions. Like this:

console.log('Starting Creation')
await contract.submitTransaction(example)
console.log('Creation done')
res.send(200)

Let me also say that this rows are encapsulated in an error handler, so that if any error occurs, I encapsulate the error. But I get no error, I just get the first print done and the submitTransaction working for a lot of time, never receiving answers.

It seems like it tries to deliver request to orderer but orderer is not online.

When I bring down an orderer with docker service scale orderer1=0 (since I am using services with docker swarm), the orderer leader knows in the logs that he went offline. Also, if I bring the orderer up again, a new election starts.

This seems correct, in fact the problem only happens when I shutdown the machine, closing the connection in a non-friendly way.

Riki95
  • 706
  • 1
  • 7
  • 16

0 Answers0