成功解决 执行config_solo文件夹中./generate.sh脚本报错./bin/cryptogen ./bin/configtxgen: 没有那个文件或目录

博客讲述了在执行Fabric的配置脚本时遇到'./bin/cryptogen'和'./bin/configtxgen'找不到的错误,解决方案是下载并放置正确的二进制脚本文件到当前目录。尽管日志出现警告,但不影响使用Caliper进行性能测试。文中还提及了如何添加共识策略,但不建议这样做,因为可能影响性能测试。提供了添加共识策略的代码供读者参考,并鼓励讨论和提问。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错信息如下:

[yujialing@localhost config_solo]$ ./generate.sh 
curl: (56) Recv failure: Connection reset by peer
./generate.sh:16: ./bin/cryptogen: 没有那个文件或目录
./generate.sh:17: ./bin/configtxgen: 没有那个文件或目录
./generate.sh:18: ./bin/configtxgen: 没有那个文件或目录
find: ‘crypto-config’: 没有那个文件或目录

原因是缺少Fabric的二进制脚本文件
可以到此处0积分下载Fabric1.4.1的脚本文件Fabric2.0.0的脚本文件,其他版本请自行下载

将二进制脚本文件复制到当前目录下(config_solo

重新执行生成指令

./generate.sh

解决了以上问题,但日志报警告提示需要在configtx.yaml中增加共识策略,不用管,不影响运用Caliper对Fabric进行性能测试

但是你非要纠结怎么加共识,以下可有解决方案,但增加共识会导致Fabric性能测试报错,所以不用往configtx.yaml中增加共识策略

经过多轮调试,目前已添加上共识策略,如图所示
在这里插入图片描述

小伙伴只需复制以下代码覆盖原有的configtx.yaml文件即可

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

---
################################################################################
#
#   Section: Organizations
#
#   - This section defines the different organizational identities which will
#   be referenced later in the configuration.
#
################################################################################
Organizations:

    # SampleOrg defines an MSP using the sampleconfig.  It should never be used
    # in production but may be used as a template for other definitions
    - &OrdererOrg
        # DefaultOrg defines the organization which is used in the sampleconfig
        # of the fabric.git development environment
        Name: OrdererMSP

        # ID to load the MSP definition as
        ID: OrdererMSP

        # MSPDir is th
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

余府

谢谢你的鼓励

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值