A hyperldger fabric network with two peers and 3 orderers, chain code got installed in both peers, everything works fine, but I see following logs on the peers, Is there anybody who can tell what going on?
Peer-1 shows a lot of frequent discovery.Discovery logs that keep coming.
Peer-2 showing also a lot of callChaincode, QueryChaincodeDefinition logs, but no Txns is coming, nothing got invoked on-chain code
Peer-1
2022-02-22 07:10:03.291 UTC 8272 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:18.29Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=369.752µs
2022-02-22 07:10:03.292 UTC 8273 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:18.29Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=1.846248ms
2022-02-22 07:10:08.296 UTC 8274 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:23.295Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=365.531µs
2022-02-22 07:10:08.296 UTC 8275 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:23.295Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=1.049292ms
2022-02-22 07:10:13.300 UTC 8276 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:28.299Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=534.941µs
2022-02-22 07:10:13.301 UTC 8277 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:28.299Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=656.879µs
2022-02-22 07:10:18.305 UTC 8278 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:33.304Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=295.207µs
2022-02-22 07:10:18.306 UTC 8279 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.request_deadline=2022-02-22T07:10:33.304Z grpc.peer_address=172.26.0.1:52930 grpc.code=OK grpc.call_duration=691.75µs
Peer-2
2022-02-22 07:18:11.393 UTC a78c INFO [lifecycle] QueryChaincodeDefinition -> Successfully queried chaincode name 'sumitcc' with definition {sequence: 1, endorsement info: (version: '1.0', plugin: 'escc', init required: false), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()},
2022-02-22 07:18:11.394 UTC a78d INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 4ms channel=sumit txID=b67a8f4a
2022-02-22 07:18:11.394 UTC a78e INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.100.124.44:55586 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=5.094712ms
2022-02-22 07:18:11.407 UTC a78f INFO [endorser] callChaincode -> finished chaincode: lscc duration: 2ms channel=sumit txID=e6d3966f
2022-02-22 07:18:11.407 UTC a790 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.100.124.44:55586 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=3.485798ms
2022-02-22 07:18:11.415 UTC a791 INFO [lifecycle] QueryChaincodeDefinition -> Successfully queried chaincode name 'sumitcc' with definition {sequence: 1, endorsement info: (version: '1.0', plugin: 'escc', init required: false), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()},
2022-02-22 07:18:11.416 UTC a792 INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 3ms channel=sumit txID=b2da61c8
2022-02-22 07:18:11.416 UTC a793 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.100.124.44:55586 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=4.619323ms
No worries. It's just a background work needed by peers to keep their MSP updated. I believe one is anchor peer while the other one is trying to get updated with a time interval. You may tune the log level to debug tho, it is good enough for learning HLF.
Related
I am running Hyperledger Fabric and while trying to install the chaincode on peer0.org1, "peer lifecycle chaincode install basic.tar.gz", I run into some errors and can not install it -- Error: chaincode install failed with status: 500 - error in simulation: failed to execute transaction ee4a6ae0672861fa153e7fd5cd797e59b3eeebf1d2950ccd9e13e8231de484a9: error sending: timeout expired while executing transaction.
Below I will share the logs. Can anyone tell me what should I do? I have tried to reinstall it but with no success.
----logs---
2022-08-28 16:10:46.246 UTC 004a INFO [chaincode.externalbuilder.ccaas_builder] waitForExit -> ::Error: chaincode type not supported: node command=detect
2022-08-28 16:14:33.640 UTC 004b WARN [peer.blocksprovider] func1 -> Encountered an error reading from deliver stream: rpc error: code = Unavailable desc = transport is closing channel=mychannel orderer-address=orderer.example.com:7050
2022-08-28 16:14:33.640 UTC 004c WARN [peer.blocksprovider] DeliverBlocks -> Orderer hung up without sending status channel=mychannel orderer-address=orderer.example.com:7050
2022-08-28 16:15:46.750 UTC 004d INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 300000ms channel= txID=ee4a6ae0
2022-08-28 16:15:46.778 UTC 004e ERRO [endorser] simulateProposal -> failed to invoke chaincode _lifecycle, error: timeout expired while executing transaction
github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1571 channel= txID=ee4a6ae0
2022-08-28 16:15:46.778 UTC 004f WARN [endorser] ProcessProposal -> Failed to invoke chaincode channel= chaincode=_lifecycle error="error in simulation: failed to execute transaction ee4a6ae0672861fa153e7fd5cd797e59b3eeebf1d2950ccd9e13e8231de484a9: error sending: timeout expired while executing transaction"
2022-08-28 16:15:46.778 UTC 0050 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.21.0.1:51150 grpc.code=OK grpc.call_duration=5m0.029919322s
2022-08-28 16:16:03.168 UTC 0051 INFO [lifecycle] InstallChaincode -> Successfully installed chaincode with package ID 'basic_1.0:9821071a953f452bda87fe89637d1e377dac825da4649ba998464a3c85d60c50'
2022-08-28 16:20:33.471 UTC 0052 WARN [peer.blocksprovider] func1 -> Encountered an error reading from deliver stream: rpc error: code = Unavailable desc = transport is closing channel=mychannel orderer-address=orderer.example.com:7050
2022-08-28 16:20:33.471 UTC 0053 WARN [peer.blocksprovider] DeliverBlocks -> Orderer hung up without sending status channel=mychannel orderer-address=orderer.example.com:7050
I'm setting up an hyperledger fabric network with docker compose.
All the containers are up and running but i'm having problems with the appprovemyorg command.
These are the logs of the peer after joining the channel:
2022-05-24 07:41:54.316 UTC 0023 INFO [ledgermgmt] CreateLedger -> Creating ledger [mychannel] with genesis block
2022-05-24 07:41:54.319 UTC 0024 INFO [blkstorage] newBlockfileMgr -> Getting block information from block storage
2022-05-24 07:41:54.328 UTC 0025 INFO [kvledger] commit -> [mychannel] Committed block [0] with 1 transaction(s) in 6ms (state_validation=0ms block_and_pvtdata_commit=3ms state_commit=1ms) commitHash=[]
2022-05-24 07:41:54.328 UTC 0026 INFO [kvledger] updateLedgerStatus -> Updating ledger [mychannel] status to [ACTIVE]
2022-05-24 07:41:54.329 UTC 0027 INFO [ledgermgmt] CreateLedger -> Created ledger [mychannel] with genesis block
2022-05-24 07:41:54.332 UTC 0028 INFO [gossip.gossip] JoinChan -> Joining gossip network of channel mychannel with 1 organizations
2022-05-24 07:41:54.332 UTC 0029 INFO [gossip.gossip] learnAnchorPeers -> No configured anchor peers of org1MSP for channel mychannel to learn about
2022-05-24 07:41:54.333 UTC 002a INFO [gateway] configUpdate -> Updating orderer config channel=mychannel
2022-05-24 07:41:54.333 UTC 002b INFO [gossip.state] NewGossipStateProvider -> Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1
2022-05-24 07:41:54.333 UTC 002c INFO [endorser] callChaincode -> finished chaincode: cscc duration: 21ms channel= txID=a704dc84
2022-05-24 07:41:54.333 UTC 002d INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59204 grpc.code=OK grpc.call_duration=22.209824ms
2022-05-24 07:42:00.335 UTC 002e INFO [gossip.election] beLeader -> 49ad88f230e73d14bb6f9b8a891c0f5bc47a35cd793ff62222e489f762864a33 : Becoming a leader
2022-05-24 07:42:00.335 UTC 002f INFO [gossip.service] func1 -> Elected as a leader, starting delivery service for channel mychannel
2022-05-24 07:42:00.335 UTC 0030 INFO [deliveryClient] StartDeliverForChannel -> This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel
2022-05-24 07:30:08.206 UTC 0031 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer2:8050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:8050: connect: connection refused" channel=mychannel
2022-05-24 07:30:08.307 UTC 0032 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer3:9050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:9050: connect: connection refused" channel=mychannel
2022-05-24 07:30:08.428 UTC 0033 WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer1:7050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:7050: connect: connection refused" channel=mychannel
As you can see, i have some warnings but I can safely join the channel and I have no problems at all when i install the chaincode (the warnings disappear too).
These are the logs on the peer after installing the chaincode:
2022-05-24 07:45:17.017 UTC 0052 INFO [chaincode.externalbuilder.ccaas_builder] waitForExit -> ::Detect command=detect
2022-05-24 07:45:17.017 UTC 0053 INFO [chaincode.externalbuilder.ccaas_builder] waitForExit -> ::Error: chaincode type not supported: java command=detect
2022-05-24 07:45:17.023 UTC 0054 INFO [lifecycle] InstallChaincode -> Successfully installed chaincode with package ID 'testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7'
2022-05-24 07:45:17.023 UTC 0055 INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 14ms channel= txID=694acf7b
2022-05-24 07:45:17.023 UTC 0056 INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59206 grpc.code=OK grpc.call_duration=15.8101ms
When i try to approve the chaincode with this command:
peer lifecycle chaincode approveformyorg --tls --cafile /tmp/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-tls-ca-7052.pem -o orderer1:7050 --ordererTLSHostnameOverride orderer1 --channelID mychannel --name mycc --version 1 --sequence 1 --waitForEvent --init-required --package-id testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7
I have this error:
Error: timed out waiting for txid on all peers
With these logs on the peer:
2022-05-24 07:46:54.303 UTC 0059 INFO [lifecycle] ApproveChaincodeDefinitionForOrg -> Successfully endorsed chaincode approval with name 'mycc', package ID 'testchaincode_1:de8cddcb2deda13a7a3c1e9f6e37764e6d2c1bb6f89bac1f0d2c6396587b35f7', on channel 'mychannel' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()}
2022-05-24 07:46:54.303 UTC 005a INFO [endorser] callChaincode -> finished chaincode: _lifecycle duration: 0ms channel=mychannel txID=d56b21b6
2022-05-24 07:46:54.308 UTC 005b INFO [comm.grpc.server] 1 -> unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.9:59210 grpc.code=OK grpc.call_duration=6.78249ms
2022-05-24 07:46:55.194 UTC 005c WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer1:7050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:7050: connect: connection refused" channel=mychannel
2022-05-24 07:47:24.311 UTC 005d INFO [comm.grpc.server] 1 -> streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.request_deadline=2022-05-24T07:47:24.31Z grpc.peer_address=172.22.0.9:59212 error="context finished before block retrieved: context deadline exceeded" grpc.code=Unknown grpc.call_duration=30.0006887s
2022-05-24 07:47:54.260 UTC 005e WARN [peer.blocksprovider] DeliverBlocks -> Could not connect to ordering service: could not dial endpoint 'orderer2:8050': failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:8050: connect: connection refused" channel=mychannel
So i can't approve the chaincode and advance in the process.
Can anyone help me solve this problem?
Thanks
I am using Hyperledger Caliper to benchmark Fabric and I am facing the following errors regarding the caliper workers. I am currently using verion 0.4.0 of caliper
2020-11-07T13:06:23.286Z - error: [EventService]: send[peer0.org1.example.com] - #1 - no targets started - Error: Event service peer0.org1.example.com is currently listening
.
.
.
2020-11-07T13:22:52.517Z - error: [EventService]: EventService[peer0.org1.example.com] timed out after:3000
2020-11-07T13:22:52.517Z - error: [EventService]: send[peer0.org1.example.com] - #1 - Starting stream to peer0.org1.example.com failed
Logs from docker container :
2020-11-10 16:57:20.648 UTC [comm.grpc.server] 1 -> INFO 086 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=172.23.0.1:54524 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=46.965227ms
2020-11-10 16:57:20.659 UTC [comm.grpc.server] 1 -> INFO 087 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=172.23.0.1:54532 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=27.74555ms
2020-11-10 16:57:20.666 UTC [comm.grpc.server] 1 -> INFO 088 unary call completed grpc.service=discovery.Discovery grpc.method=Discover grpc.peer_address=172.23.0.1:54528 grpc.peer_subject="CN=fabric-common" grpc.code=OK grpc.call_duration=1.669585ms
2020-11-10 16:57:21.612 UTC [gossip.privdata] StoreBlock -> INFO 089 [mychannel] Received block [7] from buffer
2020-11-10 16:57:21.619 UTC [committer.txvalidator] Validate -> INFO 08a [mychannel] Validated block [7] in 6ms
2020-11-10 16:57:21.745 UTC [kvledger] CommitLegacy -> INFO 08b [mychannel] Committed block [7] with 10 transaction(s) in 126ms (state_validation=18ms block_and_pvtdata_commit=67ms state_commit=24ms) commitHash=[03a387b92c0f19e18fd7856a50b912eb5ad3c8f88c79f8aa222bc96ff6ed6b6c]
.
.
.
.
2020-11-10 16:57:28.007 UTC [comm.grpc.server] 1 -> INFO 109 streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=172.23.0.1:55012 grpc.peer_subject="CN=fabric-common" error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=6.897965539s
2020-11-10 16:57:28.007 UTC [comm.grpc.server] 1 -> INFO 10a streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=172.23.0.1:55012 grpc.peer_subject="CN=fabric-common" error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=6.89275949s
2020-11-10 16:57:28.007 UTC [comm.grpc.server] 1 -> INFO 10b streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=172.23.0.1:55012 grpc.peer_subject="CN=fabric-common" error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=6.897811583s
2020-11-10 16:57:28.007 UTC [comm.grpc.server] 1 -> INFO 10c streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.peer_address=172.23.0.1:55012 grpc.peer_subject="CN=fabric-common" error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=6.897066284s
2020-11-10 16:57:28.049 UTC [kvledger] CommitLegacy -> INFO 10d [mychannel] Committed block [20] with 10 transaction(s) in 143ms (state_validation=0ms block_and_pvtdata_commit=123ms state_commit=10ms) commitHash=[aec792b8877195798b6c5f25a65f9ea10ed32ae93741199ca422311a9bf61766]
2020-11-10 16:57:28.050 UTC [gossip.privdata] StoreBlock -> INFO 10e [mychannel] Received block [21] from buffer
2020-11-10 16:57:28.060 UTC [committer.txvalidator] Validate -> INFO 10f [mychannel] Validated block [21] in 10ms
2020-11-10 16:57:28.120 UTC [kvledger] CommitLegacy -> INFO 110 [mychannel] Committed block [21] with 10 transaction(s) in 58ms (state_validation=0ms block_and_pvtdata_commit=20ms state_commit=9ms) commitHash=[2772cdefd7bb1f2d9a12b6b4ef3cbe7207ca5b8049613e336342e5e23f642642]
I dont understand these errors. Any hint for what might causing them?
Thank you
A few questions that might help us to help you:
What version of the Fabric SDK do you bind Caliper to?
Are you using a gateway based connection?
Do you have any peer logs available that might also be showing errors?
The SDK errors shown hint that the creation of an Event service failed, which occurs on initial connection to the Fabric network for manager and worker processes as they prepare to interact with the network described in the "network configuration file"
I am trying to run the Hyperledger Fabric for the first time.
Installed the binaries according to this:
https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html
Then trying to start the sample first network: https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html
I am running the: ./byfn.sh generate then: ./byfn.sh up
Unfortunately the the up command gives me this:
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: error getting endorser client for channel: 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"
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
It seem that the: peer0.org1.example.com has quit, so
I've displayed its logs.
docker logs -f peer0.org1.example.com
2019-08-05 07:44:57.356 UTC [fsblkstorage] preRestHtFiles -> INFO 021 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:57.356 UTC [fsblkstorage] LoadPreResetHeight -> INFO 022 Pre-reset heights loaded
2019-08-05 07:44:57.356 UTC [nodeCmd] func7 -> INFO 023 Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:57.364 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.363Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=131.772µs
2019-08-05 07:44:57.368 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.365Z grpc.peer_address=172.20.0.4:32800 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.991758ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f6064357259]
It does look like it has received quit signal, because of: Dir [/var/hyperledger/production/ledgersData/chains/chains] missing
How do I proceed?
EDIT:
Since last line mentions that is an RPC error to: peer1.org1.example.com, below are the logs from: peer1.org1.example.com.
It seems that peer0 can't connect to peer1, whilst peer1 can't connect to peer0
2019-08-05 07:44:56.292 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.4.2
Commit SHA: c6cc550
Go version: go1.11.5
OS/Arch: linux/amd64
Chaincode:
Base Image Version: 0.4.15
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2019-08-05 07:44:56.293 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2019-08-05 07:44:56.293 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2019-08-05 07:44:56.330 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2019-08-05 07:44:56.373 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 007 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.20.0.4:8051
2019-08-05 07:44:56.373 UTC [peer] func1 -> INFO 009 Returning peer1.org1.example.com:8051
2019-08-05 07:44:56.374 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2019-08-05 07:44:56.376 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer1.org1.example.com:8052
2019-08-05 07:44:56.377 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2019-08-05 07:44:56.378 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2019-08-05 07:44:56.380 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer1.org1.example.com:8051 and bootstrap set [peer0.org1.example.com:7051]
2019-08-05 07:44:56.384 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer1.org1.example.com:8051, InternalEndpoint: peer1.org1.example.com:8051, PKI-ID: 54f785fe4477fcb3e57f7f5b817d6b542ff311ec1dd66dfb0ac2ac6abf50e08f, Metadata:
2019-08-05 07:44:56.384 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer1.org1.example.com:8051 started
2019-08-05 07:44:56.385 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-08-05 07:44:56.386 UTC [cscc] Init -> INFO 015 Init CSCC
2019-08-05 07:44:56.386 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-08-05 07:44:56.387 UTC [qscc] Init -> INFO 017 Init QSCC
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-08-05 07:44:56.387 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-08-05 07:44:56.387 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes
2019-08-05 07:44:56.388 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2019-08-05 07:44:56.388 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:8051]
2019-08-05 07:44:56.388 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060
2019-08-05 07:44:56.388 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights
2019-08-05 07:44:56.388 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
2019-08-05 07:44:56.388 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded
2019-08-05 07:44:57.365 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2019-08-05T07:44:59.365Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=160.286µs
2019-08-05 07:44:57.369 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2019-08-05T07:45:07.367Z grpc.peer_address=172.20.0.6:42872 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=1.830335ms
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f39285ea259]
This answer solves the problem: https://stackoverflow.com/a/49649678/2263395
Basically you need to set the ENV variable: GODEBUG=netdns=go to docker-compose files.
I am currently trying to successfully invoke a chaincode on an Hyperledger Fabric network using Docker Swarm, based on this example. My network is the following:
org1 with peer0.org1.com + 1 CA org1 + CLI org1 + orderer.example.com from ordererOrg on PC1
org2 with peer0.org2.com + 1 CA org2 on PC2
It seems that my network is working, but once a chaincode is instantiated on a peer then invoked, the operation is not propagated. E.g I insert data into the ledger, the chaincode container logs show that they process the data, the peer container used to invoke the chaincode seems to have correctly endorsed and simulated the query too. All of this using commands manually from inside the CLI.
peer0.org1.com container logs
2019-07-09 08:52:08.753 UTC [endorser] EndorseWithPlugin -> DEBU 3784 Entering endorsement for {plugin: escc, channel: mychannel, tx: 50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703, chaincode: fabcar}
2019-07-09 08:52:08.753 UTC [msp.identity] Sign -> DEBU 3785 Sign: plaintext: 0A2040CDC0100B7F12FA1505C311EF86...455254494649434154452D2D2D2D2D0A
2019-07-09 08:52:08.753 UTC [msp.identity] Sign -> DEBU 3786 Sign: digest: 5E7E6A043E851C3316B08F5CB4A05D31840D213793C55BF14EBE64213E852F84
2019-07-09 08:52:08.756 UTC [endorser] EndorseWithPlugin -> DEBU 3787 Exiting {plugin: escc, channel: mychannel, tx: 50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703, chaincode: fabcar}
2019-07-09 08:52:08.756 UTC [endorser] endorseProposal -> DEBU 3788 [mychannel][50732326] Exit
2019-07-09 08:52:08.756 UTC [lockbasedtxmgr] Done -> DEBU 3789 Done with transaction simulation / query execution [50732326bbe19c9eb8de42fa327ee67fc2c8102337ef96cdf9ca49fb7a0b7703]
2019-07-09 08:52:08.756 UTC [endorser] func1 -> DEBU 378a Exit: request from 10.0.0.4:34978
2019-07-09 08:52:08.756 UTC [comm.grpc.server] 1 -> INFO 378b unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=10.0.0.4:34978 grpc.code=OK grpc.call_duration=8.895639ms
A (successfully executed) query on the ledger then shows that the ledger state didn't change.
However, if I use the node SDK provided in the fabcar example from the official samples repo (invoke.js) to invoke the same chaincode operation I get an error:
node sdk error with node invoke.js
2019-07-09T09:22:03.277Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:1 - endorsement failed - Error: failed to execute transaction a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9: error sending: txid: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9(mychannel) exists
Failed to submit transaction: Error: Endorsement has failed
peer0.org1.com container logs after node invoke
2019-07-09 09:22:03.273 UTC [endorser] callChaincode -> INFO 15480 [mychannel][a0a2570d] Entry chaincode: name:"fabcar"
2019-07-09 09:22:03.273 UTC [chaincode] Execute -> DEBU 15481 Entry
2019-07-09 09:22:03.273 UTC [chaincode] Execute -> DEBU 15482 Exit
2019-07-09 09:22:03.273 UTC [endorser] callChaincode -> INFO 15483 [mychannel][a0a2570d] Exit chaincode: name:"fabcar" (0ms)
2019-07-09 09:22:03.273 UTC [chaincode] handleMessage -> DEBU 15484 [a0a2570d] Fabric side handling ChaincodeMessage of type: PUT_STATE in state ready
2019-07-09 09:22:03.273 UTC [endorser] SimulateProposal -> ERRO 15485 [mychannel][a0a2570d] failed to invoke chaincode name:"fabcar" , error: txid: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9(mychannel) exists
github.com/hyperledger/fabric/core/chaincode.(*TransactionContexts).Create
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/transaction_contexts.go:59
github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1207
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:313
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:302
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:239
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:147
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:146
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor
/opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor-fm
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:224
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
error sending
failed to execute transaction a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9
github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:245
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:240
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:147
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:146
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor
/opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54
github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor-fm
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:224
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30
github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:1333
2019-07-09 09:22:03.273 UTC [endorser] SimulateProposal -> DEBU 15486 [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.273 UTC [lockbasedtxmgr] Done -> DEBU 15487 Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.273 UTC [endorser] func1 -> DEBU 15488 Exit: request from 172.18.0.1:51702
2019-07-09 09:22:03.273 UTC [chaincode] HandleTransaction -> DEBU 15489 [a0a2570d] handling PUT_STATE from chaincode
2019-07-09 09:22:03.273 UTC [comm.grpc.server] 1 -> INFO 1548a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:51702 grpc.code=OK grpc.call_duration=4.573006ms
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548b [a0a2570d] Completed PUT_STATE. Sending RESPONSE
2019-07-09 09:22:03.274 UTC [chaincode] handleMessage -> DEBU 1548c [a0a2570d] Fabric side handling ChaincodeMessage of type: PUT_STATE in state ready
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548d [a0a2570d] handling PUT_STATE from chaincode
2019-07-09 09:22:03.274 UTC [chaincode] HandleTransaction -> DEBU 1548e [a0a2570d] Completed PUT_STATE. Sending RESPONSE
2019-07-09 09:22:03.275 UTC [chaincode] handleMessage -> DEBU 1548f [a0a2570d] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready
2019-07-09 09:22:03.275 UTC [chaincode] Notify -> DEBU 15490 [a0a2570d] notifying Txid:a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, channelID:mychannel
2019-07-09 09:22:03.275 UTC [chaincode] Execute -> DEBU 15491 Exit
2019-07-09 09:22:03.275 UTC [endorser] callChaincode -> INFO 15492 [mychannel][a0a2570d] Exit chaincode: name:"fabcar" (3ms)
2019-07-09 09:22:03.275 UTC [lockbasedtxmgr] GetTxSimulationResults -> DEBU 15493 Simulation completed, getting simulation results
2019-07-09 09:22:03.275 UTC [lockbasedtxmgr] Done -> DEBU 15494 Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.275 UTC [endorser] SimulateProposal -> DEBU 15495 [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.275 UTC [endorser] endorseProposal -> DEBU 15496 [mychannel][a0a2570d] Entry chaincode: name:"fabcar"
2019-07-09 09:22:03.275 UTC [endorser] endorseProposal -> DEBU 15497 [mychannel][a0a2570d] escc for chaincode name:"fabcar" is escc
2019-07-09 09:22:03.275 UTC [endorser] EndorseWithPlugin -> DEBU 15498 Entering endorsement for {plugin: escc, channel: mychannel, tx: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, chaincode: fabcar}
2019-07-09 09:22:03.275 UTC [msp.identity] Sign -> DEBU 15499 Sign: plaintext: 0A20828C242C3048295EE0453AD5EA85...455254494649434154452D2D2D2D2D0A
2019-07-09 09:22:03.275 UTC [msp.identity] Sign -> DEBU 1549a Sign: digest: F3BEDFED5C78408FD01F0A41C0714245508FD2F5AEF8A34F33E7F3C61DEFF987
2019-07-09 09:22:03.275 UTC [endorser] EndorseWithPlugin -> DEBU 1549b Exiting {plugin: escc, channel: mychannel, tx: a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9, chaincode: fabcar}
2019-07-09 09:22:03.276 UTC [endorser] endorseProposal -> DEBU 1549c [mychannel][a0a2570d] Exit
2019-07-09 09:22:03.276 UTC [lockbasedtxmgr] Done -> DEBU 1549d Done with transaction simulation / query execution [a0a2570dd9a4ce0c696ab08263320927382c6f3db046843dca70a96b63a97da9]
2019-07-09 09:22:03.276 UTC [endorser] func1 -> DEBU 1549e Exit: request from 172.18.0.1:51702
2019-07-09 09:22:03.276 UTC [comm.grpc.server] 1 -> INFO 1549f unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.18.0.1:51702 grpc.code=OK grpc.call_duration=6.750666ms
I tried some solutions found on SO such as:
having anchor peers set for each org: was already done
setting CORE_PEER_LISTENADDRESS=org1.example.com:7051 -> failed the peer containers. If I set the address to 0.0.0.0:7051 the containers starts again but the error stays the same
restarting Docker / removing volumes / redownloading images: didn't change a thing
Further points:
The orderer doesn't seem to be notified, as we can see in its logs.
When I use node invoke.js I sometimes get this error, which disappears when I launch the command again. Peer logs don't show an error.
node invoke.js inconsistent error
2019-07-09T14:13:21.232Z - error: [AbstractStrategy]: constructor: No event hubs for strategy
Failed to submit transaction: Error: No event hubs for strategy
When I query using node, I'll sometimes get the following error:
node query.js inconsistent error
2019-07-09T13:23:13.602Z - error: [SingleQueryHandler]: evaluate: message=No peers available to query. Errors: [], stack=FabricError: No peers available to query. Errors: []
at SingleQueryHandler.evaluate (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:39:17)
at Transaction.evaluate (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/transaction.js:246:29)
at Contract.evaluateTransaction (/home/path_to_dir/app/javascript/node_modules/fabric-network/lib/contract.js:172:39)
at main (/home/path_to_dir/app/javascript/query.js:47:39)
at <anonymous>, name=FabricError
Failed to evaluate transaction: FabricError: No peers available to query. Errors: []
This error usually disappears when I start a query again but will pop off from time to time. When the query comes from the CLIorg1 it never happens.
Some probably useful files:
configtx.yaml
crypto-config.yaml
docker-compose-org1.yaml
docker-compose-org2.yaml
EDIT: added insert.js file and logs after trying to node insert.js (see comments)
Configuration information
HLF 1.4.1 ; Docker 18.09.7 ; docker-compose 1.23.2 ; node v8.16.0 ; npm 6.4.1 ; Ubuntu 18.04.2 LTS
Apologies for the multitude of errors which makes the question broad, but I assume they are somehow all connected to an endorsement issue. If not, do not hesitate to edit / ping me to narrow it down.