hyperledger-fabric - 尝试 ping 时出错。错误:2 UNKNOWN:找不到带有名称的链码
问题描述
这是我尝试做的事情:
- VM1:CA、订购者、Peer0、NodeServer1
- VM2:Peer1、NodeServer2
如果我使用 server1 和仅包含 orderer、CA 和Peer1的连接配置文件创建卡,则该卡能够 ping 网络。如果我使用 server2 和仅包含 orderer、CA 和Peer2的连接配置文件创建卡,我可以创建卡但无法使用此卡 ping 网络。更多信息 :
1)我的虚拟机能够在任何端口上进行通信。互联网链接不是pb。
2) 如果我使用包含 Ca、Orderer、Peer1 和 Peer0 的 connection.json,则在 VM2 上创建的卡正在工作。
任何想法 ?
您可以询问是否需要更多信息。
谢谢
VM1 上的 Connection.json :
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://<IP1>:7050"
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpc://<IP1>:7051",
"eventUrl": "grpc://<IP1>:7053"
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "http://<IP1>:7054",
"caName": "ca.org1.example.com"
}
}
}
VM2 上的 Connection.json :
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer1.org1.example.com": {}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://<IP1>:7050"
}
},
"peers": {
"peer1.org1.example.com": {
"url": "grpc://<IP2>:7051",
"eventUrl": "grpc://<IP2>:7053"
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "http://<IP1>:7054",
"caName": "ca.org1.example.com"
}
}
}
docker network ls
NETWORK ID NAME DRIVER SCOPE
bad3e19266c6 bridge bridge local
bb28a60f158b composer_default bridge local
8002ff68da75 host host local
f5c9ac2997e5 none null local
docker inspect composer_default
[
{
"Name": "composer_default",
"Id": "bb28a60f158b4c61438b3792c0c2cd5c13d1aa3bbbd6c1cfe8dff88a0232efc1",
"Created": "2018-05-31T13:56:28.314975468+02:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "<IP2>",
"Gateway": "172.18.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"868f282e3ae67ed3861e9e4729292019b220b3f04dfcf300395251223ba14b68": {
"Name": "peer1.org1.example.com",
"EndpointID": "1141dd4d1aa0ed6a4ec1e5dd103a3affa90a8344600969111af433f5ad396d59",
"MacAddress": "<MACAddress>",
"IPv4Address": "<IP2>",
"IPv6Address": ""
},
"aa6579c58c1bd2bfde2491a083fc731f7fbc0ec44d609c2105ff6628be14bf15": {
"Name": "couchdb1",
"EndpointID": "dddb99538f49524ce5d68fb768cb73c0d96608f57e6fe743ddfc0023a63c6a3e",
"MacAddress": "<MACAddress>",
"IPv4Address": "<IP2>",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
解决方案
推荐阅读
- hyperledger-fabric - 如何使用 IBM 区块链平台调试 Chaincode
- c# - 使用 Microsoft Graph SDK 从 Azure 应用程序获取所有用户及其角色(包括名称和值)
- javascript - 如何让玩家与墙壁发生碰撞?
- javascript - 在 Gulp 中观看文件时访问许多事件类型的任何触发事件的事件路径
- c++ - 将枚举类模板限制为标记类型
- python - python导出文件位置更改
- javascript - 基于 JavaScript 中的另一个数组值从数组中选择元素
- c - 如何打印星号的递减模式,其中星号被 C 中的空格替换?
- reactjs - 如何解决将 windows 本地 reactjs 应用程序迁移到 Linux 时出现的错误?
- python - 如何创建一个函数,返回作为参数传递的单词的变位词列表,在预定义的词典中找到?