On a peer init ( that was working before) I get this error:
2022-03-28 11:30:22.423 UTC [nodeCmd] serve -> INFO 015 Deployed system chaincodes
2022-03-28 11:30:22.423 UTC [peer] Initialize -> INFO 016 Loading chain mychannel
2022-03-28 11:30:22.423 UTC [ledgermgmt] OpenLedger -> INFO 017 Opening ledger with id = mychannel
2022-03-28 11:30:22.561 UTC [kvledger] recommitLostBlocks -> INFO 018 Recommitting lost blocks - firstBlockNum=151932, lastBlockNum=151932, recoverables=[]kvledger.recoverable{(*txmgr.LockBasedTxMgr)(0xc0007ac280), (*history.DB)(0xc0007019e0)}
2022-03-28 11:30:24.191 UTC [statecouchdb] commitUpdates -> WARN 019 CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f504846af00263781f48445288001003000000000000000001673753
2022-03-28 11:30:24.201 UTC [statecouchdb] commitUpdates -> WARN 01a CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f532d450700269506cf8445288001003000000000000000001674145
2022-03-28 11:30:24.213 UTC [statecouchdb] commitUpdates -> WARN 01b CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f4e3bfafd00269df9368445288001003000000000000000001673586
2022-03-28 11:30:24.218 UTC [statecouchdb] commitUpdates -> WARN 01c CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f4a4b49c90026d42acd8445288001003000000000000000001673194
2022-03-28 11:30:24.224 UTC [statecouchdb] commitUpdates -> WARN 01d CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f528876a0002650ab448445288001003000000000000000001673975
2022-03-28 11:30:24.230 UTC [statecouchdb] commitUpdates -> WARN 01e CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f54c1c7d3002637c8f68445288001003000000000000000001674174
2022-03-28 11:30:24.239 UTC [statecouchdb] commitUpdates -> WARN 01f CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f4c8876a0002650ab1c8445288001003000000000000000001673464
2022-03-28 11:30:24.255 UTC [statecouchdb] commitUpdates -> WARN 020 CouchDB batch document delete encountered an problem. Retrying delete for document ID:balance621e8f4c4b49c90026d42ad18445288001003000000000000000001673419
2022-03-28 11:30:24.741 UTC [peer] Initialize -> ERRO 021 Failed to load ledger mychannel (error handling CouchDB request. Error:document_too_large, Status Code:413, Reason:lot621f3016cec5a038d5b7cdf7
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*couchInstance).handleRequest
And there is no way for any peer to join again to that channel.
Versions are:
couchdb:3.1.1
Fabric peer and orderers: 2.2
Legder capabilities: Channel 1.3 , Orderer 1.1 Aplication 1.3
I have tried to restart the peer, and even to delete the document that gives error in all the couchdb, but when restarting the peer again it continues giving the same error.
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 having a strange problem with adding an orderer.Modify system-channel config,commit transaction successfully(called Mode 1).However, the warning log appears when the orderer is started.
The running orderer logs are as follows:
orderer1-Bank | 2021-01-25 09:22:07.942 UTC [common.deliver] deliverBlocks -> WARN 086 [channel: system-channel] Client 192.168.1.112:49642 is not authorized: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
The new orderer logs are as follows:
2021-01-25 09:22:07.935 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> WARN 00d Received status:FORBIDDEN from orderer1-ProCoop:7050: forbidden pulling the channel channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:07.935 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> WARN 00e Received status:FORBIDDEN from orderer1-Bank:7050: forbidden pulling the channel channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:07.935 UTC [orderer.common.cluster.replication] func1 -> WARN 00f Received error of type 'forbidden pulling the channel' from {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-Bank:7050"} channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:07.936 UTC [orderer.common.cluster.replication] func1 -> WARN 010 Received error of type 'forbidden pulling the channel' from {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-ProCoop:7050"} channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:14.924 UTC [orderer.common.cluster.replication] probeEndpoint -> WARN 011 Failed connecting to {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-CBRC:7050"}: failed to create new connection: context deadline exceeded channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:14.924 UTC [orderer.common.cluster.replication] func1 -> WARN 012 Received error of type 'failed to create new connection: context deadline exceeded' from {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-CBRC:7050"} channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:14.925 UTC [orderer.common.cluster.replication] connectToSomeEndpoint -> WARN 013 Could not connect to any endpoint of [{"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-CBRC:7050"} {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-ProCoop:7050"} {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-Bank:7050"}] channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:19.938 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> WARN 014 Received status:FORBIDDEN from orderer1-Bank:7050: forbidden pulling the channel channel=system-channel
orderer1-CBRC | 2021-01-25 09:22:19.939 UTC [orderer.common.cluster.replication] func1 -> WARN 015 Received error of type 'forbidden pulling the channel' from {"CAs":[{"Expired":false,"Issuer":"self","Subject":"CN=ca-tls,OU=Fabric,O=Hyperledger,ST=North Carolina,C=US"}],"Endpoint":"orderer1-Bank:7050"} channel=system-channel
If I set the same three orderers (same MSP files) as above when initializing the creation block(called Mode 2).the orderer will start normally.I have compared the most recent config block after the successful modification in mode 1 with the config block in mode 2, and they are identical except for the last_update property.
Adding an orderer takes a lot of steps. I have written one article on the same you can follow this guide
Edit1: steps you need to follow
Create crypto-material for the new ordered.
then you have to Add TLS to System Channel
Fetch the Latest Configuration Block
Bring the new orderer container up.
Adding new Orderers End Point to System Channel
Add TLS to Application Channel
Adding new Orderer Endpoint to Application Channel
That's all you have to do.
I have made 2 instances by following a tutorial here. One is made in azure and one is made at AWS. I have successfully bridge the connection on the docker instance. When I tried to
composer network install --card PeerAdmin#hlfv1 --archiveFile stock-inquiry#0.0.1.bna
at amazon side, I get
composer network install --card PeerAdmin#hlfv1 --archiveFile stock-inquiry#0.0.1.bna
✖ Installing business network. This may take a minute...
Error: Error trying install business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: Failed to connect before the deadline
Command failed
In azure side it works perfectly.
the logs at docker become like this
2018-12-18 07:48:53.536 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.1.0
Go version: go1.9.2
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.6
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2018-12-18 07:48:53.537 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2018-12-18 07:48:53.538 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2018-12-18 07:48:53.702 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:53.828 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:54.079 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:54.580 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:55.581 UTC [couchdb] handleRequest -> WARN 008 Retrying couchdb request in 2s. Attempt:5 Error:Get http://couchdb:5984/: dial tcp 192.168.16.3:5984: getsockopt: connection refused
2018-12-18 07:48:57.680 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 009 Created state database _users
2018-12-18 07:48:57.711 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a Created state database _replicator
2018-12-18 07:48:57.733 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00b Created state database _global_changes
2018-12-18 07:48:57.741 UTC [kvledger] NewProvider -> INFO 00c ledger provider Initialized
2018-12-18 07:48:57.741 UTC [ledgermgmt] initialize -> INFO 00d ledger mgmt initialized
2018-12-18 07:48:57.741 UTC [peer] func1 -> INFO 00e Auto-detected peer address: 192.168.16.5:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 00f Returning peer0.org1.stock.com:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 010 Auto-detected peer address: 192.168.16.5:7051
2018-12-18 07:48:57.751 UTC [peer] func1 -> INFO 011 Returning peer0.org1.stock.com:7051
2018-12-18 07:48:57.760 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer0.org1.stock.com
2018-12-18 07:48:57.760 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer0.org1.stock.com:7052
2018-12-18 07:48:57.761 UTC [nodeCmd] createChaincodeServer -> WARN 014 peer.chaincodeListenAddress is not set, using peer0.org1.stock.com:7052
2018-12-18 07:48:57.761 UTC [eventhub_producer] start -> INFO 015 Event processor started
2018-12-18 07:48:57.762 UTC [chaincode] NewChaincodeSupport -> INFO 016 Chaincode support using peerAddress: peer0.org1.stock.com:7052
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 017 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 018 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2018-12-18 07:48:57.763 UTC [sccapi] registerSysCC -> INFO 019 system chaincode escc(github.com/hyperledger/fabric/core/scc/escc) registered
2018-12-18 07:48:57.764 UTC [sccapi] registerSysCC -> INFO 01a system chaincode vscc(github.com/hyperledger/fabric/core/scc/vscc) registered
2018-12-18 07:48:57.764 UTC [sccapi] registerSysCC -> INFO 01b system chaincode qscc(github.com/hyperledger/fabric/core/chaincode/qscc) registered
2018-12-18 07:48:57.765 UTC [gossip/service] func1 -> INFO 01c Initialize gossip with endpoint peer0.org1.stock.com:7051 and bootstrap set [127.0.0.1:7051]
2018-12-18 07:48:57.770 UTC [msp] DeserializeIdentity -> INFO 01d Obtaining identity
2018-12-18 07:48:57.773 UTC [gossip/discovery] NewDiscoveryService -> INFO 01e Started { [] [31 57 68 255 217 178 128 85 97 68 93 103 174 51 205 204 50 251 97 123 28 137 101 87 238 45 170 108 159 105 199 220] peer0.org1.stock.com:7051 <nil>} incTime is 1545119337773428448
2018-12-18 07:48:57.773 UTC [gossip/gossip] NewGossipService -> INFO 01f Creating gossip service with self membership of { [] [31 57 68 255 217 178 128 85 97 68 93 103 174 51 205 204 50 251 97 123 28 137 101 87 238 45 170 108 159 105 199 220] peer0.org1.stock.com:7051 <nil>}
2018-12-18 07:48:57.775 UTC [gossip/gossip] NewGossipService -> WARN 020 External endpoint is empty, peer will not be accessible outside of its organization
2018-12-18 07:48:57.778 UTC [gossip/gossip] start -> INFO 021 Gossip instance peer0.org1.stock.com:7051 started
2018-12-18 07:48:57.782 UTC [cscc] Init -> INFO 022 Init CSCC
2018-12-18 07:48:57.782 UTC [sccapi] deploySysCC -> INFO 023 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-18 07:48:57.783 UTC [sccapi] deploySysCC -> INFO 024 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-18 07:48:57.783 UTC [escc] Init -> INFO 025 Successfully initialized ESCC
2018-12-18 07:48:57.783 UTC [sccapi] deploySysCC -> INFO 026 system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-12-18 07:48:57.784 UTC [sccapi] deploySysCC -> INFO 027 system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-12-18 07:48:57.784 UTC [qscc] Init -> INFO 028 Init QSCC
2018-12-18 07:48:57.784 UTC [sccapi] deploySysCC -> INFO 029 system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-12-18 07:48:57.784 UTC [nodeCmd] initSysCCs -> INFO 02a Deployed system chaincodes
2018-12-18 07:48:57.785 UTC [nodeCmd] serve -> INFO 02b Starting peer with ID=[name:"peer0.org1.stock.com" ], network ID=[dev], address=[peer0.org1.stock.com:7051]
2018-12-18 07:48:57.786 UTC [nodeCmd] serve -> INFO 02c Started peer with ID=[name:"peer0.org1.stock.com" ], network ID=[dev], address=[peer0.org1.stock.com:7051]
2018-12-18 07:49:04.193 UTC [ledgermgmt] CreateLedger -> INFO 02d Creating ledger [mychannel] with genesis block
2018-12-18 07:49:04.195 UTC [fsblkstorage] newBlockfileMgr -> INFO 02e Getting block information from block storage
2018-12-18 07:49:04.237 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 02f Created state database mychannel_
2018-12-18 07:49:04.278 UTC [kvledger] CommitWithPvtData -> INFO 030 Channel [mychannel]: Committed block [0] with 1 transaction(s)
2018-12-18 07:49:04.334 UTC [ledgermgmt] CreateLedger -> INFO 031 Created ledger [mychannel] with genesis block
2018-12-18 07:49:04.373 UTC [cscc] Init -> INFO 032 Init CSCC
2018-12-18 07:49:04.373 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 034 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-18 07:49:04.374 UTC [escc] Init -> INFO 035 Successfully initialized ESCC
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 036 system chaincode escc/mychannel(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-12-18 07:49:04.374 UTC [sccapi] deploySysCC -> INFO 037 system chaincode vscc/mychannel(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-12-18 07:49:04.374 UTC [qscc] Init -> INFO 038 Init QSCC
2018-12-18 07:49:04.375 UTC [sccapi] deploySysCC -> INFO 039 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-12-18 07:59:56.451 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 03a Created state database mychannel_lscc
2018-12-18 07:59:56.457 UTC [lscc] executeInstall -> INFO 03b Installed Chaincode [stock-inquiry] Version [0.0.1] to peer
2018-12-18 08:01:31.970 UTC [endorser] ProcessProposal -> ERRO 03c [mychannel][d8bef524] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: d8bef524455b7411da3b169efdf232bf50b8f17a7a7ddb3b4acd25ee413e8ae7
2018-12-18 08:02:45.646 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 03d Created state database mychannel_stock-inquiry
2018-12-18 08:02:45.657 UTC [cceventmgmt] HandleStateUpdates -> INFO 03e Channel [mychannel]: Handling LSCC state update for chaincode [stock-inquiry]
2018-12-18 08:02:45.682 UTC [couchdb] CreateIndex -> INFO 03f Created CouchDB index [selectCommoditiesByOwner] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesByOwnerDoc]
2018-12-18 08:02:45.685 UTC [couchdb] CreateIndex -> INFO 040 Created CouchDB index [selectCommoditiesByProductName] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesByProductNameDoc]
2018-12-18 08:02:45.687 UTC [couchdb] CreateIndex -> INFO 041 Created CouchDB index [selectCommodities] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesDoc]
2018-12-18 08:02:45.690 UTC [couchdb] CreateIndex -> INFO 042 Created CouchDB index [selectCommoditiesWithHighQuantity] in state database [mychannel_stock-inquiry] using design document [_design/selectCommoditiesWithHighQuantityDoc]
2018-12-18 08:02:45.722 UTC [kvledger] CommitWithPvtData -> INFO 043 Channel [mychannel]: Committed block [1] with 1 transaction(s)
2018-12-18 08:02:45.763 UTC [common/deliver] deliverBlocks -> WARN 044 [channel: mychannel] Error sending to 40.74.88.202:38350: rpc error: code = Unknown desc = the stream has been done
Then I continue to develop at azure side hoping to import the business card from azure side to amazon side, maybe then it will work perfectly. So I start creating a new business card and send it to amazon side. after I import the card and try to ping the business card, It gives me this message
Error: Error trying login and get user Context. Error: Error trying to enroll user. Error: Calling enrollment endpoint failed with error [Error: connect ETIMEDOUT 52.193.188.33:7054]
Command failed
They cannot ping each other because I haven't enabled ICMP at azure side. I have opened the ports so they can communicate each other.
inbound port settings for amazon side looks like this. Azure side looks almost the same, just differs at 7000 to 7100 become 8000 to 8100.
What should I do to install the business card? I am sure that the port is opened for each other to see.
Edit 1:
docker exec log at the start for azure side
# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer0.org1.stock.com peer channel create -o orderer.stock.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
2018-12-19 00:41:47.014 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:41:47.079 UTC [main] main -> INFO 002 Exiting.....
# Join peer0.org1.stock.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer0.org1.stock.com peer channel join -b mychannel.block
2018-12-19 00:41:47.352 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:41:47.562 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
2018-12-19 00:41:47.562 UTC [main] main -> INFO 003 Exiting.....
docker exec log at amazon side
# Create the channel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer1.org1.stock.com peer channel fetch config -o orderer.stock.com:7050 -c mychannel
2018-12-19 00:42:11.228 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:42:11.254 UTC [cli.common] readBlock -> INFO 002 Received block: 0
2018-12-19 00:42:11.269 UTC [cli.common] readBlock -> INFO 003 Received block: 0
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin#org1.stock.com/msp" peer1.org1.stock.com peer channel join -b mychannel_config.block
2018-12-19 00:42:11.531 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-12-19 00:42:11.748 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
edit 3: if I want to install bna file at amazon side, it cannot be done.
it will give me this error
✖ Installing business network. This may take a minute...
Error: Error trying install business network. Error: The business network failed to install on 1 or more peers: Response from attempted peer comms was an error: Error: Failed to connect before the deadline
Command failed
On the other hand, if I install on azure side., I get error LSCC at azure side, but it will gives me a succeed message
2018-12-27 05:16:46.972 UTC [nodeCmd] serve -> INFO 001 Starting peer:
Version: 1.2.0
Commit SHA: cae2ad4
Go version: go1.10
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.10
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2018-12-27 05:16:46.972 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2018-12-27 05:16:46.972 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2018-12-27 05:16:47.114 UTC [couchdb] handleRequest -> WARN 004 Retrying couchdb request in 125ms. Attempt:1 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.241 UTC [couchdb] handleRequest -> WARN 005 Retrying couchdb request in 250ms. Attempt:2 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.492 UTC [couchdb] handleRequest -> WARN 006 Retrying couchdb request in 500ms. Attempt:3 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:47.994 UTC [couchdb] handleRequest -> WARN 007 Retrying couchdb request in 1s. Attempt:4 Error:Get http://couchdb1:5984/: dial tcp 172.25.0.2:5984: connect: connection refused
2018-12-27 05:16:49.163 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 008 Created state database _users
2018-12-27 05:16:49.203 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 009 Created state database _replicator
2018-12-27 05:16:49.269 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 00a Created state database _global_changes
2018-12-27 05:16:49.344 UTC [kvledger] NewProvider -> INFO 00b ledger provider Initialized
2018-12-27 05:16:49.344 UTC [ledgermgmt] initialize -> INFO 00c ledger mgmt initialized
2018-12-27 05:16:49.344 UTC [peer] func1 -> INFO 00d Auto-detected peer address: 172.25.0.3:7051
2018-12-27 05:16:49.344 UTC [peer] func1 -> INFO 00e Returning peer1.org1.example.com:7051
2018-12-27 05:16:49.345 UTC [peer] func1 -> INFO 00f Auto-detected peer address: 172.25.0.3:7051
2018-12-27 05:16:49.345 UTC [peer] func1 -> INFO 010 Returning peer1.org1.example.com:7051
2018-12-27 05:16:49.346 UTC [eventhub_producer] start -> INFO 011 Event processor started
2018-12-27 05:16:49.347 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 012 Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2018-12-27 05:16:49.347 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 013 Exit with ccEndpoint: peer1.org1.example.com:7052
2018-12-27 05:16:49.348 UTC [nodeCmd] createChaincodeServer -> WARN 014 peer.chaincodeListenAddress is not set, using peer1.org1.example.com:7052
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 015 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 016 system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2018-12-27 05:16:49.349 UTC [sccapi] registerSysCC -> INFO 017 system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2018-12-27 05:16:49.354 UTC [gossip/gossip] NewGossipService -> INFO 018 Creating gossip service with self membership of { [] [211 55 188 245 219 253 179 85 254 143 15 136 54 239 192 58 60 153 254 80 243 208 48 137 183 237 162 71 84 184 182 206] peer1.org1.example.com:7051 <nil> <nil>}
2018-12-27 05:16:49.355 UTC [gossip/gossip] NewGossipService -> WARN 019 External endpoint is empty, peer will not be accessible outside of its organization
2018-12-27 05:16:49.355 UTC [gossip/gossip] start -> INFO 01a Gossip instance peer1.org1.example.com:7051 started
2018-12-27 05:16:49.356 UTC [cscc] Init -> INFO 01b Init CSCC
2018-12-27 05:16:49.356 UTC [sccapi] deploySysCC -> INFO 01c system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-27 05:16:49.357 UTC [sccapi] deploySysCC -> INFO 01d system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-27 05:16:49.357 UTC [qscc] Init -> INFO 01e Init QSCC
2018-12-27 05:16:49.357 UTC [sccapi] deploySysCC -> INFO 01f system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2018-12-27 05:16:49.357 UTC [nodeCmd] serve -> INFO 020 Deployed system chaincodes
2018-12-27 05:16:49.358 UTC [discovery] NewService -> INFO 021 Created with config TLS: false, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2018-12-27 05:16:49.358 UTC [nodeCmd] registerDiscoveryService -> INFO 022 Discovery service activated
2018-12-27 05:16:49.358 UTC [nodeCmd] serve -> INFO 023 Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2018-12-27 05:16:49.359 UTC [nodeCmd] serve -> INFO 024 Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2018-12-27 05:16:57.465 UTC [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [mychannel] with genesis block
2018-12-27 05:16:57.478 UTC [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
2018-12-27 05:16:57.533 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 027 Created state database mychannel_
2018-12-27 05:16:57.564 UTC [kvledger] CommitWithPvtData -> INFO 028 Channel [mychannel]: Committed block [0] with 1 transaction(s)
2018-12-27 05:16:57.564 UTC [pvtdatastorage] func1 -> INFO 029 Purger started: Purging expired private data till block number [0]
2018-12-27 05:16:57.565 UTC [pvtdatastorage] func1 -> INFO 02a Purger finished
2018-12-27 05:16:57.615 UTC [ledgermgmt] CreateLedger -> INFO 02b Created ledger [mychannel] with genesis block
2018-12-27 05:16:57.654 UTC [cscc] Init -> INFO 02c Init CSCC
2018-12-27 05:16:57.654 UTC [sccapi] deploySysCC -> INFO 02d system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-12-27 05:16:57.654 UTC [sccapi] deploySysCC -> INFO 02e system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-12-27 05:16:57.655 UTC [qscc] Init -> INFO 02f Init QSCC
2018-12-27 05:16:57.655 UTC [sccapi] deploySysCC -> INFO 030 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2018-12-27 05:17:03.656 UTC [gossip/election] beLeader -> INFO 031 [211 55 188 245 219 253 179 85 254 143 15 136 54 239 192 58 60 153 254 80 243 208 48 137 183 237 162 71 84 184 182 206] : Becoming a leader
2018-12-27 05:18:54.408 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 032 Created state database mychannel_lscc
2018-12-27 05:18:54.413 UTC [lscc] executeInstall -> INFO 033 Installed Chaincode [stock-inquiry] Version [0.0.2] to peer
2018-12-27 05:19:12.469 UTC [endorser] ProcessProposal -> ERRO 034 [][c4b74ceb] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: c4b74cebeae32b1584387b0b12398c880a928723a8d200c205f3c96eff3e9dfc
problem fixed, amazon side cannot see himself. I need to open his own port connection to be seen by himself.
I want to adding an org3 to an lanuched fabric-network based this tutorials:
https://hyperledger-fabric.readthedocs.io/en/release-1.2/channel_update_tutorial.html
but when I execute this command finally
peer channel join -b mychannel.block
it appears this error:
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org3.example.com:7051: failed to create new connection: context deadline exceeded
when I look the logs :
docker logs -f peer0.org1.example.com
it seems right:
2018-10-12 02:18:29.902 UTC [lscc] executeInstall -> INFO 032 Installed Chaincode [mycc] Version [1.0] to peer
2018-10-12 02:18:52.555 UTC [cceventmgmt] HandleStateUpdates -> INFO 033 Channel [mychannel]: Handling LSCC state update for chaincode [mycc]
2018-10-12 02:18:52.571 UTC [kvledger] CommitWithPvtData -> INFO 034 Channel [mychannel]: Committed block [3] with 1 transaction(s)
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 035 building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2018-10-12 02:18:53.785 UTC [golang-platform] GenerateDockerBuild -> INFO 036 building chaincode with tags:
2018-10-12 02:19:17.969 UTC [kvledger] CommitWithPvtData -> INFO 037 Channel [mychannel]: Committed block [4] with 1 transaction(s)
2018-10-12 02:21:56.351 UTC [gossip/gossip] learnAnchorPeers -> INFO 038 Anchor peer with same endpoint, skipping connecting to myself
2018-10-12 02:21:56.404 UTC [kvledger] CommitWithPvtData -> INFO 039 Channel [mychannel]: Committed block [5] with 1 transaction(s)
so I want to ask why appears this question and how can I solve this problm? many thanks.
I have had the same problem with Hyperledger Fabric V1.4. I seems like the problem is with GOLANG. Add this 'GODEBUG=netdns=go' to your environment variables. I hope this helps.
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer:latest
environment:
- GODEBUG=netdns=go
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
There are multiple peer nodes, a single orderer and a single CA authority for production and want to deploy the chaincode. I have the compiled chaincode and the go file in a directory called chaincode-app/
The peer node has a docker instance running with the name peer0-vm. I want to deploy my chaincode using this peer. When I run
docker exec peer0-vm peer chaincode install -n mycc -v 1.0 -p chaincode-app/
I receive the following error:
2018-01-03 05:35:30.577 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-01-03 05:35:30.578 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: Error getting chaincode code chaincode: <go, [env]>: failed with error: "exec: not started"
The peer logs are as follows:
2018-01-02 11:00:29.826 UTC [gossip/gossip] NewGossipService -> WARN 014 External endpoint is empty, peer will not be accessible outside of its organization
2018-01-02 11:00:29.829 UTC [gossip/gossip] start -> INFO 015 Gossip instance 0.0.0.0:7051 started
2018-01-02 11:00:29.830 UTC [cscc] Init -> INFO 016 Init CSCC
2018-01-02 11:00:29.830 UTC [sccapi] deploySysCC -> INFO 017 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2018-01-02 11:00:29.830 UTC [sccapi] deploySysCC -> INFO 018 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2018-01-02 11:00:29.831 UTC [escc] Init -> INFO 019 Successfully initialized ESCC
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01a system chaincode escc/(github.com/hyperledger/fabric/core/scc/escc) deployed
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01b system chaincode vscc/(github.com/hyperledger/fabric/core/scc/vscc) deployed
2018-01-02 11:00:29.831 UTC [qscc] Init -> INFO 01c Init QSCC
2018-01-02 11:00:29.831 UTC [sccapi] deploySysCC -> INFO 01d system chaincode qscc/(github.com/hyperledger/fabric/core/chaincode/qscc) deployed
2018-01-02 11:00:29.832 UTC [nodeCmd] initSysCCs -> INFO 01e Deployed system chaincodess
2018-01-02 11:00:29.832 UTC [nodeCmd] serve -> INFO 01f Starting peer with ID=[name:"fabsmbqxc-peer0.org1.example.com" ], network ID=[dev], address=[0.0.0.0:7051]
2018-01-02 11:00:29.832 UTC [nodeCmd] serve -> INFO 020 Started peer with ID=[name:"fabsmbqxc-peer0.org1.example.com" ], network ID=[dev], address=[0.0.0.0:7051]
2018-01-02 14:06:22.467 UTC [chaincode] notifyDuringStartup -> WARN 021 trying to manually run chaincode when not in devmode ?
2018-01-02 14:06:22.467 UTC [chaincode] HandleMessage -> ERRO 022 []Failed to trigger FSM event REGISTER: transition canceled with error: peer will not accepting external chaincode connection name:"chaincode-app:1.0" (except in dev mode)
2018-01-02 14:06:22.467 UTC [chaincode] processStream -> ERRO 023 []Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"chaincode-app:1.0" (except in dev mode)
On a quick read, I understood that the chaincode cannot be executed by the user and should be instead done by the peer. Can someone point out how I could deploy this chaincode?
I've tried to follow the lifecycle of package -> install -> instantiate -> upgrade and tried to package the chaincode before signing and installing using the command but failed.
docker exec peer0-vm peer chaincode package -n mycc -v 1.0 -p chaincode-app -s -S ccpack.out
Could someone point out where I am going wrong and a possible solution?
The peer node has a docker instance running with the name peer0-vm. I want to deploy my chaincode using this peer.
Running CLI install from the peer container won't work.
If you are using docker to execute CLI you should use containers built from hyperledger/fabric-tools. The e2e_cli samples under fabric/examples/e2e_cli is a good reference for all this. In particular do take a look at how the CLI is constructed in docker-compose-cli.yaml please.
There may be other issues but this would be the first one to fix to make sure install works.