2017-08-22 62 views
0

我正在嘗試使用鏈式代碼爲開發人員教程「http://hyperledger-fabric.readthedocs.io/en/latest/chaincode4ade.html」部署鏈式代碼。我能夠完成的步驟,直到2號航站樓,但得到一個錯誤命令,在「泊塢窗EXEC - 它CLI慶典」的3號航站樓開發人員CliCode錯誤終端3

輸出1號航站樓:

[]Received message REGISTER from shim peer | 2017-08-22 23:29:26.025 UTC [chaincode] HandleMessage -> DEBU 1a9 []Fabric side Handling ChaincodeMessage of type: REGISTER in state created peer | 2017-08-22 23:29:26.025 UTC [chaincode] beforeRegisterEvent -> DEBU 1aa Received REGISTER in state created peer | 2017-08-22 23:29:26.025 UTC [chaincode] registerHandler -> DEBU 1ab registered handler complete for chaincode mycc:0 peer | 2017-08-22 23:29:26.025 UTC [chaincode] beforeRegisterEvent -> DEBU 1ac Got REGISTER for chaincodeID = name:"mycc:0" , sending back REGISTERED peer | 2017-08-22 23:29:26.025 UTC [chaincode] notifyDuringStartup -> DEBU 1ad nothing to notify (dev mode ?) peer | 2017-08-22 23:29:26.025 UTC [chaincode] notifyDuringStartup -> DEBU 1ae sending READY peer | 2017-08-22 23:29:26.025 UTC [chaincode] processStream -> DEBU 1af []Move state message READY peer | 2017-08-22 23:29:26.025 UTC [chaincode] HandleMessage -> DEBU 1b0 []Fabric side Handling ChaincodeMessage of type: READY in state established peer | 2017-08-22 23:29:26.026 UTC [chaincode] enterReadyState -> DEBU 1b1 []Entered state ready peer | 2017-08-22 23:29:26.026 UTC [chaincode] notify -> DEBU 1b2 notifier Txid: does not exist peer | 2017-08-22 23:29:26.026 UTC [chaincode] processStream -> DEBU 1b3 []sending state message READY

輸出爲2號航站樓:

CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc 2017-08-22 23:29:26.020 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO 2017-08-22 23:29:26.020 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level:) starting up ...

輸出3號航站樓:

docker exec -it cli bash Error response from daemon: Container 37efeab8d4930060c9de46d3bab9ab1ab034781be26b4a5176b80b54d6c1180b is not running

我找不到任何決議FO這個。誰能幫我?我正在使用MacOS X.

我取消註釋yaml文件中的命令行:/ bin/bash -c'./script.sh'「。

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES befcf58f4b59 hyperledger/fabric-ccenv "/bin/bash -c 'sle..." 21 seconds ago Up 20 seconds chaincode 3129dac3e13b hyperledger/fabric-peer "peer node start -..." 21 seconds ago Up 20 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 56a92979e7cb hyperledger/fabric-orderer "orderer" 22 seconds ago Up 21 seconds 0.0.0.0:7050->7050/tcp orderer

爲搬運工PS輸出後終端2:

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES befcf58f4b59 hyperledger/fabric-ccenv "/bin/bash -c 'sle..." 2 minutes ago Up 2 minutes chaincode 3129dac3e13b hyperledger/fabric-peer "peer node start -..." 2 minutes ago Up 2 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer 56a92979e7cb hyperledger/fabric-orderer "orderer" 2 minutes ago Up 2 minutes 0.0.0.0:7050->7050/tcp orderer

CLI錯誤,同時運行.yaml文件:

Returning dummy reject all policy because Admins could not be found in /Application/Admins orderer | 2017-08-23 23:09:50.644 UTC [policies] GetPolicy -> DEBU 154 Returning policy Readers for evaluation orderer | 2017-08-23 23:09:50.644 UTC [policies] GetPolicy -> DEBU 155 Returning dummy reject all policy because Readers could not be found in /Application/Readers orderer | 2017-08-23 23:09:50.644 UTC [policies] GetPolicy -> DEBU 156 Returning policy Writers for evaluation orderer | 2017-08-23 23:09:50.645 UTC [policies] GetPolicy -> DEBU 157 Returning dummy reject all policy because Writers could not be found in /Application/Writers orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 158 Adding to config map: [Groups] /Channel orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 159 Adding to config map: [Groups] /Channel/Application orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 15a Adding to config map: [Groups] /Channel/Application/SampleOrg cli | Error: Got unexpected status: BAD_REQUEST orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 15b Adding to config map: [Values] /Channel/Consortium orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 15c Adding to config map: [Groups] /Channel cli | Usage: cli | peer channel create [flags] cli | cli | Flags: orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 15d Adding to config map: [Groups] /Channel/Application cli | -c, --channelID string In case of a newChain command, the channel ID to create. orderer | 2017-08-23 23:09:50.645 UTC [common/configtx] addToMap -> DEBU 15e Adding to config map: [Groups] /Channel/Application/SampleOrg cli | -f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer orderer | 2017-08-23 23:09:50.646 UTC [common/configtx] addToMap -> DEBU 15f Adding to config map: [Policy] /Channel/Application/Admins cli | -t, --timeout int Channel creation timeout (default 5) cli | cli | Global Flags: cli | --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint cli | --logging-level string Default logging level and overrides, see core.yaml for full syntax cli | -o, --orderer string Ordering service endpoint orderer | 2017-08-23 23:09:50.646 UTC [common/configtx] addToMap -> DEBU 160 Adding to config map: [Policy] /Channel/Application/Writers cli | --test.coverprofile string Done (default "coverage.cov") cli | --tls Use TLS when communicating with the orderer endpoint cli | -v, --version Display current version of fabric peer server cli | orderer | 2017-08-23 23:09:50.646 UTC [common/configtx] addToMap -> DEBU 161 Adding to config map: [Policy] /Channel/Application/Readers orderer | 2017-08-23 23:09:50.646 UTC [common/configtx] addToMap -> DEBU 162 Adding to config map: [Values] /Channel/Consortium orderer | 2017-08-23 23:09:50.646 UTC [orderer/common/broadcast] Handle -> WARN 163 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Writers: mod_policy not set orderer | 2017-08-23 23:09:50.646 UTC [orderer/main] func1 -> DEBU 164 Closing Broadcast stream orderer | 2017-08-23 23:09:50.648 UTC [orderer/common/deliver] Handle -> WARN 165 Error reading from stream: rpc error: code = Canceled desc = context canceled orderer | 2017-08-23 23:09:50.649 UTC [orderer/main] func1 -> DEBU 166 Closing Deliver stream

+0

貌似CLI容器已經因某種原因意外停止。 1)你能確保在你做完碼頭作業之後,所有的容器都可以嗎?即'docker ps'應該顯示容器(包括CLI)的啓動和運行。 –

+0

嗨!我能解決這個問題,但我在調用命令中有錯誤。你能幫助我嗎?我已經用它更新了我的問題。謝謝! –

+0

很高興知道它的解決方案,我會建議你自己在這裏回答你的原始問題,並在選定的答案標記。此外,我建議爲新問題創建一個單獨的問題,這樣所有感興趣的將是能夠看到問題,並且可能會有更快的響應。 –

回答

1

終端1後輸出,用於搬運工PS能夠通過註釋掉「fabric-samples/chaincode-dock」中的命令「/ bin/bash -c'./script.sh'」來解決這個問題er-devmode/docker-compose-simple.yaml「文件。

+0

這實際上禁用了頻道創建和加入頻道,這是需要移動來調用等。 –

+0

然後,這使我回到了「docker exec -it cli bash」命令的原始錯誤。 –

+0

在做終端2之後,1)做終端1和2)後,「docker ps」的輸出是什麼? –

0

我讀到如何https://jira.hyperledger.org/browse/FAB-5309做出決議,貌似問題是與chaincode - 泊塢窗 - DEVMODE的文物

附:只需更新織物到1.0.2並拉動新的織物樣品回購,啓動新的容器,瞧!

最好 NAS

+0

嗨!感謝您的答覆。我用另一種方法完成了這個。謝謝! –

相關問題