我收到错误:尝试部署时出错。错误:尝试安装链码时出错。错误:端点读取失败 尝试使用Composer部署.bna时。
我已设置连接配置文件,并通过
导入管理员标识作曲家身份导入-p hlfv1 -u PeerAdmin -c ./crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example .com-cert.pem -k ./crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/c6514cb2a41dbcf44efcaf5c106bf8bed44aa7e1147aea439655d968c792149b_sk
然后
作曲家网络部署-p hlfv1 -a bonusetis.bna -i PeerAdmin -s密码
连接配置文件是
{
"type": "hlfv1",
"orderers": [
{
"url": "grpc://localhost:7050"
}
],
"ca": {
"url": "http://localhost:7054",
"name": "ca_peerOrg1"
},
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
},
{
"requestURL": "grpc://localhost:8051",
"eventURL": "grpc://localhost:8053"
}
],
"keyValStore": "/home/pere-lluis/.hfc-key-store",
"channel": "mychannel",
"mspID": "Org1MSP",
"timeout": "300"
}
日志:
2017-07-03T14:05:27.515Z INFO ConnectionProfileManager :constructor() Created a new ConnectionProfileManager {"0":{"fs":{"constants":{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":64,"O_EXCL":128,"O_NOCTTY":256,"O_TRUNC":512,"O_APPEND":1024,"O_DIRECTORY":65536,"O_NOATIME":262144,"O_NOFOLLOW":131072,"O_SYNC":1052672,"O_DIRECT":16384,"O_NONBLOCK":2048,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1},"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1}}}$
2017-07-03T14:05:27.528Z INFO FSConnectionProfileStore :save() Saved connection profile hlfv1 {}$
2017-07-03T14:05:27.529Z INFO ConnectionProfileManager :connect() Connecting using hlfv1 {"0":null}$
2017-07-03T14:05:27.531Z INFO FSConnectionProfileStore :load() Loaded connection profile hlfv1 {"0":"{\n \"type\": \"hlfv1\",\n \"orderers\": [\n {\n \"url\": \"grpc://localhost:7050\"\n }\n ],\n \"ca\": {\n \"url\": \"htp://localhost:7054\",\n \"name\": \"ca_peerOrg1\"\n },\n \"peers\": [\n {\n \"requestURL\": \"grpc://localhost:7051\",\n \"eventURL\": \"grpc://localhost:7053\"\n },\n {\n \"requestURL\": \"grpc://localhost:8051\",\n \"eventURL\": \"grpc://localhost:8053\"\n }\n ],\n \"keyValStore\": \"/home/pere-lluis/.hfc-key-store\",\n \"channel\": \"mychannel\",\n \"mspID\": \"Org1MSP\",\n \"timeout\": \"300\"\n}"}$
2017-07-03T14:05:27.531Z INFO ConnectionProfileManager :getConnectionManager() Looking up a connection manager for profile {"0":"hlfv1"}$
2017-07-03T14:05:27.532Z INFO FSConnectionProfileStore :load() Loaded connection profile hlfv1 {"0":"{\n \"type\": \"hlfv1\",\n \"orderers\": [\n {\n \"url\": \"grpc://localhost:7050\"\n }\n ],\n \"ca\": {\n \"url\": \"htp://localhost:7054\",\n \"name\": \"ca_peerOrg1\"\n },\n \"peers\": [\n {\n \"requestURL\": \"grpc://localhost:7051\",\n \"eventURL\": \"grpc://localhost:7053\"\n },\n {\n \"requestURL\": \"grpc://localhost:8051\",\n \"eventURL\": \"grpc://localhost:8053\"\n }\n ],\n \"keyValStore\": \"/home/pere-lluis/.hfc-key-store\",\n \"channel\": \"mychannel\",\n \"mspID\": \"Org1MSP\",\n \"timeout\": \"300\"\n}"}$
2017-07-03T14:05:28.203Z INFO ConnectionProfileManager :getConnectionManager() Using this connection manager {"0":{"connectionProfileManager":{"connectionProfileStore":{"fs":{"constants":{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":64,"O_EXCL":128,"O_NOCTTY":256,"O_TRUNC":512,"O_APPEND":1024,"O_DIRECTORY":65536,"O_NOATIME":262144,"O_NOFOLLOW":131072,"O_SYNC":1052672,"O_DIRECT":16384,"O_NONBLOCK":2048,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1},"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1}}}}}$
2017-07-03T14:05:40.922Z ERROR HLFConnection :_install() {"message":"error trying install chaincode. Error: Endpoint read failed","stack":"Error: error trying install chaincode. Error: Endpoint read failed\n at temp.mkdir.then.then.then.then.then.catch (/usr/lib/node_modules/composer-cli/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:367:34)"}$
docker ps给出:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
100ae9868898 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 16 seconds ago Up 12 seconds 0.0.0.0:7054->7054/tcp ca_peerOrg1
05205477777e hyperledger/fabric-ca "sh -c 'fabric-ca-..." 16 seconds ago Up 13 seconds 0.0.0.0:8054->7054/tcp ca_peerOrg2
13f6085efbbe hyperledger/fabric-tools "/bin/bash" About a minute ago Up About a minute cli
30682de3757e hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
bace9d430a0d hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
347d902ef369 hyperledger/fabric-orderer "orderer" About a minute ago Up About a minute 0.0.0.0:7050->7050/tcp orderer.example.com
e125d8cb1f31 hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
463ecc4146eb hyperledger/fabric-peer "peer node start" About a minute ago Up About a minute 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
答案 0 :(得分:0)
Lluis,您的配置中是否启用了TLS?如果是这样,您可以阅读有关使用完整格式创建连接配置文件的文档(例如grpcs:// etc) - > https://hyperledger.github.io/composer/reference/connectionprofile.html。