Re: Adding a peer node when no genesis block orderer exist in the channel
#fabric-orderer
#raft
#hyperledger-fabric
chintanr97@...
One quick question.
What would happen in the scenario where peer is able to fetch the blocks of the channel from the genesis block orderers? I mean to say, how would the peer identify the Orderer Organization's root TLS certificate in that case (let's say when we have more than 1 Orderer Organization in the channel)? |
||||||||||||||||||
|
||||||||||||||||||
Cancelled Event: Hyperledger Fabric Chaincode EVM
#cal-cancelled
fabric@lists.hyperledger.org Calendar <fabric@...>
Cancelled: Hyperledger Fabric Chaincode EVM This event has been cancelled. When: Where: Organizer: Hyperledger Community Meetings linuxfoundation.org_nf9u64g9k9rvd9f8vp4vur23b0@... Description: |
||||||||||||||||||
|
||||||||||||||||||
Re: Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
David Enyeart
I've improved the error message a bit so that the next people to hit the issue at least know which communication has failed upfront: Thanks Dave. The error message was not clear why it was failing. For others, if you end up with the same issue, to fix the error, make sure the TLS arguments passed correctly. An example working instantiation command with TLS is: peer chaincode instantiate -o orderer:7050 --tls --cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" Thanks, Suresh
As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer. Looks like the client failed to send the results to the ordering service node: https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63 Not sure why grpc returned EOF upon send though... Dave Enyeart <graycol.gif>suresh.appana1---05/19/2020 02:57:43 PM---I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout e From: suresh.appana1@... To: David Enyeart <enyeart@...> Date: 05/19/2020 02:57 PM Subject: [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s On the client side I am getting this error for instantiation step: `Error: could not send: EOF` Snippet is: ``` peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" 2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil> 2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil> 2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil> 2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore 2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil> 2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil> 2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW 2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]] 2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done 2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW] 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc Error: could not send: EOF ``` Thanks, Suresh |
||||||||||||||||||
|
||||||||||||||||||
Re: [FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal
Brett T Logan <brett.t.logan@...>
This Jira is to improve the overall performance of the EnhancedExactUnmarshal. You won't be able to reproduce the slow times anymore as a change was push to cache the result of the call to EnhancedExactUnmarshal and pull from that cache rather than unmarshal it every time. I can try to find the PR where those changes were made so you can see the caching mechanism.
I assume we would still want to improve the performance of this call as the cache is a workaround to the poor performance, but I'll defer to Matt on that question.
----- Original message ----- |
||||||||||||||||||
|
||||||||||||||||||
Re: Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
Suresh Appana
Thanks Dave. The error message was not clear why it was failing.
toggle quoted message
Show quoted text
For others, if you end up with the same issue, to fix the error, make sure the TLS arguments passed correctly. An example working instantiation command with TLS is: peer chaincode instantiate -o orderer:7050 --tls --cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" Thanks, Suresh
|
||||||||||||||||||
|
||||||||||||||||||
Windows 10: Bug when installing chaincode using external builders
#externalbuilders
clubmx7771@...
Hello,
I'm trying to install chaincode on windows 10 using external builders. I have made detect.bat, build.bat and release.bat scripts. Detect and build scripts are working as expected. Release script is not run. I always get a message "Skipping release step for 'fabcar:1363e2c060287407039f1f1949dafbc31bba901a1051e5b7488c31cf728c8049' as no release binary found" Looks like there is a bug in the source code in that part https://github.com/hyperledger/fabric/blob/master/core/container/externalbuilder/externalbuilder.go#L319 I'm using hyperledger fabric of version 2.1.0 |
||||||||||||||||||
|
||||||||||||||||||
[FAB-17598] Improve the efficiency of viperutil.EnhancedExactUnmarshal
Nicholas Basker
Hello:
New comer to HL fabric, starting out by building, running and understanding the unit and integration tests. Picked the help-wanted JIRA issue below https://jira.hyperledger.org/browse/FAB-17508 (submitter @MatthewSykes) Just took a sample set of the following tests peer.TestCreateChannel, genesisconfig.TestLoadProfile.func1. Tried to reproduce as shown below, it seems to be completing in milliseconds as opposed ~5seconds below. I tried doing "make unit-test" and "make integration-test" but unable to get the issue. Possibly am missing something in my repro steps, any pointers on steps to repro would be helpful. Thanks, Nicholas.
(Tried using the recommended method of TEST_PKGS="github.com/hyperledger/fabric/core/ledger/peer" make unit-test, but the run was cached inspite of giving -count=1 in GO_TAGS, then resorted to the method below) nb@~/Documents/github.com/nbasker/fabric$ go test -v github.com/hyperledger/fabric/core/peer | grep TestCreateChannel === RUN TestCreateChannel --- PASS: TestCreateChannel (0.29s) nb@~/Documents/github.com/nbasker/fabric$ go test -v -count=1 github.com/hyperledger/fabric/internal/configtxgen/genesisconfig | grep TestLoadProfile === RUN TestLoadProfile === RUN TestLoadProfile/SampleDevModeKafka === RUN TestLoadProfile/SampleDevModeSolo === RUN TestLoadProfile/SampleSingleMSPChannel === RUN TestLoadProfile/SampleSingleMSPKafka === RUN TestLoadProfile/SampleSingleMSPSolo --- PASS: TestLoadProfile (0.35s) --- PASS: TestLoadProfile/SampleDevModeKafka (0.33s) --- PASS: TestLoadProfile/SampleDevModeSolo (0.00s) --- PASS: TestLoadProfile/SampleSingleMSPChannel (0.00s) --- PASS: TestLoadProfile/SampleSingleMSPKafka (0.00s) --- PASS: TestLoadProfile/SampleSingleMSPSolo (0.00s) === RUN TestLoadProfileWithPath === RUN TestLoadProfileWithPath/SampleDevModeKafka === RUN TestLoadProfileWithPath/SampleDevModeSolo === RUN TestLoadProfileWithPath/SampleSingleMSPChannel === RUN TestLoadProfileWithPath/SampleSingleMSPKafka === RUN TestLoadProfileWithPath/SampleSingleMSPSolo --- PASS: TestLoadProfileWithPath (0.02s) --- PASS: TestLoadProfileWithPath/SampleDevModeKafka (0.00s) --- PASS: TestLoadProfileWithPath/SampleDevModeSolo (0.00s) --- PASS: TestLoadProfileWithPath/SampleSingleMSPChannel (0.00s) --- PASS: TestLoadProfileWithPath/SampleSingleMSPKafka (0.00s) --- PASS: TestLoadProfileWithPath/SampleSingleMSPSolo (0.00s) |
||||||||||||||||||
|
||||||||||||||||||
Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found
#fabric-sdk-node
Matthew White
Thanks for reporting that... and Ry for putting in the PR! Will merge it shortly.
Sorry about that.. can't believe I put the wrong name in that doc :-(
Regards, Matthew.
Matthew B White IBM Blockchain Solutions Architect
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at calanais.me.uk
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN
"The wrong answers are the ones you go looking for when the right answers stare you in the face" ----- Original message ----- IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU |
||||||||||||||||||
|
||||||||||||||||||
Re: Error: You've asked to invoke a function that does not exist:
Matthew White
Hello;
Here's some things that I would try in similar circumstances.
The error suggests that you've been able to connect. Change the name of the function you're invoking to org.hyperledger.fabric:GetMetadata
Doesn't need any arguments - what you get back is a JSON payload that describes the contract that you've connected to.
This will let you check that the function is there and validate the spelling of the name etc.
It's also useful to monitor the chaincode docker container (docker logs -f <containerid>) as that will help show any errors.
If you're able to copy your updated samples to a github gist or similar it could help.
Thanks!
Regards, Matthew.
Matthew B White IBM Blockchain Solutions Architect
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at calanais.me.uk
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN
"The wrong answers are the ones you go looking for when the right answers stare you in the face" ----- Original message ----- IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU |
||||||||||||||||||
|
||||||||||||||||||
Error: You've asked to invoke a function that does not exist:
Skyler Saleebyan
Hello, I copied the fabcar code and made a seperate in the fabric-samples and was tinkering with the chaincode to see if I can add new methods and functionalities, but I have been having issues. I copied the chaincode/fabcar and fabcar folder to make chaincode/net-test and net-test folders In chaincode/net-test/javascript/lib/fabcar.js I changed the code to have a createLocation method. After saving these changes I adjusted /net-test/javascript/invoke.js to instead try calling my createLocation function. I successfully ran startFabric.sh, as well as enrollAdmin.js, and registerUser.js . But when I run invoke I get the error: Wallet path: /home/skyler/fabric-samples/net-test/javascript/wallet 2020-05-20T03:16:21.863Z - error: [Transaction]: Error: No valid responses from any peers. Errors: peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation Failed to submit transaction: Error: No valid responses from any peers. Errors: peer=peer0.org1.example.com:7051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation peer=peer0.org2.example.com:9051, status=500, message=error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: createLocation I'm not quite sure what else I can do since I've already used startFabric.sh to reset the network. Help would be appreciated. Thanks, Skyler S. |
||||||||||||||||||
|
||||||||||||||||||
Re: Error When Attempting to First Invoke Chaincode
White, Spencer (S.)
My apologies. If I had read further the first time I would have noticed this
JIRA, immediately following the previous one I linked to, which clearly states you are working on documentation updates for compatibility concerning node versions.
I updated my containers to version 1.4.5 and everything is working correctly.
Sincerely,
Spencer
From: White, Spencer (S.)
Sent: Tuesday, May 19, 2020 6:25 PM To: fabric@... <fabric@...> Subject: Error When Attempting to First Invoke Chaincode
Hello,
I am encountering the attached error in the first of my chaincode containers that is being invoked after the chaincode has been installed and instantiated on my peer.
I thought this could possibly be related to a recent
update/JIRA ticket for the fabric-shim for node, which moved from the deprecated grpc, to @grpc/grpc-js.
I am using v1.4 of the all the docker images of all the fabric containers, including fabric-ccenv. Is this the issue? Does anyone know the version of node the v1.4 chaincode or fabric-ccenv containers are using?
My host machine node version is LTS v12.16.3 and npm is v6.14.4.
Any input or direction would be appreciated.
Sincerely,
Spencer
|
||||||||||||||||||
|
||||||||||||||||||
Re: Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
David Enyeart
As indicated at https://stackoverflow.com/questions/55394476/error-could-not-send-eof-on-instantiating-chaincode , EOF can be caused by TLS issues between client and orderer. Looks like the client failed to send the results to the ordering service node: https://github.com/hyperledger/fabric/blob/release-1.4/peer/common/broadcastclient.go#L63 Not sure why grpc returned EOF upon send though... Dave Enyeart From: suresh.appana1@... To: David Enyeart <enyeart@...> Date: 05/19/2020 02:57 PM Subject: [EXTERNAL] Private: Re: [Hyperledger Fabric] Chaincode container is running but query operation gives chaincode instantiation failed #fabric-chaincode I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s On the client side I am getting this error for instantiation step: `Error: could not send: EOF` Snippet is: ``` peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" 2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil> 2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil> 2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil> 2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore 2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil> 2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil> 2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW 2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]] 2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done 2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW] 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc Error: could not send: EOF ``` Thanks, Suresh |
||||||||||||||||||
|
||||||||||||||||||
Error When Attempting to First Invoke Chaincode
White, Spencer (S.)
Hello,
I am encountering the attached error in the first of my chaincode containers that is being invoked after the chaincode has been installed and instantiated on my peer.
I thought this could possibly be related to a recent
update/JIRA ticket for the fabric-shim for node, which moved from the deprecated grpc, to @grpc/grpc-js.
I am using v1.4 of the all the docker images of all the fabric containers, including fabric-ccenv. Is this the issue? Does anyone know the version of node the v1.4 chaincode or fabric-ccenv containers are using?
My host machine node version is LTS v12.16.3 and npm is v6.14.4.
Any input or direction would be appreciated.
Sincerely,
Spencer
|
||||||||||||||||||
|
||||||||||||||||||
Re: Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
David Enyeart
Looks like the client failed to send the results to the ordering service node: I was getting timeout error earlier, but as I increased timeout values now I don’t see any timeout error . Current values of timeouts are: CORE_CHAINCODE_EXECUTETIMEOUT: 60000s and CORE_CHAINCODE_DEPLOYTIMEOUT: 60000s On the client side I am getting this error for instantiation step: `Error: could not send: EOF` Snippet is: ``` peer chaincode instantiate -o orderer:7050 — tls — cafile /fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n $CHAINCODE_NAME -v $CHAINCODE_VERSION -c '{"Args":["init", "a", "100", "b", "200"]}' -P "AND ('Org1MSP.peer','Org2MSP.peer')" 2020-05-19 15:44:25.628 -03 [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2 2020-05-19 15:44:25.629 -03 [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256 2020-05-19 15:44:25.629 -03 [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 2020-05-19 15:44:25.630 -03 [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11 2020-05-19 15:44:25.630 -03 [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.631 -03 [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil> 2020-05-19 15:44:25.631 -03 [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.632 -03 [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil> 2020-05-19 15:44:25.633 -03 [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.634 -03 [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil> 2020-05-19 15:44:25.635 -03 [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil> 2020-05-19 15:44:25.636 -03 [viperutil] getKeysRecursively -> DEBU 013 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore 2020-05-19 15:44:25.637 -03 [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.638 -03 [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil> 2020-05-19 15:44:25.640 -03 [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil> 2020-05-19 15:44:25.641 -03 [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil> 2020-05-19 15:44:25.642 -03 [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value 2020-05-19 15:44:25.642 -03 [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW 2020-05-19 15:44:25.642 -03 [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil> Hash:<nil>] Default:SW]] 2020-05-19 15:44:25.643 -03 [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp/keystore]...done 2020-05-19 15:44:25.643 -03 [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW] 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01d Using default escc 2020-05-19 15:44:25.668 -03 [chaincodeCmd] checkChaincodeCmdParams -> INFO 01e Using default vscc Error: could not send: EOF ``` Thanks, Suresh |
||||||||||||||||||
|
||||||||||||||||||
Re: Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
David Enyeart
Your chaincode image build took over 3 minutes which is much longer than normal. Hi, I am trying to setup HLF to run in K8s. I see that peer is starting chaincode container and chaincode container is running succesfully. But instantiation step is exiting with EOF and when I perform a query, its failed with the error message: Error: endorsement failure during query. response: status:500 message:"make sure the chaincode test_cc has been successfully instantiated and try again: chaincode test_cc not found" Attached logs of instantiation and query. My setup is peer pod contains: peer container and dind. Chaincode container runs in dind.
|
||||||||||||||||||
|
||||||||||||||||||
Chaincode container is running but query operation gives chaincode instantiation failed
#fabric-chaincode
Suresh Appana
Hi, I am trying to setup HLF to run in K8s. I see that peer is starting chaincode container and chaincode container is running succesfully. But instantiation step is exiting with EOF and when I perform a query, its failed with the error message: Error: endorsement failure during query. response: status:500 message:"make sure the chaincode test_cc has been successfully instantiated and try again: chaincode test_cc not found" Attached logs of instantiation and query. My setup is peer pod contains: peer container and dind. Chaincode container runs in dind.
|
||||||||||||||||||
|
||||||||||||||||||
Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found
#fabric-sdk-node
On Tue, May 19, 2020 at 9:12 AM Magno A. Cavalcante <magnocav@...> wrote: On Tue, May 19, 2020 at 10:16 AM, Matthew White wrote: |
||||||||||||||||||
|
||||||||||||||||||
Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found
#fabric-sdk-node
On Tue, May 19, 2020 at 10:16 AM, Matthew White wrote:
Thanks Matthew! I changed the source code of my "package.json" as Matthew indicated, and my chaincode was successfully instantiated. Explanation: (1) I wrote my package.json with reference to the packages described in the URL "https://hyperledger.github.io/fabric-chaincode-node/master/api/tutorial-using-contractinterface.html". And in this page there is the code "dependencies": { "fabric-chaincode-api": "^1.4.0", "fabric-shim": "^1.4.0" }. So I believe that this code snippet has some inconsistency. (2) Please, I ask the team that makes the "fabric-sdk-node" documentation to correct the content of the page at the above URL, to avoid that other professionals from getting into the same problem. The correct source code of my "package.json" (which is working) is: // ------------------- { "name": "democontract", "version": "1.0.0", "description": "Document Contract", "main": "index.js", "engines": { "node": ">=8.4.0", "npm": ">=5.3.0" }, "scripts": { "lint": "eslint .", "pretest": "npm run lint", "start": "fabric-chaincode-node start", "mocha": "mocha test --recursive" }, "engine-strict": true, "license": "Apache-2.0", "private": true, "dependencies": { "mkdirp": ">=0.5.5", "openpgp": "^4.10.0", "fabric-contract-api": "^1.4.3", "fabric-shim": "^1.4.3" }, "devDependencies": { "chai": "^4.1.2", "chai-as-promised": "^7.1.1", "eslint": "^4.19.1", "mocha": "^5.2.0", "nyc": "^12.0.2", "sinon": "^6.0.0", "sinon-chai": "^3.2.0" } } // ------------------- --- Regards, Magno A. Cavalcante |
||||||||||||||||||
|
||||||||||||||||||
Re: ERR! 404 Not Found - GET https://registry.npmjs.org/fabric-chaincode-api - Not found
#fabric-sdk-node
Matthew White
Hello - the module is `fabric-contract-api` rather than chaincode-api:-)
Regards, Matthew.
Matthew B White IBM Blockchain Solutions Architect
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at calanais.me.uk
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN
"The wrong answers are the ones you go looking for when the right answers stare you in the face" ----- Original message ----- IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU |
||||||||||||||||||
|
||||||||||||||||||
Re: Adding a peer node when no genesis block orderer exist in the channel
#fabric-orderer
#raft
#hyperledger-fabric
Gari Singh <garis@...>
The desired solution for this is to allow peers to join channels starting from the latest config block rather than requiring starting from the genesis block.
The checkpoint/archive feature will also help here as well as a peer will be able to start from the latest state and checkpoint as well. In the interim, we did look at modifying the JoinChannel API to allow passing in the "orderer override" information but at the time deemed it a bit too invasive and did not want to invest in hacking the current JoinChannel API implementation as we plan to move away from the system chaincode approach currently being used. Additionally, you actually need to persist the override information in the case where you decide to rebuild the ledger for a given channel. Simply passing overrides as part of the API is not enough; we'd also have to persist this override information as well. ----------------------------------------- Gari Singh Distinguished Engineer, CTO - IBM Blockchain IBM Middleware 550 King St Littleton, MA 01460 Cell: 978-846-7499 garis@... ----------------------------------------- -----fabric@... wrote: ----- To: fabric@... From: chintanr97@... Sent by: fabric@... Date: 05/19/2020 12:37AM Subject: [EXTERNAL] Re: [Hyperledger Fabric] Adding a peer node when no genesis block orderer exist in the channel #fabric-orderer #raft #hyperledger-fabric @Yacov, I would like to highlight that why aren't we making using of peer CLI command for this? I mean to say that in "peer channel join" command we have an option of specifying the orderer endpoint, right? We should just extend that to be used in the scenario where peer cannot pull blocks from genesis block orderers. Specifying "-o" argument should make the peer pull channel blocks from the specified endpoint instead of looking into config block. You can run the peer channel join command like follows: peer channel join -b mychannel.block -o orderer4.example.com --tls --cafile <ordererTLSCAFile> The benefit would be: The change in core.yaml is permanent like you explained on my JIRA. This feature would be dynamic in nature. Already running peers could join newer channels dynamically. Currently, I tried implementing above feature but peer node does respect the "-o" argument (and yet we have it in the "peer" binary commands). If we are using it in other operations like "invoke" then we should allow this command to run parallel to that, giving a more dynamic nature, instead of making using of core.yaml. Please let me know your thoughts on this. |
||||||||||||||||||
|