1

我正在尝试将汽车拍卖示例 .bna 文件部署到 Bluemix 上的 HLF v0.6 服务并遇到不同的错误。

  1. 我的 Bluemix 连接配置文件:

    {
    "type": "hlf",
    "membershipServicesURL": "grpcs://1c0b2dabbb834804ae3d284fed9059f4-ca.us.blockchain.ibm.com:30002",
    "peerURL": "grpcs://1c0b2dabbb834804ae3d284fed9059f4-vp0.us.blockchain.ibm.com:30002",
    "eventHubURL": "grpcs://1c0b2dabbb834804ae3d284fed9059f4-vp0.us.blockchain.ibm.com:31002",
    "keyValStore": "/Users/me/.composer-credentials",
    "deployWaitTime": "3000",
    "invokeWaitTime": "1000",
    "certificate": "-----BEGIN CERTIFICATE-----\nMIID6TCCA26gAwIBAgIQCiYEWw1faoRpM2xufaiPLTAKBggqhkjOPQQDAjBMMQsw\nCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSYwJAYDVQQDEx1EaWdp\nQ2VydCBFQ0MgU2VjdXJlIFNlcnZlciBDQTAeFw0xNjA2MDcwMDAwMDBaFw0xOTA2\nMTIxMjAwMDBaMIGJMQswCQYDVQQGEwJVUzERMA8GA1UECBMITmV3IFlvcmsxDzAN\nBgNVBAcTBkFybW9uazE0MDIGA1UEChMrSW50ZXJuYXRpb25hbCBCdXNpbmVzcyBN\nYWNoaW5lcyBDb3Jwb3JhdGlvbjEgMB4GA1UEAwwXKi51cy5ibG9ja2NoYWluLmli\nbS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARTKAZypDOqw34HWujQeL82\nj1e9rN1inpN6ngrq49+OpYIe8ckHnJhsWPpf+zeIQePboDQVUTDtYXh7212BsVoX\no4IB8jCCAe4wHwYDVR0jBBgwFoAUo53mH/naOU/AbuiRy5Wl2jHiCp8wHQYDVR0O\nBBYEFK+1RoBnUnb8nr2hNtkUu3FRrbYuMDkGA1UdEQQyMDCCFyoudXMuYmxvY2tj\naGFpbi5pYm0uY29tghV1cy5ibG9ja2NoYWluLmlibS5jb20wDgYDV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Krk2U886UAb3LujEV0ls\nYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\n-----END CERTIFICATE-----\n",
    "certificatePath": "/certs/peer/cert.pem"
    }
    
  2. 我正在执行以下命令:

composer network deploy -p bluemix -a sample-networks/packages/carauction-network/carauction-network@0.0.7.bna -i admin -s PASSS

我尝试了很多次,但出现以下错误之一:

一、安全握手:

    $ composer network deploy -p bluemix -a sample-networks/packages/carauction-network/carauction-network@0.0.7.bna -i admin -s 97b116b3c4

    Deploying business network from archive:  carauction-network/carauction-network@0.0.7.bna
    Business network definition:
        Identifier: carauction-network@0.0.7
        Description: Car Auction Business Network

    E0528 10:59:18.962200000 123145570217984 handshake.c:128]
    Security handshake failed:
    {"created":"@1495940358.962177000","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1495940358.962172000","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_poll_posix.c","file_line":427}]}

    Error
    Command failed

二、未处理的“错误”事件:

    $ composer network deploy -p bluemix -a sample-networks/packages/carauction-network/carauction-network@0.0.7.bna -i admin -s 97b116b3c4

    Deploying business network from archive:  carauction-network/carauction-network@0.0.7.bna
    Business network definition:
        Identifier: carauction-network@0.0.7
        Description: Car Auction Business Network

    events.js:160
    throw er; // Unhandled 'error' event
    ^

    Error: unknown service protos.Events
        at ClientDuplexStream._emitStatusIfDone
    (/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:189:19)
        at ClientDuplexStream._receiveStatus 
    (/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:169:8)
        at /usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:634:14

三、身份或令牌不匹配:

    $ composer network deploy -p bluemix -a sample-networks/packages/carauction-network/carauction-network@0.0.7.bna -i admin -s 97b116b3c4

    Deploying business network from archive:  carauction-network/carauction-network@0.0.7.bna
    Business network definition:
        Identifier: carauction-network@0.0.7
        Description: Car Auction Business Network


    Error: Identity or token does not match.
    Command failed

我觉得“SSL握手问题”(I)和“未处理的'错误'事件”(II)与HFC无法正确处理GRPC断开连接的旧问题有关吗?我无法弄清楚是什么导致“身份或令牌不匹配”(III)。我目前的猜测是admin用户还没有创建钱包(在我的~/.composer-credentials文件夹中看不到它)。composer deploy如果钱包尚不存在,是否应该自动创建钱包?

4

1 回答 1

0

好的,我做了更多的实验,这是我学到的:

  1. 这是我个人资料的 connection.json 中的一个问题。当我从这个问题的答案中复制并修改了一个:Fabric composer integration with Bluemix blockchain service它开始工作。

  2. 我在 中设置了长时间超时connection.json,但 CLI 命令仍然以以下错误结束:

    events.js:160
    throw er; // Unhandled 'error' event
    ^
    
    Error: {"created":"@1496109180.720017000","description":"Secure read failed","file":"../src/core/lib/security/transport/secure_endpoint.c","file_line":157,"grpc_status":14,"referenced_errors":[{"created":"@1496109180.720007000","description":"OS Error","errno":54,"file":"../src/core/lib/iomgr/tcp_posix.c","file_line":229,"os_error":"Connection reset by peer","syscall":"recvmsg"}]}
        at ClientDuplexStream._emitStatusIfDone (/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:189:19)
        at ClientDuplexStream._receiveStatus (/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:169:8)
        at /usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:634:14
    

同时 chaicode 被部署。仍然不确定是什么原因造成的。

  1. 由于 composer 的部署命令以错误完成,因此不会添加 composer 的网络 ID 和部署的链码 ID 之间的映射。这意味着,它需要手动添加,通过将类似这样的内容添加到相应的connection.json

    "networks": {
            "carauction-network": "8f637b9886357fb3e24864cfa36f9cdae84e587028a08074d856e9b6635afa76"
        }
    
于 2017-05-30T02:05:40.297 回答