简体   繁体   English

对等节点开始抛出找不到默认的 pkcs11 BCCSP 错误

[英]peer node start throwing Could not find default pkcs11 BCCSP error

I am trying to run Hyperledger fabric peer with SoftHSM enabled.我正在尝试在启用 SoftHSM 的情况下运行 Hyperledger Fabric Peer。 Fabric-ca-server is already running with SoftHSM enabled and all the certificates are generated with HSM enabled. Fabric-ca-server 已经在启用 SoftHSM 的情况下运行,并且所有证书都是在启用 HSM 的情况下生成的。

Initially, when I was trying to run fabric-ca-server it was throwing the same error Could not find default PKCS11 BCCSP .最初,当我尝试运行 fabric-ca-server 时,它抛出了相同的错误BCCSP Could not find default PKCS11 BCCSP

Then I found some people suggesting to make build from source code and it fixed that error.然后我发现有些人建议从源代码进行构建并修复了该错误。

Now I am facing the same error when I run peer node start command to bootstrap peer.现在,当我运行peer node start命令来引导 peer 时,我面临同样的错误。

The BCCSP content on core.yaml is below:BCCSP内容core.yaml低于:

# 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

The error when I run peer node start :运行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

I am using the following peer version:我正在使用以下对等版本:

$ 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

There were two issues:有两个问题:

1) Make sure to delete the SW: section under BCCSP in core.yaml 2) By default, the peer binary and Docker image are both built without support for PCKS11. 1) 确保删除BCCSPcore.yaml下的SW:部分 2) 默认情况下,peer binary 和 Docker 镜像都是在不支持 PCKS11 的情况下构建的。 You can build the peer binary yourself using GO_TAGS=pkcs11 make peer您可以使用GO_TAGS=pkcs11 make peer自己构建对等二进制文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 本机运行 Fabric CA - 找不到默认的“PKCS11”BCCSP - Running Fabric CA natively - Could not find default `PKCS11` BCCSP 带有 SoftHSM 的 Fabric-CA:无法初始化 BCCSP PKCS11:配置无效。 不能为零 - Fabric-CA with SoftHSM: Could not initialize BCCSP PKCS11: Invalid config. It must not be nil Hyperledger Fabric CA 服务器 - 初始化 BCCSP PKCS11 库时出错 - Hyperledger Fabric CA server - getting error while initializing BCCSP PKCS11 library 无法运行 peer,因为从目录设置 bccsp 类型的 MSP 时出错...设置错误:nil conf 参考 - Cannot run peer because error when setting up MSP of type bccsp from directory ... Setup error: nil conf reference 无法运行对等体,因为从目录 /etc/hyperledger/fabric/msp 设置类型为 bccsp 的 MSP 时出错 - Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp Hyperledger Fabric:无法运行peer,因为从目录设置bccsp类型的MSP时出错:提供的标识无效 - Hyperledger Fabric: Cannot run peer because error when setting up MSP of type bccsp from directory: the supplied identity is not valid 当我执行官方文档“test.network”时,无法运行 peer,因为从目录中设置 bccsp 类型的 MSP 时出错 - when i carry out official document ‘test-network’,Cannot run peer because error when setting up MSP of type bccsp from directory Hyperledger Fabric Peer 2 Peer-通道启动错误 - Hyperledger Fabric Peer 2 Peer- error in channel start up 什么是超级账本v0.6中的对等节点和对等节点? - What is peer,node and peer node start in hyper ledger v0.6? 尝试作曲家网络启动时出现对等错误 - Peer error when trying composer network start
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM