ubuntu,failed to join channel问题

img

ubuntu系统,通过./network.sh createChannel命令创建并加入channel时出现该报错,该如何解决。Error: proposal failed (err: bad proposal response 500: "JoinChain" for channelID = mychannel failed because of validation of configuration block, because of Failed capabilities check: [Application capability V2_5 is required but not supported])After 5 attempts, peer0.org1 has failed to join channel 'mychannel'

该回答引用ChatGPT

该错误表明您的peer节点试图加入通道时,遇到了配置块的验证问题,因为要求应用程序能力 V2_5 但是不受支持。

要解决这个问题,您需要确保您的peer节点和orderer节点都支持应用程序能力 V2_5。要检查您的节点是否支持V2_5应用程序功能,请检查您的Docker镜像或二进制文件是否是支持V2_5的版本。

如果您使用的是Hyperledger Fabric 2.3或更早版本,则默认情况下不支持应用程序能力V2_5,您需要将其手动启用。您可以按照以下步骤在配置中启用应用程序功能V2_5:

打开您的配置文件(configtx.yaml),并确保以下参数被设置为true:


Capabilities:
  <<: *ChannelCapabilities
  Application: &ApplicationCapabilities
    V2_5: true

在使用configtxgen工具生成通道配置和锚节点更新配置时,确保指定了要使用的配置文件:


# 生成通道配置
configtxgen -profile <profile_name> -channelID <channel_id> -outputCreateChannelTx <tx_filename> -configPath <config_dir>

# 生成锚节点更新配置
configtxgen -profile <profile_name> -channelID <channel_id> -outputAnchorPeersUpdate <tx_filename> -configPath <config_dir> -asOrg <org_name>

在启动peer节点时,确保将peer的CORE_VM_DOCKER_ATTACHSTDOUT设置为true,以便在容器中查看更多的日志信息。

如果您的peer节点和orderer节点都已正确配置,但是问题仍然存在,请检查是否存在与TLS相关的问题,例如证书或TLS版本不匹配。如果是这种情况,您可以通过检查TLS配置以及peer和orderer的TLS证书来解决该问题。