调用channel.sendTransactionProposal()时出现Hyperledger fabric nodesdk错误

时间:2018-05-21 09:01:08

标签: hyperledger-fabric hyperledger

每当我拨打channel.sendTransactionProposal()时,都会弹出以下错误。

/usr/bin/node: symbol lookup error: /media/alvin/Data/workspace/loan/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init

我在dockerfile中启用tls后开始收到此错误。如果禁用tls并使用gprc而不是gprcs,该函数可以正常工作。因此我怀疑这可能是我使用的网络配置文件的问题。

继承我的连接档案:

name: "network"
version: "1.0"

channels:
  bankchainchannel:
    orderers:
      - orderer.bankchain.com
    peers:
      peer0.bank.bankchain.com:
        endorsingPeer: true
        chaincodeQuery: true
        ledgerQuery: true
        eventSource: true

      peer1.bank.bankchain.com:
        endorsingPeer: false
        chaincodeQuery: true
        ledgerQuery: true
        eventSource: true

      peer2.bank.bankchain.com:
        endorsingPeer: false
        chaincodeQuery: true
        ledgerQuery: true
        eventSource: true


organizations:
  bank.bankchain.com:
    mspid: bankMSP
    peers:
      - peer0.bank.bankchain.com
      - peer1.bank.bankchain.com
      - peer2.bank.bankchain.com
    certificateAuthorities:
      - ca.bankchain.com
    adminPrivateKey:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/users/Admin@bank.bankchain.com/msp/keystore/0c067f0315abe6074777fd666d2dca958ce1ba9f2419c9cfecb7264a1f519186_sk
    signedCert:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/users/Admin@bank.bankchain.com/msp/signcerts/Admin@bank.bankchain.com-cert.pem


orderers:
  orderer.bankchain.com:
    url: grpcs://localhost:7050
    grpcOptions:
      ssl-target-name-override: orderer.bankchain.com
      grpc-max-send-message-length: 15
    tlsCACerts:
      path: ./crypto-config/ordererOrganizations/bankchain.com/msp/tlscacerts/tlsca.bankchain.com-cert.pem

peers:
  peer0.bank.bankchain.com:
    url: grpcs://localhost:7051
    eventUrl: grpcs://localhost:7053
    clientCert: ./crypto-config/peerOrganizations/bank.bankchain.com/peers/peer0.bank.bankchain.com/tls/server.crt
    grpcOptions:
      ssl-target-name-override: peer0.bank.bankchain.com
      grpc.keepalive_time_ms: 600000
    tlsCACerts:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/peers/peer0.bank.bankchain.com/msp/tlscacerts/tlsca.bank.bankchain.com-cert.pem

  peer1.bank.bankchain.com:
    url: grpcs://localhost:7151
    eventUrl: grpcs://localhost:7153
    grpcOptions:
      ssl-target-name-override: peer1.bank.bankchain.com
      grpc.keepalive_time_ms: 600000
    tlsCACerts:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/peers/peer1.bank.bankchain.com/msp/tlscacerts/tlsca.bank.bankchain.com-cert.pem

  peer2.bank.bankchain.com:
    url: grpcs://localhost:7251
    eventUrl: grpcs://localhost:7253
    grpcOptions:
      ssl-target-name-override: peer1.bank.bankchain.com
      grpc.keepalive_time_ms: 600000
    tlsCACerts:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/peers/peer2.bank.bankchain.com/msp/tlscacerts/tlsca.bank.bankchain.com-cert.pem

certificateAuthorities:
  ca.bankchain.com:
    url: https://localhost:7054
    httpOptions:
      verify: false
    tlsCACerts:
      path: ./crypto-config/peerOrganizations/bank.bankchain.com/ca/ca.bank.bankchain.com-cert.pem
    registrar:
      - enrollId: admin
        enrollSecret: adminpw
    caName: ca.bankchain.com

继承我的dockercompose文件:https://gist.github.com/alvinzach/a4f2e8227dcf468b1ea1e437de4a0e6b

我已经尝试过npm rebuild。

1 个答案:

答案 0 :(得分:1)

由于Gari Singh建议更新节点v10.0解决了问题