尝试从HyperLedger tutorials开始使用入门指南。这是非常基本的。启动网络是第一步。甚至第一步都不起作用。
已查看脚本“ startFabric.sh”。一切顺利,直到“ 链码实例化”。
2019-02-15 00:09:29.629 UTC [chaincodeCmd] checkChaincodeCmdParams ->
INFO 001 Using default escc
2019-02-15 00:09:29.629 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode fabcar:1.0 for transaction
该教程对任何人都有用吗?
脚本运行的完整日志。
$./startFabric.sh javascript
# don't rewrite paths for Windows Git Bash users
export MSYS_NO_PATHCONV=1
docker-compose -f docker-compose.yml down
Stopping cli ... done
Stopping peer0.org1.example.com ... done
Stopping orderer.example.com ... done
Stopping couchdb ... done
Stopping ca.example.com ... done
Removing cli ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com ... done
Removing couchdb ... done
Removing ca.example.com ... done
Removing network net_basic
docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb
Creating network "net_basic" with the default driver
Creating ca.example.com ... done
Creating orderer.example.com ... done
Creating couchdb ... done
Creating peer0.org1.example.com ... done
# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
export FABRIC_START_TIMEOUT=10
#echo ${FABRIC_START_TIMEOUT}
sleep ${FABRIC_START_TIMEOUT}
# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
2019-02-15 00:09:27.149 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-02-15 00:09:27.186 UTC [cli/common] readBlock -> INFO 002 Received block: 0
# Join peer0.org1.example.com to the channel.
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b mychannel.block
2019-02-15 00:09:27.455 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-02-15 00:09:27.606 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
Creating cli ... done
chaincode install
2019-02-15 00:09:29.307 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-02-15 00:09:29.307 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-02-15 00:09:29.354 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
chaincode instantiation
2019-02-15 00:09:29.629 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-02-15 00:09:29.629 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode fabcar:1.0 for transaction
从订购者处登录
2019-02-15 23:33:44.195 UTC [orderer/common/broadcast] Handle -> WARN 010 Error reading from 172.30.0.6:59028: rpc error: code = Canceled desc = context canceled
2019-02-15 23:35:31.556 UTC [orderer/common/broadcast] Handle -> WARN 011 Error reading from 172.30.0.6:59034: rpc error: code = Canceled desc = context canceled
答案 0 :(得分:2)
您也可以显示容器的日志吗?我认为您可以尝试在FABRIC_START_TIMEOUT=50
内设置basic-network/start.sh
。如果这不起作用,则需要检查容器的日志。
答案 1 :(得分:1)
停止网络,删除所有容器并重新启动网络。当我在ubuntu 18.04上遇到此问题时,它对我有用。
$ docker stop $(docker ps -a -q)
$ docker ps -qa|xargs docker rm
$ ./startFabric.sh
它也可以在Windows reference
上使用