Hyperledger Caliper测试报错:manufacturerMSP连接配置discover不被允许
解决Caliper测试Fabric时"discover which is not allowed"错误
错误原因
你执行Caliper测试命令时触发的错误,核心是Caliper不允许对manufacturerMSP组织使用服务发现(discover)模式的连接配置,当前版本的Caliper仅支持静态指定节点地址的连接方式。
具体修复步骤
- 打开你的
caliper-config.yaml配置文件,定位到manufacturerMSP组织的配置段 - 删除或替换所有包含
discover: true的配置项,改为手动指定peer节点、CA的地址,以及管理员证书/密钥路径,示例配置如下:
organizations: manufacturerMSP: peers: - peer0.manufacturer.example.com:7051 certificateAuthorities: - ca.manufacturer.example.com:7054 adminPrivateKey: path: ./crypto-config/peerOrganizations/manufacturer.example.com/users/Admin@manufacturer.example.com/msp/keystore/priv_sk signedCert: path: ./crypto-config/peerOrganizations/manufacturer.example.com/users/Admin@manufacturer.example.com/msp/signcerts/Admin@manufacturer.example.com-cert.pem
- 确保配置里的节点地址、证书/密钥路径和你的Fabric网络实际部署情况完全匹配
- 重新执行测试命令:
npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig caliper-config.yaml --caliper-benchconfig ../benchmark/caliper-test.yaml --caliper-flow-only-test
额外排查点
- 检查所有组织的连接配置,确保没有其他组织也使用了
discover模式 - 验证证书和密钥文件路径是否存在且权限正确,路径错误会导致连接失败
- 如果Fabric用Docker部署,确认Caliper所在环境能访问到peer节点的端口(端口映射、防火墙规则是否正常)
内容的提问来源于stack exchange,提问作者Sahil Sonkar
相关产品推荐
相关产品推荐

