./byfn.sh -m up -c imocc -i 1.0.0 启动失败

来源:2-4 fabric尝鲜

慕村7135124

2018-11-20

老师,您说的两种方式我都试过了,可还是启动失败,具体报错如下:

appledeMacBook-Air:first-network apple$ ./byfn.sh -m generate -c imocc -i 1.0.0
Generating certs and genesis block for with channel ‘imocc’ and CLI timeout of '10’
Continue (y/n)? y
proceeding …
/Users/apple/go/bin/cryptogen

##########################################################

Generate certificates using cryptogen tool

##########################################################
org1.example.com
org2.example.com

/Users/apple/go/bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
2018-11-20 16:26:24.599 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-11-20 16:26:24.644 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating genesis block
2018-11-20 16:26:24.646 CST [common/configtx/tool] doOutputBlock -> INFO 003 Writing genesis block

#################################################################

Generating channel configuration transaction ‘channel.tx’

#################################################################
2018-11-20 16:26:24.696 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-11-20 16:26:24.704 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-11-20 16:26:24.705 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 003 Writing new channel tx

#################################################################
####### Generating anchor peer update for Org1MSP ##########
#################################################################
2018-11-20 16:26:24.769 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-11-20 16:26:24.778 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-11-20 16:26:24.779 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

#################################################################
####### Generating anchor peer update for Org2MSP ##########
#################################################################
2018-11-20 16:26:24.869 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-11-20 16:26:24.880 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-11-20 16:26:24.880 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

appledeMacBook-Air:first-network apple$ ./byfn.sh -m up -c imocc -i 1.0.0
Starting with channel ‘imocc’ and CLI timeout of '10’
Continue (y/n)? y
proceeding …
Recreating peer1.org1.example.com … done
Recreating peer1.org2.example.com … done
Recreating orderer.example.com … done
Recreating peer0.org2.example.com … done
Recreating peer0.org1.example.com … done
Recreating cli … done


/ | | | / \ | _ \ | |
_
\ | | / _ \ | |
) | | |
) | | | / ___ \ | _ < | |
|
/ || // _\ || _\ |_|

Build your first network (BYFN) end-to-end test

Channel name : imocc
Creating channel…
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2018-11-20 06:18:26.933 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err Could not initialize BCCSP Factories [Failed initializing PKCS11.BCCSP %!s()
[Could not initialize BCCSP PKCS11 [Failed to initialize software key store: An invalid KeyStore path provided. Path cannot be an empty string.]]]
!!! Channel creation failed !!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

请问是什么原因,怎样解决?

写回答

1回答

自游蜗牛

2018-11-20

亲,你好。你前一次运行的东西没有删除。祝你学习愉快!

0
5
慕码人6313002
回复
慕村7135124
试过了,的确删除之前运行容器,docker ps -a为空,就可以了!若还不行./byfn.sh -m restart -c “name” restart一下
2020-01-02
共5条回复

Hyperledger Fabric实战联盟链-企业端区块链原理精讲

兼顾区块链应用层和底层 进击区块链工程师

787 学习 · 564 问题

查看课程