对等节点开始抛出找不到默认的PKCS11 BCCSP错误 [英] peer node start throwing Could not find default pkcs11 BCCSP error
本文介绍了对等节点开始抛出找不到默认的PKCS11 BCCSP错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最初,当我尝试运行Fabric-CA-Server时,它抛出了相同的错误Could not find default
PKCS11BCCSP
。
然后我发现一些人建议从源代码进行构建,它修复了这个错误。
现在,当我运行peer node start
命令引导对等方时,我面临同样的错误。
BCCSP
上的BCCSP
内容如下:
# BCCSP (Blockchain crypto provider): Select which crypto implementation or
# library to use
BCCSP:
Default: PKCS11
# Settings for the SW crypto provider (i.e. when DEFAULT: SW)
SW:
# TODO: The default Hash and Security level needs refactoring to be
# fully configurable. Changing these defaults requires coordination
# SHA2 is hardcoded in several places, not only BCCSP
Hash: SHA2
Security: 256
# Location of Key Store
FileKeyStore:
# If "", defaults to 'mspConfigPath'/keystore
KeyStore:
# Settings for the PKCS#11 crypto provider (i.e. when DEFAULT: PKCS11)
PKCS11:
# Location of the PKCS11 module library
Library: /usr/local/lib/softhsm/libsofthsm2.so
# Token Label
Label: ForFabric
# User PIN
Pin: 98765432
Hash: SHA2
Security: 256
FileKeyStore:
KeyStore: /home/akshay/dev/fabric-ca/fabric-ca-client/peerOrg/msp/keystore
我运行peer node start
时出错:
$ peer node start
2018-12-28 14:48:50.508 IST [main] InitCmd -> ERRO 001 Cannot run peer because error when setting up MSP of type bccsp from directory /home/akshay/dev/fabric-ca/fabric-ca-client/peerOrg/msp: could not initialize BCCSP Factories: Failed initializing BCCSP.: Could not initialize BCCSP SW [Failed to initialize software key store: An invalid KeyStore path provided. Path cannot be an empty string.]
Could not find default `PKCS11` BCCSP
我使用的是以下对等版本:
$ peer version
peer:
Version: 1.4.0
Commit SHA: 9cd9fce
Go version: go1.11.2
OS/Arch: linux/amd64
Chaincode:
Base Image Version: 0.4.14
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
推荐答案
有两个问题:
1)确保删除core.yaml
中BCCSP
下的SW:
部分
2)默认情况下,对端二进制镜像和Docker镜像都不支持PCKS11。您可以使用GO_TAGS=pkcs11 make peer
自己构建对等二进制文件
这篇关于对等节点开始抛出找不到默认的PKCS11 BCCSP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文