Hyperlegder Fabric节点错误:2未知:流已删除请求GET / api / fabric / 1_0 / channels的未处理错误:

时间:2019-01-02 11:17:03

标签: arrays node.js go hyperledger-fabric hyperledger

这是运行fabric-sdk-rest代码时的问题:

"Peer {
  _options: 
   { 'grpc.ssl_target_name_override': 'peer0',
     'grpc.default_authority': 'peer0',
     'grpc.max_receive_message_length': -1,
     'grpc.max_send_message_length': -1 },
      clientCert: undefined,
      _url: 'grpc://0.0.0.0:7051',
      _endpoint: Endpoint { addr: '0.0.0.0:7051', creds: 
      ChannelCredentials {} },
     _name: '0.0.0.0:7051',
      _request_timeout: 45000,
     _grpc_wait_for_ready_timeout: 3000,
    _endorserClient: 
   ServiceClient {
     '$interceptors': [],
     '$interceptor_providers': [],
     '$channel': Channel {} },
  _discoveryClient: 
   ServiceClient {
     '$interceptors': [],
     '$interceptor_providers': [],
     '$channel': Channel {} } 
}

错误日志:

  

[fabricconnector.js]:无法查询频道:错误:2未知:流已删除       请求GET / api / fabric / 1_0 / channels的未处理错误:错误:2未知:流已删除
          在Object.exports.createStatusError(/home/rev-mg/HyperledgerTest/fabric-sdk-rest/packages/loopback-connector-fabric/node_modules/grpc/src/common.js:87:15)
          在Object.onReceiveStatus(/home/rev-mg/HyperledgerTest/fabric-sdk-rest/packages/loopback-connector-fabric/node_modules/grpc/src/client_interceptors.js:1188:28)
          在InterceptingListener._callNext(/home/rev-mg/HyperledgerTest/fabric-sdk-rest/packages/loopback-connector-fabric/node_modules/grpc/src/client_interceptors.js:564:42)
          在InterceptingListener.onReceiveStatus上(/home/rev-mg/HyperledgerTest/fabric-sdk-rest/packages/loopback-connector-fabric/node_modules/grpc/src/client_interceptors.js:614:8)
          在回调(/home/rev-mg/HyperledgerTest/fabric-sdk-rest/packages/loopback-connector-fabric/node_modules/grpc/src/client_interceptors.js:841:24)“

1 个答案:

答案 0 :(得分:0)

当客户端尝试创建不安全的连接但服务器使用ssl时,我有相同的错误消息

如果您使用node.js,请尝试替换

grpc.credentials.createInsecure()

grpc.credentials.createSsl()