我的基本网络中正在运行以下容器:
dev-peer0.org1.example.com-traceability-1.0
cli
peer0.org1.example.com
couchdb
ca.example.com
orderer.example.com
所以现在我想再向org1添加一个对等体,以便在org1下有2个对等体。 我在crypto-config.yaml内的计数器中添加了1个对等方,然后执行此操作:
../bin/cryptogen extend --config=./crypto-config.yaml
docker-compose -f docker-compose-new-peer.yaml up -d
在docker-compose-new-peer中,我有2个服务,即新的对等方和新的Sofadb。
我从docker ps获得的是,现在我有2个新容器与之前的容器一起正确运行:
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
但是现在,我必须让peer1加入peer0所在的频道,并且这样做了:
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
但是我在日志末尾获得的广告是:
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>)
有人知道如何解决吗?
已添加订购者日志:
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]
IP被xxx.xx.x.x隐藏
答案 0 :(得分:1)
尝试使用cli容器加入通道,并将peer1的环境变量导出到cli:
Algorithm2 DistributionCounting(A[0..n – 1], L, U)
// Input: Array A[0..n – 1] of numbers between L and U (with L ≤ U)
// Output: Array S[0..n – 1] of A’s numbers sorted in non-decreasing
order
for j ← 0 to U – L do D[j] ← 0
for i ← 0 to n – 1 do D[A[i] – L] ← D[A[i] – L] + 1
for j ← 1 to U – L do D[j] ← D[j – 1] + D[j]
for i ← n – 1 downto 0 do
j ← A[i] – L
S[D[j] – 1] ← A[i]
D[j] ← D[j] – 1
return S
然后运行:
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
希望这会起作用