1

我在尝试启动 Hyperledger Explorer 应用程序时遇到问题。我按照此处所述的说明进行操作,但尝试启动该应用程序仍然失败。

我的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"
          }
        }
      }
    }
  },
  "certificateAuthorities":{
    "ca_peerOrg1":{},
    "ca_peerOrg2":{}
  },
  "organizations": {
    "Org1MSP": {
      "mspid": "Org1MSP",
      "fullpath": false,
      "adminPrivateKey": {
        "path": "/home/rodolfo/fabric-sample-with-kafka/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
      },
      "signedCert": {
        "path": "/home/rodolfo/fabric-sample-with-kafka/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
      },
      "certificateAuthorities": {
        "ca_peerOrg1":{
          "url":"grpcs://localhost:7054"
        }
      }
    },
    "Org2MSP": {
      "mspid": "Org2MSP",
      "adminPrivateKey": {
        "path": "/home/rodolfo/fabric-sample-with-kafka/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
      },
      "certificateAuthorities": {
        "ca_peerOrg2":{
          "url":"grpcs://localhost:8054"
        }
      }
    },
    "OrdererMSP": {
      "mspid": "OrdererMSP",
      "adminPrivateKey": {
        "path": "/home/rodolfo/fabric-sample-with-kafka/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
      }
    }
  },
  "peers": {
    "peer0.org1.example.com": {
      "tlsCACerts": {
        "path": "/home/rodolfo/fabric-sample-with-kafka/first-network/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:8051"
    },
    "peer0.org2.example.com": {
      "url": "grpcs://localhost:9051"
    },
    "peer1.org2.example.com": {
      "url": "grpcs://localhost:10051"
    }
  },
  "orderers": {
    "orderer0.example.com": {
      "url": "grpcs://localhost:7050"
    },
    "orderer1.example.com": {
      "url": "grpcs://localhost:8050"
    }
  }
},
  "network-2": {}
},
"configtxgenToolPath": "/home/rodolfo/fabric-sample-with-kafka/bin",
"license": "Apache-2.0"
}

我的explorerconfig.json文件:

{
"persistence": "postgreSQL",
"platforms": ["fabric"],
"postgreSQL": {
  "host": "127.0.0.1",
  "port": "5432",
"database": "fabricexplorer",
"username": "rodolfo",
"passwd": ""
},
"sync": {
  "type": "local",
  "platform": "fabric",
  "blocksSyncTime": "3"
}
}

我在日志中遇到的错误是:

postgres://rodolfo:@127.0.0.1:5432/fabricexplorer
error when connecting to db: { error: password authentication failed 
for user "rodolfo"...
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'port' of undefined
at Timeout.handleDisconnect [as _onTimeout] (/home/rodolfo/blockchain- 
explorer/app/persistence/postgreSQL/pgservice.js:48:32)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)


Please open web browser to access :http://localhost:8080/


pid is 10774

TypeError: Cannot read property 'port' of undefined
at Timeout.handleDisconnect [as _onTimeout] (/home/rodolfo/blockchain- 
explorer/app/persistence/postgreSQL/pgservice.js:48:32)
at ontimeout (timers.js:475:11)
at tryOnTimeout (timers.js:310:5)
at Timer.listOnTimeout (timers.js:270:5)
<<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor 
>>>>>>>>>>>>>>>>>>>>>

已经尝试在 PSQL 上更改我的用户的密码并在出现explorerconfig.json相同的错误时对其进行修改。尝试使用空白密码,但仍然显示错误。任何指导将不胜感激。

4

0 回答 0