我正在为在不同机器上运行的fabric网络设置资源管理器(比如IP 12.34.56.78),当我试图从资源管理器启动脚本start.sh时,我遇到了这个错误。在单个实例上成功连接(在单个机器上同时连接资源管理器和fabric ),但是当试图在不同的机器上连接时会遇到错误。
这里是我正在更改参数的config.json文件。
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
},
"signedCert": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://12.34.56.78:7051",
"eventUrl": "grpcs://l12.34.56.78:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpcs://12.34.56.78:8051"
},
"peer0.org2.example.com": {
"url": "grpcs://12.34.56.78:9051"
},
"peer1.org2.example.com": {
"url": "grpcs://12.34.56.78:10051"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://12.34.56.78:7050"
}
}
},
"network-2": {}
},
"configtxgenToolPath": "/home/dinesh/HyperExplorer/fabric-samples/bin",
"license": "Apache-2.0"
}
错误
(节点:16024) DeprecationWarning: grpc.load:使用@grpc/proto-加载器模块( grpc.loadPackageDefinition )代替2019-05-28T13:26:18.102Z -错误: Remote.js:错误:未能在截止日期之前连接,网址:grpcs://localhost:7050 <<<<<<<<<<<<<<<<<<<<<<<<<< Explorer错误>>>>>>>>>>>>>>>>>>>>> { Error:未能在截止日期之前连接
发布于 2019-05-29 07:07:43
您在SDK中设置了发现选项吗?
这里链接到官方HL NodeJS Fabric SDK文档中的发现选项。
https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DiscoveryOptions
发布于 2019-06-21 17:54:49
您可能需要在fabric网络上添加资源管理器机器的IP地址,还需要将权限文件从fabric网络机器复制到资源管理器机器,类似于sftp协议。
发布于 2019-10-03 15:25:27
您没有在DISCOVERY_AS_LOCALHOST start.sh文件中将环境变量设置为false。这就是你看到的原因:本地主机。
确保检查explorerconfig.json是否同步进程从不同位置运行
"sync": {
"type": "host"
}https://stackoverflow.com/questions/56344952
复制相似问题