我遵循http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/的說明。啓動並註冊chaincode時出錯Errorcode_example02
我在Windows上使用Docker Toolbox,我可以成功啓動對等和CA.這裏是日誌的時候,我開始對和CA:
[33mvp0_1 |[0m [36m13:18:52.349 [peer] chatWithSomePeers -> DEBU 04c[0m Starting up the first peer of a new network
[33mvp0_1 |[0m 13:18:52.352 [nodeCmd] serve -> INFO 04d[0m Starting peer with ID=name:"vp0" , network ID=dev, address=172.17.0.3:7051, rootnodes=, validator=true
[33mvp0_1 |[0m [36m13:18:52.358 [consensus/statetransfer] verifyAndRecoverBlockchain -> DEBU 04e[0m Validating existing blockchain, highest validated block is 0, valid through 0
[33mvp0_1 |[0m 13:18:52.359 [consensus/statetransfer] blockThread -> INFO 04f[0m Validated blockchain to the genesis block
[33mvp0_1 |[0m [36m13:18:52.360 [consensus/handler] 1 -> DEBU 050[0m Starting up message thread for consenter
[33mvp0_1 |[0m [36m13:18:52.363 [peer] ensureConnected -> DEBU 051[0m Starting Peer reconnect service (touch service), with period = 6s
[33mvp0_1 |[0m 13:18:52.365 [rest] StartOpenchainRESTServer -> INFO 052[0m Initializing the REST service on 0.0.0.0:7050, TLS is disabled.
但是,當我開始chaincode下面命令
CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02
我得到以下錯誤:
19:30:34.138 [shim] INFO : error with chaincode log level: logger: invalid log level level=
19:30:34.140 [shim] DEBU : Peer address: 0.0.0.0:7052
2016/10/01 19:30:35 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:7052: conne
ctex: The requested address is not valid in its context."; Reconnecting to {"0.0.0.0:7052" <nil>}
2016/10/01 19:30:36 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:7052: conne
ctex: The requested address is not valid in its context."; Reconnecting to {"0.0.0.0:7052" <nil>}
19:30:37.143 [shim] ERRO : Error trying to connect to local peer: grpc: timed out when dialing
Error starting Simple chaincode: Error trying to connect to local peer: grpc: timed out when dialing2016/10/01 19:30:37 grpc: addrConn.resetTransport
failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:7052: connectex: The requested address is not valid in its co
ntext."; Reconnecting to {"0.0.0.0:7052" <nil>}
爲什麼我得到這個錯誤?
請你用'CORE_PEER_ADDRESS = 172.17.0.2嘗試:7051'? –
也可以請你嘗試用'CORE_LOGGING_CHAINCODE'或'--logging-level'重寫日誌級別?可以將它們設置爲這些值中的一個:CRITICAL |錯誤|警告|通知| INFO | DEBUG' –
我嘗試了多個端口,但都沒有工作。我也嘗試用'netstat -atp tcp |檢查所有監聽端口grep -i「listen」',並在CORE_PEER_ADDRESS中使用這些端口,但可悲的是,這也沒有奏效。有沒有其他方式與同伴溝通? –