我正在尝试为织物版本1.2.0运行Explorer 3.6。我正在使用余额转移应用进行测试。我的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":{},
"peer1.org1.example.com": {},
"peer0.org2.example.com":{},
"peer1.org2.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-trasnfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://localhost:7051",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpcs://localhost:7056",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
}
},
"peer0.org2.example.com": {
"url": "grpcs://localhost:9051",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com"
}
},
"peer1.org2.example.com": {
"url": "grpcs://localhost:8056",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://localhost:7050",
"tls_cacerts":"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
}
}
}
},
"configtxgenToolPath": "/home/ak/fabric-samples/bin",
"license": "Apache-2.0"
}
我得到的错误是:- 网络:[network-1]和客户端:[client-1]的同步过程已开始 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<同步器错误>>>>>>>>>>>>>>>>>>>>>>>>>>> 错误:[“无法连接客户端对等方,请检查配置和对等状态”] <<<<<<<<<<<<<<<<<<<<<<<<<<<< >>正在关闭客户端处理器>>>>>>>>>>>>>>>>>>>>>>>>>>>
以下是错误日志
[2018-09-27 10:58:14.006] [DEBUG] FabricClient-Admin peer找不到grpcs:// localhost:7051
答案 0 :(得分:0)
您可以尝试以以下格式更改对等的“ url”和“ eventUrl”:
"url": "grpcs://peer0.org1.example.com:7051"
我正在使用docker实例运行区块链浏览器,这种格式对我有用。
答案 1 :(得分:0)
您必须找到正在运行的对等设备和订购者的IP和端口,并在config.json中进行更改。您可以使用docker ps
来确保容器正在运行,并查看与每个容器相关的端口。
另外,请查看this link关于资源管理器的信息。链接显示了更改config.json和运行资源管理器所需的步骤。
答案 2 :(得分:0)
我在explorerconfig.json
下的blockchain-explorer/app
中更改了同步
"sync": {
"type": "host",
"platform": "fabric",
"blocksSyncTime": "3"
}
错误消失了。
答案 3 :(得分:0)
就我而言,我错过了最后一行(CORE_PEER_GOSSIP_EXTERNALENDPOINT)
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
在描述网络的相应docker-compose.yml中的。 如果没有这一行,对等方似乎仅在组织内部可见。 您还需要./generate.sh和./start.sh您的网络。 希望对您有所帮助。