Blockchain 在Hyperledger Composer中生成REST API时出错

Blockchain 在Hyperledger Composer中生成REST API时出错,blockchain,hyperledger,hyperledger-fabric,hyperledger-composer,Blockchain,Hyperledger,Hyperledger Fabric,Hyperledger Composer,我将按照教程生成带有示例的RESTAPI。但我得到了以下错误: 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 busi

我将按照教程生成带有示例的RESTAPI。但我得到了以下错误:

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结构通信。但它的运行

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

谢谢

您正在运行HLF 1.0.0-alpha结构,但在启动rest服务器时,您指定了defaultProfile,这是HLF v0.6的配置文件。当您部署digitalproperty网络时,您指定了一个配置文件hlfv1,该配置文件是在您遵循《快速启动指南》时为您创建的,这是您启动rest服务器时需要使用的配置文件。

Yep!谢谢我已经更改了profie,但没有出现以下错误:calmadmin@localhost:~/composer-sample-applications-hlfv1/packages/getting start$composer rest server-p hlfv1-n digitalproperty network-i admin-s DJY27pEnl16d-n始终从业务网络定义中发现类型。。。events.js:160投掷者;//未处理的“错误”事件^error:在ClientDuplexStream连接失败。_emitStatusIfDone/usr/lib/node_modules/composer rest server/node_modules/fabric client/node_modules/gr pc/src/node/src/client.js:201:19在Cli注册时ID和secret对于hlfv1.0.0-alpha也不同,它们当前是admin和adminpw分别,但是您在那里遇到的错误看起来好像与您的结构通信有问题,因此需要检查它是否仍在运行。非常感谢。我如何知道adminpw的秘密值?注册id admin及其注册秘密adminpw是docker compose文件定义的默认值,用于启动所有fabric v1容器。命令:sh-c'fabric ca server start-ca.certfile/etc/hyperledger/fabric ca server config/peerOrg1-cert.pem-ca.keyfile/etc/hyperledger/fabric ca server config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc3108941509b90f05e9179556a_sk-b管理员:adminpw'-d