我有一个Fabric Composer网络,在一个组织中有3个对等方。
问题是,当我执行 SELECT DISTINCT CreationDate,DQ.OpenIssues FROM Issues I
CROSS APPLY
(SELECT COUNT(0) OpenIssues FROM Issues I2
WHERE I2.CreationDate <= I.CreationDate AND
(I.CreationDate < I2.CompletionDate or YEAR(I2.CompletionDate) = 1900)
) DQ
时,我仅看到一个“链式代码容器” dev-peer0.org1,据我所知,每个对等节点都应有dev-peer({{3} })
Extra dev peers in hyperledger fabric
这是我的连接配置文件
docker stats
任何人都知道什么是错的?
答案 0 :(得分:1)
答案 1 :(得分:0)
知道了。问题是我没有更改startFabric.sh
脚本,所以我有3个对等节点正在运行,但它们没有加入频道
startFabric.sh
的外观如下:
...
# Create the channel and join for peer 0
docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b composerchannel.block
# Create the channel and join for peer 1
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer1.org1.example.com peer channel fetch config -o orderer.example.com:7050 -c composerchannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer1.org1.example.com peer channel join -b composerchannel_config.block
# Create the channel and join for peer 2
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer2.org1.example.com peer channel fetch config -o orderer.example.com:7050 -c composerchannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer2.org1.example.com peer channel join -b composerchannel_config.block
if [ "${FABRIC_DEV_MODE}" == "true" ]; then
echo "Fabric Network started in chaincode development mode"
fi
答案 2 :(得分:0)
仅当实例化通道上的链码时才创建容器。仅安装chaincode不会创建容器。
有关此过程的更多详细信息,请参见下面提到的官方文档。(搜索文字“ dev-peer”)。
此文档说明了如何为byfn示例创建每个chaincode容器。
https://github.com/hyperledger/fabric/blob/release-1.4/docs/source/build_network.rst
例如:[for dev-peer0.org2.example.com-mycc-1.0]
- The chaincode is then "instantiated" on ``mychannel``. Instantiation
adds the chaincode to the channel, starts the container for the target peer,
and initializes the key value pairs associated with the chaincode. The initial
values for this example are ["a","100" "b","200"]. **This "instantiation" results
in a container by the name of ``dev-peer0.org2.example.com-mycc-1.0`` starting.**