if you are getting SERVICE_UNAVAILABLE error after endorsing the transaction, in raft orderering service if there is no leader elected. check any of the active orderering node logs it would be like below: 2019-11-20 10:08:07.345 UTC [orderer.consensus.etcdraft] serveRequest -> WARN 18d No leader is present, cluster size is 2 channel=chheader node=2 Error: Failed to send transaction successfully to the orderer status:SERVICE_UNAVAILABLE.
1stcase : try to update same key multiple time simultenously in same block.
Result : endorsement :Successfully sent Proposal and received ProposalResponse: Status - 200, message - "" commitment : [ { status: 'SUCCESS', info: '' }, { event_status: 'MVCC_READ_CONFLICT', tx_id: 'b00927a980d3be17721beea9a3f0a7adc40530ad0ed235f4cb79fab27dfc5c7d' } ]
in the orderer cluster config there is secret parameter SendBufferSize. SendBufferSize is the maximum number of messages in the egress buffer. Consensus messages are dropped if the buffer is full, and transaction messages are waiting for space to be freed. increases it to 100.
ORDERER_GENERAL_CLUSTER_SENDBUFFERSIZE=100
if transaction data size is more than max_blocksize(AbsoluteMaxBytes) limit defined in configtx.yaml file.
BatchSize: # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB
-
if somehow peer got down before completion of endorsment phase.
-
your peer is not insync with other peer.
-
chaincode is taking more time than predefined execution_time_out to execute the transaction.
-
make sure peer is running throughout the transaction and fully sync with other peers of the defined channel.
-
increases the chaincode execution time from default 30s
in case of raft or kafka, some time while electing a new Orderer Leader or if there is no leader available, orderering service don't respond or response come too late 300 sec or more.
1.make sure your all orderer's are up to date and part of the quorum. 2.there is always leader Orderer present.
OlderNewer