hyperledger fabric 1.0环境搭建出错记录

cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file or directory(找不到protoc-gen-go文件)


编译生成 protoc-gen-go


#编译生成 protoc-gen-go 
cd $GOPATH
gopm get -g -d github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go
#确认在$GOPATH/bin出现protoc-gen-go执行文件


如果出现文件或者命令没找到的错误,复制go 的相关文件到 fabric 编译环境


cp $GOPATH/bin/protoc-gen-go $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/ 


cp $GOPATH/bin/gocov $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/ 


错误:
执行make docker遇到:core/chaincode/shim/java/javabuild.sh: line 51: gradle: command not found

解决办法:删除openjdk
安装:oracle jdk1.8

手动gradle,注释掉core/chaincode/shim/java/javabuild.sh里面的gradle命令


启动 ./network_setup.sh up

错误:2017-09-12 14:17:49.952 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 211.139.178.49:7050: i/o timeout"; Reconnecting to {orderer.example.com:7050 <nil>}

!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================

解决办法:

修改宿主机hosts    /etc/hosts   ,在实际环境中,建议通过配置 DNS 而不是修改 /etc/hosts 文件

127.0.0.1  orderer.example.com


修改 base/peer-base.yaml,添加 volumes:

volumes:

-/etc/hosts:/etc/hosts


错误:不能生成创世块

解决办法:

root@ubuntu:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/channel-artifacts# ls
channel.tx  genesis.block  Org1MSPanchors.tx  Org2MSPanchors.tx

root@ubuntu:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/channel-artifacts# rm -rf genesis.block/


错误:

[root@localhost e2e_cli]# ../../build/bin/configtxgen -profile TwoOrgsOrdererGenesis 
2017-09-17 05:54:50.525 PDT [common/configtx/tool] main -> INFO 001 Loading configuration
2017-09-17 05:54:50.525 PDT [common/configtx/tool/localconfig] Load -> CRIT 002 Error reading configuration:  Unsupported Config Type ""
2017-09-17 05:54:50.525 PDT [common/configtx/tool] func1 -> ERRO 003 Could not find configtx.yaml. Please make sure that FABRIC_CFG_PATH is set to a path which contains configtx.yaml


解决办法:

[root@localhost e2e_cli]# export FABRIC_CFG_PATH=$PWD
[root@localhost e2e_cli]# ../../build/bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block


错误:

cli                       | 2017-09-19 14:58:59.485 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AC3060A1508021A0608B3E184CE0522...EBE756E2B3F85609A68E923C9B9499B3 
cli                       | 2017-09-19 14:58:59.485 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 57743FC2DDB7C9C207351F728119716FF214994F050D89C3D19805B9923A5DA4 
cli                       | Error: Got unexpected status: BAD_REQUEST
cli                       | Usage:
cli                       |   peer channel create [flags]
cli                       | 
cli                       | Flags:
cli                       |   -c, --channelID string   In case of a newChain command, the channel ID to create.
cli                       |   -f, --file string        Configuration transaction file generated by a tool such as configtxgen for submitting to orderer
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
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                       | 
cli                       | !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
cli                       | ================== ERROR !!! FAILED to execute End-2-End Scenario ==================
cli                       | 
cli                       | sleep: missing operand
cli                       | Try 'sleep --help' for more information.

解决办法:

类似这样的错误,是因为channel已经建立,命名冲突

    <EXACT_TIMESTAMP> UTC [msp] Sign -> DEBU 064 Sign: digest: 5ABA6805B3CDBAF16C6D0DCD6DC439F92793D55C82DB130206E35791BCF18E5F
    Error: Got unexpected status: BAD_REQUEST
    Usage:
        peer channel create [flags]
 
 
  • 1
  • 2
  • 3
  • 4

解决办法:移除docker,重新启动。执行最后一个命令即可 
1)删除一个容器 docker rm 
2)强制删除一个容器 docker rm -f 
3)强制删除全部容器 docker rm -f $(docker ps -aq)



$GOPATH

cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file or directory(找不到protoc-gen-go文件)

编译生成 protoc-gen-go

#编译生成 protoc-gen-go
cd $GOPATH
gopm get -g -d github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go
#确认在$GOPATH/bin出现protoc-gen-go执行文件

如果出现文件或者命令没找到的错误,复制go 的相关文件到 fabric 编译环境

cp $GOPATH/bin/protoc-gen-go $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/

cp $GOPATH/bin/gocov $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/


错误:
执行make docker遇到:core/chaincode/shim/java/javabuild.sh: line 51: gradle: command not found


安装:oracle jdk1.8


评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值