I am getting this error while trying to instantiate chaincode on peer1 of org1.
NodeJS console error :
Failed to send Proposal and receive all good ProposalResponse Failed
to instantiate. cause:Failed to send Proposal and receive all good
ProposalResponse (node:25005) UnhandledPromiseRejectionWarning: Error:
Failed to instantiate. cause:Failed to send Proposal and receive all
good ProposalResponse
Blockchain console error :
ERRO 692 [[e9585782 PUT_STATE ERROR]]No ledger context for
%!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING) ERRO 6a2
[bloqchannel][e9585782] failed to invoke chaincode name:"lscc" ,
error: timeout expired while executing transaction
I am using Hyperledger Fabric 1.1 and Hyperledger fabric node SDK.
The nodeJS version is 8.11.2.
Any help is appreciated.
Related
when i am trying test network using hyperledger caliper .this error is coming and succ count is zero.
""2022.08.03-03:08:10.325 -0700 error [connectors/v2/FabricGateway] Failed to perform query transaction [ReadAsset] using arguments [3_4], with error: FabricError: Query failed. Errors: ["Error: Peer peer0.org1.example.com:7051 is not running chaincode basic","Error: Peer peer1.org1.example.com:8051 is not running chaincode basic"]
at RoundRobinQueryHandler.evaluate (/hy/caliper/node_modules/fabric-network/lib/impl/query/roundrobinqueryhandler.js:46:23)
at process._tickCallback (internal/process/next_tick.js:68:7)""
and this:
""2022.08.03-03:08:11.308 -0700 error [connectors/v2/FabricGateway] Failed to perform submit transaction [DeleteAsset] using arguments [2_0], with error: Error: No endorsement plan available
at DiscoveryHandler.endorse (/hy/caliper/node_modules/fabric-common/lib/DiscoveryHandler.js:208:""
I'm trying to install Hyperledger in my Ubuntu Stand Alone system, After running sudo ./byfn.sh up i got this Error please help..!
Error: failed to create deliver client for orderer: orderer client
failed to connect to orderer.example.com:7050: failed to create new
connection: connection error: desc = "transport: error while dialing:
dial tcp: lookup orderer.example.com: no such host" !!!!!!!!!!!!!!!
Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
byfn.sh script was used with older fabric versions and is no longer supported. The latest fabric-samples is having a network.sh script to setup fabric network. Detailed tutorial is available in official docs.
Using Idemix in Hyperledger Fabric to submit transactions
I have been exploring idemix in hyperledger fabric v2.2. I tried submitting transactions via peer cli as idemix identity but it returns me an error when chaincode is in Java or Javascript, but works when Go chaincode is used. So I want to know if there are any restrictions on the chaincode language to be used if idemix identities are used to submit transactions. Following are sections of logs received.
Error logs for java
Cli
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: transaction returned with failure: Could not create new client identity"
Chaincode container
11:42:24:528 SEVERE org.hyperledger.fabric.Logger error Could not create new client identityorg.hyperledger.fabric.contract.ContractRuntimeException: Could not create new client identity
at org.hyperledger.fabric.contract.Context.<init>(Context.java:59)
... 11 more
Caused by: java.io.IOException: Empty input
at java.base/sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:106)
... 14 more
caused by ..Could not parse certificate: java.io.IOException: Empty input java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input
at java.base/sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:110)
at java.base/java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:355)
...
Peer container
2020-09-21 11:42:24.396 UTC [endorser] callChaincode -> INFO 06b finished chaincode: basic duration: 104ms channel=mychannel txID=5ec99579
2020-09-21 11:42:24.398 UTC [endorser] SimulateProposal -> ERRO 06c failed to invoke chaincode basic, error: transaction returned with failure: Could not create new client identity
github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:182
...
Error logs for javascript
Cli
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: transaction returned with failure: Error: Failed to find start line or end line of the certificate."
Chaincode container
2020-09-22T08:41:44.648Z error [c-api:contracts-spi/chaincodefromcontract.js] [mychannel-a91f4fa4] Error: Failed to find start line or end line of the certificate.
2020-09-22T08:41:44.652Z error [c-api:lib/handler.js] [mychannel-a91f4fa4] Calling chaincode Invoke() returned error response [Error: Failed to find start line or end line of the certificate.
at normalizeX509 (/usr/local/src/node_modules/fabric-shim/lib/chaincode.js:387:15)
at new ClientIdentity (/usr/local/src/node_modules/fabric-shim/lib/chaincode.js:258:32)
at ChaincodeFromContract.invokeFunctionality (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:354:35)
at ChaincodeFromContract.Invoke (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:315:21)
at handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:602:47)
at ChaincodeMessageHandler.handleTransaction (/usr/local/src/node_modules/fabric-shim/lib/handler.js:390:9)
at ClientDuplexStreamImpl.<anonymous> (/usr/local/src/node_modules/fabric-shim/lib/handler.js:330:30)
at ClientDuplexStreamImpl.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)]. Sending ERROR message back to peer
Peer container
2020-09-22 08:41:44.658 UTC [endorser] callChaincode -> INFO 06c finished chaincode: basic duration: 25ms channel=mychannel txID=a91f4fa4
2020-09-22 08:41:44.658 UTC [endorser] SimulateProposal -> ERRO 06d failed to invoke chaincode basic, error: transaction returned with failure: Error: Failed to find start line or end line of the certificate.
github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:182
...
Setup Info
fabric version: 2.2
idemix identities generated using idemixgen tool
X.509 identities generated using cryptogen tool
chaincode invoked using peer chaincode invoke command
chaincode: asset-transfer-basic
chaincode languages: java, javascript
repository link to fabric samples
using fabric deployment on docker compose
References
https://hyperledger-fabric.readthedocs.io/en/release-2.2/idemix.html
https://hyperledger-fabric.readthedocs.io/en/release-2.2/idemixgen.html
Yes, For the moment you can only use Idemix with go based chaincodes. As you wan see on the documentations of hyperledger fabric Idemix ,
The cid (Client Identity) library (for Go only) has been extended to
support the GetAttributeValue function when an Idemix credential is
used
I am very new to the Hyperledger Fabric and Convector Framework and I have followed this tutorial:
https://worldsibu.github.io/convector/modules/getting_started.html
When I try to use the CLI tool and run the command (test is my chaincode name):
npm run cc:start -- test 1
It gives the following errors:
Installing Chaincode test version 1.0 at org1
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access
denied: channel [] creator org [org1MSP]
...
Installing Chaincode test version 1.0 at org2
Error: error getting endorser client for install: endorser client failed to
connect to localhost:7151: failed to create new connection: context deadline
exceeded
I have not changed the configs and MSPs.
What is going wrong and how should I start to resolve the problem? Any guidance is appreciated!
#shole that documentation is now deprecated, you can use http://docs.worldsibu.com/convector for the latest versions.
About your error that usually happens when the environment gets corrupted and keeps cryptographic materials from a previous installation, try re-running npm run env:restart and try again.
I have started to get time out error while installing my chaincode. The chaincode is pretty basic, in fact, I am just extending the fabcar node.js sample. Please see the error I receive:
Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction e865662f96312f27ee8a221faba6893633498693408f95e57e5e404e58731afd: timeout expired while starting chaincode aar:1.0 for transaction e865662f96312f27ee8a221faba6893633498693408f95e57e5e404e58731afd
Error from the Peer node container logs:
2018-10-16 09:44:13.640 UTC [endorser] SimulateProposal -> ERRO 038 [mychannel][e865662f] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode aar:1.0 for transaction e865662f96312f27ee8a221faba6893633498693408f95e57e5e404e58731afd
I have already increased the values of the following two environment variables but to no avail:
CORE_CHAINCODE_DEPLOYTIMEOUT=1000s
CORE_CHAINCODE_STARTUPTIMEOUT=1000s
For me there was a compilation error in a JS class inside the chaincode folder. So, ensure that everything inside your chaincode folder is fine, otherwise you'll get lscc timeout error while chaincode installs on the peer