2017-08-22 63 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

嗨!感谢您的答复。我用另一种方法完成了这个。谢谢! –

相关问题