$ ./byfn.sh -m generate
$ ./byfn.sh -m up -s couchdb -a
....
Error: Got unexpected status: BAD_REQUEST
Usage:
peer channel create [flags]
Flags:
-c, --channelID string In case of a newChain command, the channel ID to create.
-f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer
-t, --timeout int Channel creation timeout (default 5)
Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--logging-level string Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string Ordering service endpoint
--test.coverprofile string Done (default "coverage.cov")
--tls Use TLS when communicating with the orderer endpoint
-v, --version Display current version of fabric peer server
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
#解决办法:删除原来的镜像
$ docker rm $(docker ps -a -q)
$ ./byfn.sh -m generate
Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10000' seconds and CLI delay of '3' seconds
Continue (y/n)? y
proceeding ...
cryptogen tool not found. exiting
#解决办法
在执行first-network例子的上一层目录下面要有一个bin文件夹,里面放着需要的可执行文件。
操作:首先看一下,该目录下面是否有一个脚本:bootstrap-1.0.0.sh,有即执行即可。
没有的话: 你需要在fabric-samples目录下面执行如下命令,将所需要的二进制文件下载下来:
$ curl -sSL https://goo.gl/eYdRbX | bash
执行完以后会在fabric-samples目录下面创建一个bin目录,下面放着所需要的所有的二进制工具
注意:由于网络原因,以上的curl很可能执行失败,其实这个脚本文件其实在fabric中就已经存在了:
位置:gopath/src/github.com/hyperledger/fabric/scripts下面,直接将该脚本文件copy到fabric sample中就可以了