Я настроил фабричную сеть (v1.1.0) на Ubuntu 16.04 и использую Blockchain Explorer для просмотра деталей транзакции.Все работает нормально, но когда я добавляю новую транзакцию в мою сеть, Blockchain Explorer не может сканировать блок из моей сети для вставки в базу данных и из-за этой ошибки:
[ERROR] blockscanner - TypeError: Невозможно прочитать свойство'data' of undefined
[2018-05-30 02:30:11.684] [ERROR] Query - Error: No identity has been assigned to this client
at Client._getSigningIdentity (/explorer/src/blockchain-explorer/node_modules/fabric-client/lib/Client.js:1207:11)
at Client.queryInstalledChaincodes (/explorer/src/blockchain-explorer/node_modules/fabric-client/lib/Client.js:916:23)
at helper.getOrgAdmin.then (/explorer/src/blockchain-explorer/app/query.js:127:18)
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: error executing chaincode: failed to execute transaction: timeout expired while executing transaction
at new createStatusError (/explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:64:15)
at /explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:583:15
error: [Channel.js]: Failed Query block. Error: Error: 2 UNKNOWN: error executing chaincode: failed to execute transaction: timeout expired while executing transaction
at new createStatusError (/explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:64:15)
at /explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:583:15
[2018-05-30 02:30:47.603] [ERROR] Query - Error: 2 UNKNOWN: error executing chaincode: failed to execute transaction: timeout expired while executing transaction
at new createStatusError (/explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:64:15)
at /explorer/src/blockchain-explorer/node_modules/grpc/src/client.js:583:15
[2018-05-30 02:30:47.604] [ERROR] blockscanner - TypeError: Cannot read property 'data' of undefined
at EventEmitter.<anonymous> (/explorer/src/blockchain-explorer/listener/blocklistener.js:29:30)
at emitOne (events.js:96:13)
at EventEmitter.emit (events.js:188:7)
at saveBlockRange (/explorer/src/blockchain-explorer/service/blockscanner.js:60:23)
at next (native)
at onFulfilled (/explorer/src/blockchain-explorer/node_modules/co/index.js:65:19)
Но когда я стираю все данные в PostgreSQL из Blockchain Explorer и снова запускаю explorer, он работает нормально ?!Кто-нибудь получает эту ошибку или знает, как ее исправить?
Мой конфигурационный файл для проводника здесь:
{
"network-config": {
"org1": {
"name": "Org1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpcs://peer0.org1.example.com:7051",
"events": "grpcs://peer0.org1.example.com:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"peer2": {
"requests": "grpcs://peer1.org1.example.com:8051",
"events": "grpcs://peer1.org1.example.com:8053",
"server-hostname": "peer1.org1.example.com",
"tls_cacerts": "/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
"cert": "/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
}
}
},
"host": "localhost",
"port": "8080",
"channel": "my-channel",
"keyValueStore": "/tmp/fabric-client-kvs",
"eventWaitTime": "5000",
"pg": {
"host": "127.0.0.1",
"port": "5432",
"database": "fabricexplorer",
"username": "hppoc",
"passwd": "password"
},
"license": "Apache-2.0"
}