简体   繁体   English

实例化链码,sendPeersProposal-承诺被拒绝:错误:REQUEST_TIMEOUT,Hyperledger Fabric,Linux

[英]Instantiate chaincode, sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT, Hyperledger Fabric, linux

I am getting timeout error from peers while instantiating chaincode on particular peers from fabric node sdk on linux os. 在从Linux OS上的结构节点sdk实例化特定对等节点上的链码时,我从对等节点收到超时错误。

error: [Peer.js]: sendProposal - timed out after:90000
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT

I am able to create channel, join channel, install chaincode with existing settings. 我能够创建频道,加入频道,使用现有设置安装链码。 What is missing for instantiating the chaincode on peers successfully? 成功实例化对等方上的chaincode缺少什么?

My docker compose settings: 我的泊坞窗撰写设置:

peer0.org1.example.com:
    container_name: peer0.org1.example.com
    extends:
      file:   base.yaml
      service: peer-base
    environment:
      - CORE_PEER_ID=peer0.org1.example.com
      - CORE_PEER_LOCALMSPID=Org1MSP
      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
    ports:
      - 7051:7051
      - 7053:7053
    volumes:
        - ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peer
    depends_on:
      - orderer.example.com

Peer base: 对等基数:

version: '2'
services:
  peer-base:
    image: hyperledger/fabric-peer
    environment:
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=artifacts_default
      - CORE_LOGGING_LEVEL=DEBUG
      - CORE_PEER_GOSSIP_USELEADERELECTION=true
      - CORE_PEER_GOSSIP_ORGLEADER=false
      # The following setting skips the gossip handshake since we are
      # are not doing mutual TLS
      - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
      - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start
    volumes:
        - /var/run/:/host/var/run/

network-config for peer: 对等网络配置:

"org1": {
            "name": "peerOrg1",
            "mspid": "Org1MSP",
            "ca": "https://localhost:7054",
            "peers": {
                "peer1": {
                    "requests": "grpcs://localhost:7051",
                    "events": "grpcs://localhost:7053",
                    "server-hostname": "peer0.org1.example.com",
                    "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
                },
                "peer2": {
                    "requests": "grpcs://localhost:7056",
                    "events": "grpcs://localhost:7058",
                    "server-hostname": "peer1.org1.example.com",
                    "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
                }   
            },
            "admin": {
                "key": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
                "cert": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
            }
        }

What is legging specifically in network setup? 网络设置中专门涉及什么? Any possible root cause? 任何可能的根本原因?

you are correct about the process. 您对这个过程是正确的。 If all the operations are good, then I think the docker file is good. 如果所有操作都很好,那么我认为docker文件就很好。 But you have to make sure, you can only instantiate the chain code from the peer in which the chain code is installed. 但是必须确保,只能从安装了链代码的对等方实例化链代码。 Because the chain code installation will not change the channel config. 因为安装链码不会更改通道配置。

I got an answer after couple of findings. 经过几次调查,我得到了答案。

1) My docker version was 1.7. 1)我的Docker版本是1.7。 And its not supported by fabric node sdk anymore. 而且结构节点sdk不再支持它。 I have to update my docker version. 我必须更新我的Docker版本。 My Cent OS version is 7.0 and its support docker upto 17.6. 我的Cent OS版本是7.0,其支持的docker最高为17.6。

2) The instantiation response takes around 2 mins of round trip time. 2)实例化响应大约需要2分钟的往返时间。 Default timeout is 45 secs for instantiating the chaincode in node sdk. 实例化节点sdk中的链码的默认超时为45秒。 After changing it to 3 mins I can successfully run the whole application. 将其更改为3分钟后,我可以成功运行整个应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Linux 上的 HttpListener 请求队列超时 - HttpListener Request Queue Timeout on Linux 尝试在linux中安装Fabric时出现Fabric(python模块)错误 - Fabric (python module) error when try to install fabric in linux Hyperledger Fabric SDK Go 安装错误。 这里出了什么问题以及如何解决? - Hyperledger Fabric SDK Go Installation Error. What is going wrong here and How to fix it? 如何在Hyperledger Fabric中创建新块 - How to create a new block in Hyperledger Fabric Hyperledger Fabric 框架中是否有任何注册机构? - Is there any registration authorities in Hyperledger Fabric framework? Linux服务器上symfony中的无效请求错误 - Invalid request error in symfony on Linux server Azure Service Fabric:对Linux的支持 - Azure Service Fabric : Support for Linux 当我想在 linux 中实例化 i2c 设备时出现无效参数错误 - Invalid argument error when I want to instantiate i2c device in linux Service Fabric for Linux 中的服务通信 - Service communication in Service Fabric for Linux 将成员添加到亚马逊托管区块链上的现有超级账本 Fabric 1.2 网络 - Adding member to existing hyperledger Fabric 1.2 network on amazonmanaged blockchain
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM