Hyperledger Fabric response: status:500 message:"failed to execute transaction timeout expired while executing transaction" - hyperledger-fabric

I am facing this issue and wanted to ask if someone knows what it could be. chaincode is installed and invoked
peer chaincode query -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C mychannel -n bachelortest -c '{"Args":["getTransactionPriv","1"]}'
error: endorsement failure during query. response: status:500 message:"failed to execute transaction 11254006859fbd102ec468c4100b18a1241445a0c066280ca81510485d43a93f: error sending: timeout expired while executing transaction"

Related

Why ./network.sh createChannel always give Channel creation failed and Create channel failed error?

I followed the Official Fabric Test Network tutorial "Using the Fabric Test Network ", but reported some errors when I ran ./network.sh createChannel. Log and errors like this
+ peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /home/centos/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=1
Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: context deadline exceeded
Channel creation failed
Create channel failed
If you are first time user you can try the following to bring up network with given channel name
./network.sh down
./network.sh up createChannel -c mychannel
I used this script.It worked
./network.sh up createChannel -ca -c mychannel -s couchdb -i 2.2.0
This situation is arisen due to TLS certificate.
For example, it may happen due to "client TLS / server no TLS". So please check "--tls $CORE_PEER_TLS_ENABLED" option. "$CORE_PEER_TLS_ENABLED" should be true.
So you can see something like this in console:
+ peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls true --cafile /home/centos/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

Technical Question - Hyperledger Fabric - Error: error getting endorser client for invoke: endorser client > failed to connect to

I am unsure of this is suitable for this forum as this is a technical question. I will add it anyway to see if anyone has any technical skills here.
I am running fabcar from Hyperledger Fabric 2.0 and the invoke works from the invoke.js program but fails using the CLI and peer chaincode. I have tried a few combinations without any success.
The command -
peer chaincode invoke -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com --tls $CORE_PEER_TLS_ENABLED --cafile ~/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles ~/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -C mychannel -n fabcar -c '{"Args":["createCar","CAR300", "VW", "Polo", "Grey", "Mary"]}'
Error -
Error: error getting endorser client for invoke: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup peer0.org1.example.com: no such host"
Docker containers:
86b85d99b510/dev-peer0.org2.example.com-fabcar_4-2561b83e10218324c7c566345c50373c5f0b501c961992264dc7fa321eaa5f7f/
f0725155e976/dev-peer0.org1.example.com-fabcar_4-2561b83e10218324c7c566345c50373c5f0b501c961992264dc7fa321eaa5f7f/
e2e33a38f61b/peer0.org2.example.com/7051/tcp, 0.0.0.0:9051->9051/tcp
a59f7011af8c/peer0.org1.example.com/0.0.0.0:7051->7051/tcp
f395bed7101d/couchdb1/4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp
b3b7b94ed872/couchdb0/4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp
db56371abe59/orderer.example.com/0.0.0.0:7050->7050/tcp
ddcabab0b13c/ca_org2/7054/tcp, 0.0.0.0:8054->8054/tcp
d7b2bd0a94bc/ca_orderer/7054/tcp, 0.0.0.0:9054->9054/tcp
e0e300be2273/ca_org1/0.0.0.0:7054->7054/tcp
This situation is happened because you called a gRPC to peer server but your call failed to hit the server. This situation may happen for many reasons, but for most of the cases the situation is happened due to server down(peer server exit or down due to misconfiguration) or for wrong certificate or your call failed to hit the server due to misconfiguration.
Use "docker container ls -a" to see all containers including the exited one.

BAD_REQUEST -- error validating channel creation transaction for new channel in the Hyperledger Tutorial

i get an error for hyperledger fabric.
I followed the documentation and I came across his error when I ran the below command
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
the error being
BAD_REQUEST -- error validating channel creation transaction for new channel 'fyp', could not succesfully apply update to template configuration: error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set

Hyperledger fabric 2.0

Getting the below error while trying to connect peer to channel in hyper-ledger fabric v 2.0 with couchbase 2,3
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded.
Can anyone suggest why this is happening?
peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./artifacts/channel/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls true --cafile $ORDERER_CA
try this way to do this

Addition of an organization in Hyperledger-fabric blockchain

I am adding new org I am getting this error
Error: failed to create deliver client: orderer client failed to
connect to orderer.example.com:7050: failed to create new connection:
context deadline exceeded
while doing this
peer channel fetch 0 mychannel.block -o orderer.example.com:7050 -c
$CHANNEL_NAME --tls --cafile $ORDERER_CA
Error resolved prblem was containers were with different network it works if all the conatiners are in same network

Resources