0

我正在按照教程生成带有数字土地所有权网络示例的 REST API 。但我收到以下错误:

To restart the REST server using the same options, issue the following command:
   composer-rest-server -p defaultProfile -n digitalproperty-network -i WebAppAdmin -s DJY27pEnl16d -N always

Discovering types from business network definition ...
Connection fails: Error: {"created":"@1494321356.313456565","description":"Failed parsing HTTP/2","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":2022,"grpc_status":14,"referenced_errors":[{"created":"@1494321356.313436962","description":"Expected SETTINGS frame as the first frame, got frame type 80","file":"../src/core/ext/transport/chttp2/transport/parsing.c","file_line":479}{"created":"@1494321356.313450563","description":"Trying to connect an http1.x server","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1995,"http_status":400}]}
It will be retried for the next request.
{ Error: {"created":"@1494321356.313456565","description":"Failed parsing HTTP/2","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":2022,"grpc_status":14,"referenced_errors":[{"created":"@1494321356.313436962","description":"Expected SETTINGS frame as the first frame, got frame type 80","file":"../src/core/ext/transport/chttp2/transport/parsing.c","file_line":479}{"created":"@1494321356.313450563","description":"Trying to connect an http1.x server","file":"../src/core/ext/transport/chttp2/transport/chttp2_transport.c","file_line":1995,"http_status":400}]}
    at /usr/lib/node_modules/composer-rest-server/node_modules/grpc/src/node/src/client.js:417:17 code: 14, metadata: Metadata { _internal_repr: {} } }

部署新的网络定义时也会发生这种情况……似乎无法与 Hyperledger Fabric 通信。但是 Fabric 正在运行

calmadmin@localhost:~/composer-sample-applications-hlfv1/packages/getting-started$ docker ps
CONTAINER ID        IMAGE                                           COMMAND                  CREATED             STATUS              PORTS                                            NAMES
04d28aa6dcbc        dev-peer1-digitalproperty-network-0.7.0         "chaincode -peer.addr"   About an hour ago   Up About an hour                                                     dev-peer1-digitalproperty-network-0.7.0
ebdaa8cb6e17        dev-peer0-digitalproperty-network-0.7.0         "chaincode -peer.addr"   About an hour ago   Up About an hour                                                     dev-peer0-digitalproperty-network-0.7.0
71d6fe2731a5        hyperledger/fabric-peer:x86_64-1.0.0-alpha      "peer node start --pe"   About an hour ago   Up About an hour    0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp   peer1
24302fa77160        hyperledger/fabric-peer:x86_64-1.0.0-alpha      "peer node start --pe"   About an hour ago   Up About an hour    0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp   peer0
fc0cb6a66977        hyperledger/fabric-ca:x86_64-1.0.0-alpha        "sh -c 'fabric-ca-ser"   About an hour ago   Up About an hour    0.0.0.0:7054->7054/tcp                           ca_peerOrg1
0750ca58d06f        hyperledger/fabric-orderer:x86_64-1.0.0-alpha   "orderer"                About an hour ago   Up About an hour    0.0.0.0:7050->7050/tcp                           orderer0

谢谢!

4

1 回答 1

1

您正在运行 HLF 1.0.0-alpha 结构,但是当您启动其余服务器时,您指定了 defaultProfile,它是 hlf v0.6 的配置文件。当您部署 digitalproperty-network 时,您指定了一个配置文件 hlfv1(当您遵循快速入门指南时为您创建),这是您在启动其余服务器时需要使用的配置文件。

于 2017-05-09T13:31:01.783 回答