Не удается запустить Hyperledger Explorer с проверкой подлинности базы данных - PullRequest
0 голосов
/ 02 апреля 2019

При попытке вызвать приложение 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, но появляется та же ошибка. Пробовал использовать пустой пароль и все равно показывает ошибку. Любое руководство будет с благодарностью.

...