0

我下载了超级账本资源管理器,我想通过两个组织教程来​​探索区块链网络设置。我的资源管理器配置文件是

{
 "network-config": {
    "org1": {
        "name": "peerOrg1",
        "mspid": "Org1MSP",
        "peer1": {
            "requests": "grpc://127.0.0.1:7051",
            "events": "grpc://127.0.0.1:7053",
            "server-hostname": "peer0.org1.example.com"

        },          
        "peer2": {
            "requests": "grpc://127.0.0.1:8051",
            "events": "grpc://127.0.0.1:8053",
            "server-hostname": "peer1.org1.example.com"

        },          
        "admin": {
            "key": "/home/mfgteg/fabric-samples/first-example/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
            "cert": "/home/mfgteg/fabric-samples/first-example/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
        }
    },      
    "org2": {
        "name": "peerOrg2",
        "mspid": "Org2MSP",
        "peer1": {
            "requests": "grpc://127.0.0.1:9051",
            "events": "grpc://127.0.0.1:9053",
            "server-hostname": "peer0.org2.example.com"

        },          
        "peer2": {
            "requests": "grpc://127.0.0.1:10051",
            "events": "grpc://127.0.0.1:10053",
            "server-hostname": "peer1.org2.example.com"

        },          
        "admin": {
            "key": "/home/mfgteg/fabric-samples/first-example/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore",
            "cert": "/home/mfgteg/fabric-samples/first-example/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts"
        }
    }       
 },
 "host": "localhost",
 "port": "8080",
 "channel": "mychannel",
 "keyValueStore": "/tmp/fabric-client-kvs",
 "eventWaitTime": "30000",
 "mysql": {
    "host": "127.0.0.1",
    "port": "3306",
    "database": "fabricexplorer",
    "username": "root",
    "passwd": "****"
 }
}

我什至尝试保留 tls 证书并保留 grpcs 而不是 grpc。在资源管理器窗口中,它不显示通道、对等点和块信息。

以下是日志的一部分:

Error: listen EADDRINUSE :::8080
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Object.<anonymous> (/home/mfgteg/blockchain-explorer/main.js:167:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
4

3 回答 3

2

EADDRINUSE :::8080 表示您已经将该端口用于其他进程。

将 config.json 文件中的端口设置改为未使用的端口,例如:“port”:“5000”
尝试再次启动服务器。

于 2018-02-08T07:11:38.220 回答
0

我用 localhost 替换了环回 IP 地址,它起作用了。

于 2018-02-08T16:20:25.467 回答
0

您看到的这个错误Error: listen EADDRINUSE :::8080表明您已经在 PORT 8080 上运行了一个进程 - 它可能是 Composer Playground。其中一个配置文件允许您指定资源管理器运行的端口。

如果您使用 MultiOrg 的“标准”作曲家教程,那么它使用grpcs,因此需要修改这些 URL,并且需要为对等方添加 tlscerts(请参阅这些连接.json 文件)

于 2018-02-07T12:06:24.810 回答