qq_43406259 2023-06-13 13:04 采纳率: 0%
浏览 16
已结题

fabric-sdk-go连接orderer节点报错求解答!!

我在尝试使用fabric-sdk-go连接我部署在服务器上的fabric网络,在运行代码的时候修改了很多方法都会出现报错:

>>> Create Channel error: error should be nil for SaveChannel of orgchannel: create channel failed: create channel failed: SendEnvelope failed: calling orderer 'orderer0.example.com:7050' failed: Orderer Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [orderer0.example.com:7050]: connection is in TRANSIENT_FAILURE

我的配置文件中orderer0部分如下:

  orderer0.example.com:
    # [Optional] Default: Infer from hostname
    url: grpcs://orderer0.example.com:7050

    # these are standard properties defined by the gRPC library
    # they will be passed in as-is to gRPC client constructor
    grpcOptions:
      ssl-target-name-override: orderer0.example.com
#      hostnameOverride: orderer0.example.com
      keep-alive-time: 0s
      keep-alive-timeout: 20s
      keep-alive-permit: false
      fail-fast: false

      #will be taken into consideration if address has no protocol defined, if true then grpc or else grpcs
      allow-insecure: false

    tlsCACerts:
      # Certificate location absolute path
      # Replace to orderer cert path
      path: /Users/ranqionghuizi/Desktop/mysdk1/fixtures/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem}


 orderer:
    - pattern: (\w*)orderer0.example.com(\w*)
      urlsubstitutionexp: grpcs://orderer0.example.com:7050
      ssltargetoverrideurlsubstitutionexp: orderer0.example.com
      mappedhost:  orderer0.example.com

在本机中也做了ip地址的映射
/etc/hosts/中进行了映射

我服务器的地址 orderer0.example.com
还有各个peer节点就不列举了

检查了服务器上的docker ps的名称也没有问题

img

但是还是报错我在url里改成grpcs://服务器的ip地址:7050 也不行
删掉grpcs还是不行 试过了网上的所有方法都不行

有人知道是什么问题吗555 真的卡了很久的bug 不知道怎么解决

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 6月21日
    • 创建了问题 6月13日

    悬赏问题

    • ¥20 WPF MVVM模式 handycontrol 框架, hc:SearchBar 控件 Text="{Binding NavMenusKeyWords}" 绑定取不到值
    • ¥15 需要手写数字信号处理Dsp三个简单题 不用太复杂
    • ¥15 数字信号处理考试111
    • ¥100 关于#audobe audition#的问题,如何解决?
    • ¥15 allegro17.2生成bom表是空白的
    • ¥15 请问一下怎么打通CAN通讯
    • ¥20 如何在 rocky9.4 部署 CDH6.3.2?
    • ¥35 navicat将excel中的数据导入mysql出错
    • ¥15 rt-thread线程切换的问题
    • ¥15 高通uboot 打印ubi init err 22