当我跑
时composer network start -c PeerAdmin@hlfv1 -a test-network.bna -A admin -S adminpw
花了很长时间才得到超时错误
Error: Error trying to instantiate composer runtime. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
docker ps
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
84daf56fde06 hyperledger/fabric-peer:x86_64-1.1.0-rc1 "peer node start" 12 minutes ago Up 12 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
a6835cf4ed34 hyperledger/fabric-orderer:x86_64-1.1.0-rc1 "orderer" 12 minutes ago Up 12 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
3ab21e84dc6e hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-ent…" 12 minutes ago Up 12 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
64acf6dc5db7 hyperledger/fabric-ca:x86_64-1.1.0-rc1 "sh -c 'fabric-ca-se…" 12 minutes ago Up 12 minutes 0.0.0.0:7054->7054/tcp ca.org1.example.com
$ docker logs peer0.org1.example.com
2018-03-15 03:02:51.419 UTC [endorser] simulateProposal -> ERRO 4bf [composerchannel][9b4c096b] failed to invoke chaincode name:"lscc" ,
error: timeout expired while starting chaincode test-network:0.18.1(networkid:dev,peerid:peer0.org1.example.com,tx:9b4c096bcffd303acdafbc46ca17a2d69c33de917ccc0d47965b43dd67484960)
答案 0 :(得分:1)
composer network start命令正在创建一个新的docker容器并在该容器中使用npm install,因此您的超时可能是系统创建容器的速度慢和/或npm install命令性能降低的结果。
默认超时为300秒,但您可以使用环境变量public class User {
@OneToMany(mappedBy = "sender")
private List<Request> senderOf;
@OneToMany(mappedBy = "receiver")
private List<Request> receiverOf;
}
如果查看用于启动Fabric的docker-compose yaml文件(特别是Peer),则可以为此环境变量添加一行。
如果您使用的是默认的Dev Fabric,那么您要查找的文件可能是:CORE_CHAINCODE_EXECUTETIMEOUT=800s