Reputation: 726
I have my basic-network with these containers running:
dev-peer0.org1.example.com-traceability-1.0
cli
peer0.org1.example.com
couchdb
ca.example.com
orderer.example.com
So now I want to add one more peer to org1, so that I have 2 peers under org1. I add 1 peer to the counter inside the crypto-config.yaml and then I do:
../bin/cryptogen extend --config=./crypto-config.yaml
docker-compose -f docker-compose-new-peer.yaml up -d
in the docker-compose-new-peer I have 2 services, which are the new peer and the new couchdb.
What I obtain with docker ps is that I have now the 2 new containers correctly running along with the previous ones:
peer1.org1.example.com
couchdb1
dev-peer0.org1.example.com-traceability-1.0
cli
peer0.org1.example.com
couchdb
ca.example.com
orderer.example.com
But now, I have to let peer1 join the channel in which peer0 is, and to do so, I did:
docker exec -it peer0.org1.example.com bash
export CHANNEL_NAME=mychannel
CORE_PEER_LOCALMSPID="Org1MSP"
CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
peer channel join -b mychannel.block
But what I obtain ad the end of the logs is:
2019-07-16 13:35:34.165 UTC [channelCmd] InitCmdFactory -> INFO 043 Endorser and orderer connections initialized
2019-07-16 13:35:34.165 UTC [msp.identity] Sign -> DEBU 044 Sign: plaintext: 0AC3070A5B08011A0B08A6A5B7E90510...F1113CFB43D31A080A000A000A000A00
2019-07-16 13:35:34.165 UTC [msp.identity] Sign -> DEBU 045 Sign: digest: E23C4D1421CEB7C65F50D6526DBB5AB19D74E4D796CD49330D0EBBF8F22F3F4A
2019-07-16 13:35:34.165 UTC [grpc] HandleSubConnStateChange -> DEBU 046 pickfirstBalancer: HandleSubConnStateChange: 0xc0002dcfd0, TRANSIENT_FAILURE
2019-07-16 13:35:34.165 UTC [grpc] HandleSubConnStateChange -> DEBU 047 pickfirstBalancer: HandleSubConnStateChange: 0xc0002dcfd0, CONNECTING
2019-07-16 13:35:34.165 UTC [grpc] HandleSubConnStateChange -> DEBU 048 pickfirstBalancer: HandleSubConnStateChange: 0xc0002dcfd0, TRANSIENT_FAILURE
Error: proposal failed (err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: <nil>)
Did anyone know how to fix?
Logs for orderer added:
2019-07-18 07:25:18.646 UTC [cauthdsl] func2 -> DEBU 536 0xc000c5b0c0 principal evaluation succeeds for identity 0
2019-07-18 07:25:18.646 UTC [cauthdsl] func1 -> DEBU 537 0xc000c5b0c0 gate 1563434718646468160 evaluation succeeds
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 538 Signature set satisfies policy /Channel/Application/Org1MSP/Writers
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 539 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/Org1MSP/Writers
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 53a Signature set satisfies policy /Channel/Application/Writers
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 53b == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Writers
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 53c Signature set satisfies policy /Channel/Writers
2019-07-18 07:25:18.646 UTC [policies] Evaluate -> DEBU 53d == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers
2019-07-18 07:25:18.646 UTC [orderer.common.broadcast] ProcessMessage -> DEBU 53e [channel: mychannel] Broadcast has successfully enqueued message of type ENDORSER_TRANSACTION from xxx.xx.x.x:39334
2019-07-18 07:25:18.646 UTC [orderer.common.blockcutter] Ordered -> DEBU 53f Enqueuing message into batch
2019-07-18 07:25:18.646 UTC [orderer.consensus.solo] main -> DEBU 540 Just began 500ms batch timer
2019-07-18 07:25:18.651 UTC [orderer.common.broadcast] Handle -> WARN 541 Error reading from xxx.xx.x.x:39334: rpc error: code = Canceled desc = context canceled
2019-07-18 07:25:18.651 UTC [orderer.common.server] func1 -> DEBU 542 Closing Broadcast stream
2019-07-18 07:25:18.665 UTC [grpc] infof -> DEBU 544 transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2019-07-18 07:25:18.665 UTC [comm.grpc.server] 1 -> INFO 543 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=xxx.xx.x.x:39334 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=23.69684ms
2019-07-18 07:25:19.147 UTC [orderer.consensus.solo] main -> DEBU 545 Batch timer expired, creating block
2019-07-18 07:25:19.147 UTC [orderer.commmon.multichannel] addLastConfigSignature -> DEBU 546 [channel: mychannel] About to write block, setting its LAST_CONFIG to 0
2019-07-18 07:25:19.147 UTC [msp] GetDefaultSigningIdentity -> DEBU 547 Obtaining default signing identity
2019-07-18 07:25:19.147 UTC [msp] GetDefaultSigningIdentity -> DEBU 548 Obtaining default signing identity
2019-07-18 07:25:19.147 UTC [msp.identity] Sign -> DEBU 549 Sign: plaintext: 0A000A95060A0A4F7264657265724D53...A446763C55C42E13E2869FB305880095
2019-07-18 07:25:19.147 UTC [msp.identity] Sign -> DEBU 54a Sign: digest: F0C5D28C9B2E9920C64E19BB770D6A36B366E33FDBE14F03A137C203800F5475
2019-07-18 07:25:19.150 UTC [fsblkstorage] indexBlock -> DEBU 54b Indexing block [blockNum=2, blockHash=[]byte{0x56, 0xbf, 0xad, 0x3e, 0x83, 0xb2, 0x22, 0xce, 0x14, 0x1b, 0x33, 0x9c, 0x78, 0xa2, 0x2e, 0x1d, 0xc5, 0xa3, 0x42, 0xb5, 0x37, 0xfb, 0x56, 0xfe, 0x8a, 0x10, 0x97, 0xd6, 0x93, 0x53, 0xf1, 0x52} txOffsets=
txId=d18bf6f113b4b066180c96c67d0fa4fa1ca9a50e855a9435b2f05dde6fa64f37 locPointer=offset=70, bytesLength=2885
]
2019-07-18 07:25:19.151 UTC [fsblkstorage] updateCheckpoint -> DEBU 54c Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[17529], isChainEmpty=[false], lastBlockNumber=[2]
2019-07-18 07:25:19.151 UTC [orderer.commmon.multichannel] commitBlock -> DEBU 54d [channel: mychannel] Wrote block [2]
2019-07-18 07:25:19.152 UTC [fsblkstorage] waitForBlock -> DEBU 54e Came out of wait. maxAvailaBlockNumber=[2]
2019-07-18 07:25:19.152 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 54f Remaining bytes=[3862], Going to peek [8] bytes
2019-07-18 07:25:19.152 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 550 Returning blockbytes - length=[3860], placementInfo={fileNum=[0], startOffset=[13667], bytesOffset=[13669]}
2019-07-18 07:25:19.152 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 551 blockbytes [3860] read from file [0]
2019-07-18 07:25:19.152 UTC [common.deliver] deliverBlocks -> DEBU 552 [channel: mychannel] Delivering block for (0xc000c1e080) for xxx.xx.x.x:37024
2019-07-18 07:25:19.152 UTC [fsblkstorage] waitForBlock -> DEBU 553 Going to wait for newer blocks. maxAvailaBlockNumber=[2], waitForBlockNum=[3]
The IP is hidden with xxx.xx.x.x
Upvotes: 0
Views: 432
Reputation: 867
Try joining the channel using cli container and export the environment variables of peer1 to the cli:
docker exec -it cli bash
export CHANNEL_NAME=mychannel
CORE_PEER_LOCALMSPID="Org1MSP"
CORE_PEER_MSPCONFIGPATH= [MSP-CONIFG-PATH-PEER1]
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
and then run:
peer channel join -b mychannel.block
Hope this will work
Upvotes: 1