gpt4 book ai didi

hyperledger-fabric - 使用 Fabric v1.2 启动 super 账本资源管理器时出错

转载 作者:行者123 更新时间:2023-12-04 07:53:42 29 4
gpt4 key购买 nike

启动资源管理器时出现以下错误:

<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/kp/Desktop/blockchain-explorer/app/platform/fabric/Platform.js:52:45)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Received kill signal, shutting down gracefully
Closed out connections

使用 Fabric v1.2 和 Explorer v0.3.6 我已经用 grpc 替换了 grpcs 但这也没有多大帮助。不确定在配置文件中传递“大小”属性的位置。
{
"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/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/"
},
"signedCert":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/"
}
},
"Org2MSP":{
"mspid":"Org2MSP",
"adminPrivateKey":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/"
}
},
"OrdererMSP":{
"mspid":"OrdererMSP",
"adminPrivateKey":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/"
}
}
},
"peers":{
"peer0.org1.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url":"grpc://localhost:7051",
"eventUrl":"grpc://localhost:7053",
"grpcOptions":{
"ssl-target-name-override":"peer0.org1.example.com"
}
},
"peer1.org1.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"url":"grpc://localhost:8051",
"eventUrl":"grpc://localhost:8053",
"grpcOptions":{
"ssl-target-name-override":"peer1.org1.example.com"
}
},
"peer0.org2.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"url":"grpc://localhost:9051",
"eventUrl":"grpc://localhost:9053",
"grpcOptions":{
"ssl-target-name-override":"peer0.org2.example.com"
}
},
"peer1.org2.example.com":{
"tlsCACerts":{
"path":"/home/kp/Desktop/bct/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"url":"grpc://localhost:10051",
"eventUrl":"grpc://localhost:10053",
"grpcOptions":{
"ssl-target-name-override":"peer1.org2.example.com"
}
}
},
"orderers":{
"orderer.example.com":{
"url":"grpc://localhost:7050"
}
}
},
"network-2":{

}

},
"configtxgenToolPath":"/home/kp/Desktop/bct/fabric-samples/bin/",
“许可证”:“Apache-2.0”
}

最佳答案

TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/kp/Desktop/blockchain-explorer/app/platform/fabric/Platform.js:52:45)

根据 Platform.js,这意味着由于某种原因未能加载您的 config.json。您需要从以下观点进行审查:
  • 查看日志/app/app.log
  • 与原始 config.json 的区别

  • 而且我认为它与此问题无关,但是在禁用 TLS 时,您需要将 config.json 中的“tlsEnable”变为“false”。
    {
    "network-configs": {
    "network-1": {
    "clients": {
    "client-1": {
    "tlsEnable": false,
    ^^^^^

    关于hyperledger-fabric - 使用 Fabric v1.2 启动 super 账本资源管理器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52363329/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com