在使用./createdb.sh设置postgresql并运行./main.sh安装没有问题后,我目前在基本的第一网络上运行hyperledger explorer时遇到了问题,我碰巧坚持使用./main.sh测试命令,显示的错误如下:
PS :我还编辑了如下所示的explorerconfig.json,我还在postgrespgtest.js上做了一些修改。
explorerconfig.json
{
    "persistence": "postgreSQL",
    "platforms": ["fabric"],
    "postgreSQL": {
        "host": "127.0.0.1",
        "port": "5432",
        "database": "fabricexplorer",
        "username": "postgres",
        "passwd": "1234"
    },
    "sync": {
        "type": "local",
        "platform": "fabric",
        "blocksSyncTime": "1"
    },
    "jwt": {
        "secret": "a secret phrase!!",
        "expiresIn": "2h"
    }
}具有以下功能:
postgrespgtest.js
...
const options = {
    testdb: 'pgtestdb',
    messages: false,
    connection: {
        host: pgconfig.host,
        port: pgconfig.port,
        user: 'postgres',
        password: '1234'
    }
};
...带有错误消息:
# Test Results
ok 1 DROP USER IF EXISTS testuser;
not ok 2 WITH PASSWORD 'password';
---
operator: fail
at: <anonymous> (/home/ec2-user/blockchain-explorer/app/test/postgrespgtest.js:2:5157)
stack: |-
  Error: WITH PASSWORD '1234';
      at Test.assert [as _assert] (/home/ec2-user/blockchain-explorer/app/test/node_modules/tape/lib/test.js:226:54)
      at Test.bound [as _assert] (/home/ec2-user/blockchain-explorer/app/test/node_modules/tape/lib/test.js:77:32)
      at Test.fail (/home/ec2-user/blockchain-explorer/app/test/node_modules/tape/lib/test.js:319:10)
      at Test.bound [as fail] (/home/ec2-user/blockchain-explorer/app/test/node_modules/tape/lib/test.js:77:32)
      at /home/ec2-user/blockchain-explorer/app/test/postgrespgtest.js:2:5157
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
 ...(many more errors)有没有人知道可能是什么导致了这个问题?附言:如果没有足够的资源,请发表意见,我会尽我所能给你
发布于 2020-01-07 11:12:06
试着清理一下,再重建一次,然后做测试。
./main.sh clean
./main.sh install
./main.sh test如果还是这样,请让我知道。
https://stackoverflow.com/questions/58683756
复制相似问题