アリ雲ubuntu 16.04 Fabric 1を実行する.2 e2e_cli


アリ雲ubuntu 16.04 Fabric 1を実行する.2 e2e_cli
              , kubernetes  fabric,             ,   ,             fabric  ,example first network    ,    e2e_cli ,       
      ,  kubernetes fabric      ,       ,      
   ,     
  • Q 1:アリクラウドCESサーバーWARNING:Connection pool is full,discarding connection:localhost
  • A:これはアリクラウドCESサーバーで出会ったもので、運行結果に影響しない.原因はまだ分からない
  • Q 2:アリクラウドCESでe 2 e_を実行cli,Ordering Service is not available
  • A:
  • docker-compose fileのordererのファイルを構成に引用符
  • を付ける
  • 注釈アリクラウドサーバ上/etc/resconv.confのoptionオプション
  • すべてのfabricコンテナに対してGODEBUG=netdns=go環境変数
  • を加える.
  • ref:
  • fabricを実行する第1の例e 2 e_cli–genesis.block
  • アリクラウド環境Hyperledger FabricのSIGSEGV問題の分析と解決経験の共有
  • Hyperledger Fabricインストールの問題-アリクラウド環境の問題

  • Q 3:org 3クエリError:error endorsing query:rpc error
  • A: fabric1.2バグ、e 2 e_cli/configtx.yaml org 3構成で、’Org 3 MSP.を追加member’
  • ref:
  • fabric1.2下e 2 e_cli問題記録
  • e2e_cli has failures when queried chaincode using idemix identity


  • Q4:CRIT 06c Error creating configtx, Unexpected key Capabilities
    orderer.example.com    | 2018-09-11 12:25:00.079 UTC [orderer/multichain] newLedgerResources -> CRIT 06c Error creating configtx manager and handlers: Error deserializing key Capabilities for group /Channel: Unexpected key Capabilities
    orderer.example.com    | panic: Error creating configtx manager and handlers: Error deserializing key Capabilities for group /Channel: Unexpected key Capabilities
    orderer.example.com    |
    orderer.example.com    | goroutine 1 [running]:
    orderer.example.com    | panic(0xb31bc0, 0xc42000db00)
  • A:以前はOrdererサービスが失敗した問題で、1.0.0バージョンのミラーを再び引き出したが、コードは1.2で、ミラーを1.2に戻し、Q 2、Q 3を押すとfabric 1を正常に起動することができた.2ネットワーク
  •        CES ubuntu16.04   fabric1.2 e2e_cli              ,  all good
    
  • Q.1:Ordering Service is not available
    Error: failed to create deliver client: orderer client failed to connect
    to orderer.example.com:7050: failed to create new connection: context 
    deadline exceeded
    !!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!!
  • クエリー実行のコンテナはordererコンテナがないことを発見したが、ordererはorderer-testとして単独で取り出した.yaml,問題の検索
  • orderer-test.yaml
  •  #orderer-test.yaml
    version: '2'
    
    services:
      orderer.example.com:
        extends:
          file:   base/docker-compose-base.yaml
          service: orderer.example.com
       container_name: orderer.example.com
  • ordererを実行し、ログ
  • を表示
    root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli#  docker-compose -f order-test.yaml up
    ...
    orderer.example.com    | 2018-09-11 13:14:07.238 UTC [orderer/common/server] initializeLocalMsp -> CRIT 008 Failed to initialize local MSP: could not load a valid signer certificate from directory /var/hyperledger/orderer/msp/signcerts: stat /var/hyperledger/orderer/msp/signcerts: no such file or directory
    orderer.example.com exited with code 1

  • Q.2:発見はgenesisのためである.blockファイルはマウントされていません.資料を調べます.解決策はマウントディレクトリに引用符
     root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli# vi base/docker-compose-base.yaml 
    ...
    volumes:
    - "../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block"
    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
    - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
    
  • を付けることです.
  • Q.3:ordererを再実行し、ログを表示します.署名証明書が見つからないという問題が解決しますが、セグメント信号エラーが発生し、runtimeに表示されます.cgocall
    orderer.example.com    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fa35c480259]
    orderer.example.com    | 
    orderer.example.com    | runtime stack:
    orderer.example.com    | runtime.throw(0xd89f2e, 0x2a)
    orderer.example.com    |    /opt/go/src/runtime/panic.go:619 +0x81
    orderer.example.com    | runtime.sigpanic()
    orderer.example.com    |    /opt/go/src/runtime/signal_unix.go:372 +0x28e
    orderer.example.com    | 
    orderer.example.com    | goroutine 56 [syscall]:
    orderer.example.com    | runtime.cgocall(0xa9bf80, 0xc4202715f8, 0x29)
    orderer.example.com    |    /opt/go/src/runtime/cgocall.go:128 +0x64 fp=0xc4202715b8 sp=0xc420271580 pc=0x402124
    orderer.example.com    | net._C2func_getaddrinfo(0xc420177d30, 0x0, 0xc4200a74d0, 0xc42000e040, 0x0, 0x0, 0x0)
    orderer.example.com 
  • 再び資料を探してみると、アリクラウドの新しいサーバードメイン名解析構成/etc/resonvのためであることが分かった.confは1つ増えました.解決策はoptionという
    
    #     coredns        ,        ,               
    
    root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli# vi /etc/resolv.conf 
    ...
    nameserver 100.100.2.138
    nameserver 100.100.2.136
    
    #options timeout:2 attempts:3 rotate single-request-reopen
    
    
  • を注釈することです.
  • 詳細な原因と解決方法参考:アリクラウド環境配置Hyperledger FabricのSIGSEGV問題分析と解決経験共有
  • このようにordererを実行し、正常に動作し、kafka
  • へのリンクを試みた.
  • Q.4:e 2 eを起動cliネットワーク、ordererサービスは正常ですが、ドメイン名に接続できないという問題が発生しました.つまり、行解析問題
    ction error: desc = "transport: Error while dialing dial tcp: lookup peer0.org1.example.com on 127.0.0.11:53: no such host". Reconnecting...
    2018-09-11 13:42:39.574 UTC [grpc] Printf -> DEBU 043 pickfirstBalancer: HandleSubConnStateChange: 0xc4205f9710, TRANSIENT_FAILURE
    Error: error getting endorser client for install: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
    !!!!!!!!!!!!!!! Chaincode installation on peer peer0.org1 has Failed !!!!!!!!!!!!!!!!
    ================== ERROR !!! FAILED to execute End-2-End Scenario ==================
    が発生しました.
  • 以前に検索した資料によると、orderer異常はpure Go resolver解析スキームが/etc/resconvをサポートしていないためである.confのoption項はfabricにcgo resolver解析スキームを起動させ、cgo問題によりセグメント異常
  • を引き起こした.
  • しかしこの項を注釈するとno such host問題が発生し、資料に基づいてすべてのfabric(cli、ca、orderer、peer)容器環境変数にGODEBUG=netdns=goを加え、pure go resolverを強制的に使用してdns
    root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli# vi base/docker-compose-base.yaml 
    ...
    orderer.example.com:
    container_name: orderer.example.com
    image: hyperledger/fabric-orderer
    environment:
    - GODEBUG=netdns=go
    ...
    peer0.org1.example.com:
    container_name: peer0.org1.example.com
    extends:
    file: peer-base.yaml
    service: peer-base
    environment:
    - GODEBUG=netdns=go
    ...
    peer1.org1.example.com:
    container_name: peer1.org1.example.com
    extends:
    file: peer-base.yaml
    service: peer-base
    environment:
    - GODEBUG=netdns=go
    ...
    peer0.org2.example.com:
    container_name: peer0.org2.example.com
    extends:
    file: peer-base.yaml
    service: peer-base
    environment:
    - GODEBUG=netdns=go
    ...
    peer1.org2.example.com:
    container_name: peer1.org2.example.com
    extends:
    file: peer-base.yaml
    service: peer-base
    environment:
    - GODEBUG=netdns=go
    
    root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli# vi docker-compose-cli.yaml 
    ...
    cli:
    container_name: cli
    image: hyperledger/fabric-tools
    tty: true
    environment:
    - GODEBUG=netdns=go
    - GOPATH=/opt/gopath
    
    root@liu:~/work/go/src/github.com/hyperledger/fabric/examples/e2e_cli# vi docker-compose-e2e-template.yaml 
    ...
    ca0:
    image: hyperledger/fabric-ca
    environment:
    - GODEBUG=netdns=go
    ...
    ca1:
    image: hyperledger/fabric-ca
    environment:
    - GODEBUG=netdns=go
    
  • を解析する.
  • ネットワークを開始します./network_setup.sh up
    2018-09-11 14:05:14.773 UTC [bccsp] GetDefault -> WARN 02d Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
    2018-09-11 14:05:14.773 UTC [msp] Sign -> DEBU 02e Idemix identity &{Org3MSP x: "\312\273\272\344u\344\270\3767\000\323\341H\016&\004\317Xj}\343\376rh\332X)qZ\335r\177"
    y: "\r\223SG\233\373\246\316\260\272\223\305\237\252\365\367\353T\244\323.\r3\353\373\177}\275S%\003\037"
    } is signing
    Error: error endorsing query: rpc error: code = Unknown desc = Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Writers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining] - proposal response: 
    ===================== Query successful on peer1.org3 on channel 'mychannel' ===================== 
    
    ===================== All GOOD, End-2-End execution completed ===================== 
     _____   _   _   ____            _____   ____    _____ 
    | ____| | \ | | |  _ \          | ____| |___ \  | ____|
    |  _|   |  | | | | | |  _____  |  _|     __) | |  _|  
    | |___  | |\  | | |_| | |_____| | |___   / __/  | |___ 
    |_____| |_| \_| |____/          |_____| |_____| |_____|
    

  • Q.5:ネットワークが起動しましたが、Error:error endorsing query:rpc error
    Error: error endorsing query: rpc error: code = Unknown desc = Failed 
    evaluating policy on signed data during check policy on channel 
    [mychannel] with policy [/Channel/Application/Writers]: [Failed to reach
    implicit threshold of 1 sub-policies, required 1 remaining] - proposal
    response: 
    ===================== Query successful on peer1.org3 on channel 
    'mychannel' ===================== 
    が現れました
  • これはfabric 1です.2のバグは、新しいバージョンでfixされています.解決策はconfigtxを修正することです.yamlは、org 3にメンバー情報署名情報Org3MSP.member
    - &Org3
     # Name of the organization
    Name: Org3MSP
    
     # ID to load the MSP definition as
    ID: Org3MSP
    
     # Type of MSP - this org uses idemix for its MSP implementation
    MSPType: idemix
    
    MSPDir: crypto-config/idemix/idemix-config
    
     # Policies defines the set of policies at this level of the config tree
     # For organization policies, their canonical path is usually
     #   /Channel///
    Policies:
        Readers:
            Type: Signature
            Rule: "OR('Org3MSP.admin', 'Org3MSP.peer', 'Org3MSP.client','Org3MSP.member')"
        Writers:
            Type: Signature
            Rule: "OR('Org3MSP.admin', 'Org3MSP.client','Org3MSP.member')"
        Admins:
            Type: Signature
            Rule: "OR('Org3MSP.admin')"
    
  • を追加する.
  • ネットワークを再起動し、クエリが正しい
    2018-09-11 12:51:09.444 UTC [msp] Sign -> DEBU 02e Idemix identity &{Org3MSP x: "\304]\266ds\225u\003\r\337\306\312\335Q\230\025\232C-\337\3123\021t\262\275\263\323Hx\206\004"
    y: "\\\023\3004\033;\314\340\216s\350\307C\257\204\317[\226Ls\013\365\335'\211\322P\221\300\361\336\224"
    } is signing
    90
    ===================== Query successful on peer1.org3 on channel 'mychannel' ===================== 
  • Ref
  • fabricを実行する第1の例e 2 e_cli
  • Hyperledger Fabricインストールの問題-アリクラウド環境の問題
  • アリクラウド環境Hyperledger FabricのSIGSEGV問題の分析と解決経験の共有
  • fabric1.2下e 2 e_cli問題記録
  • e2e_cli has failures when queried chaincode using idemix identity
  • Hyperledger Fabricインストールの問題-証明書生成時の署名key互換性の問題
  • HyperLedger Fabric 1を構築する.2.0開発環境