hyperledger-explorer - 超级账本资源管理器设置和启动错误
问题描述
我一直在设置我的超级账本项目。
现在,fabric 正在运行并且已经安装和部署了我的链代码。
但是......超级账本资源管理器是我的问题。我一直设置失败..我不知道为什么...
请查看我的错误日志和 docker-compose.yaml、json 文件,并告诉我我错了什么。
错误日志
explorerdb.mynetwork.com | 2021-11-01 07:28:22.178 UTC [1] LOG: database system is ready to accept connections
explorer.mynetwork.com | false 'ssl-certs' '/opt/explorer/ssl-certs'
explorerdb.mynetwork.com | 2021-11-01 07:28:52.362 UTC [56] FATAL: role "hppoc" does not exist
explorer.mynetwork.com | error when connecting to db: { error: role "hppoc" does not exist
码头工人撰写
# SPDX-License-Identifier: Apache-2.0
version: '2.1'
volumes:
pgdata:
walletstore:
networks:
mynetwork.com:
external:
name: net_basic
services:
explorerdb.mynetwork.com:
image: hyperledger/explorer-db:latest
container_name: explorerdb.mynetwork.com
hostname: explorerdb.mynetwork.com
environment:
- DATABASE_DATABASE=fabricexplorer
- DATABASE_USERNAME=hppoc
- DATABASE_PASSWORD=password
healthcheck:
test: "pg_isready -h localhost -p 5432 -q -U postgres"
interval: 30s
timeout: 10s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- mynetwork.com
explorer.mynetwork.com:
image: hyperledger/explorer:latest
container_name: explorer.mynetwork.com
hostname: explorer.mynetwork.com
environment:
- DATABASE_HOST=explorerdb.mynetwork.com
- DATABASE_DATABASE=fabricexplorer
- DATABASE_USERNAME=hppoc
- DATABASE_PASSWD=password
- LOG_LEVEL_APP=debug
- LOG_LEVEL_DB=debug
- LOG_LEVEL_CONSOLE=info
- LOG_CONSOLE_STDOUT=true
- DISCOVERY_AS_LOCALHOST=false
volumes:
- ./config.json:/opt/explorer/app/platform/fabric/config.json
- ./connection-profile:/opt/explorer/app/platform/fabric/connection-profile
- ./crypto-config:/tmp/crypto
- walletstore:/opt/explorer/wallet
ports:
- 8080:8080
depends_on:
explorerdb.mynetwork.com:
condition: service_healthy
networks:
- mynetwork.com
测试网络.json
{
"name": "net_basic",
"version": "1.0.0",
"client": {
"tlsEnable": true,
"adminCredential": {
"id": "exploreradmin",
"password": "exploreradminpw"
},
"enableAuthentication": false,
"organization": "Org1MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"construction": {
"peers": {
"peer0.org1.produce.com": {}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"adminPrivateKey": {
"path": "/tmp/crypto/peerOrganizations/org1.produce.com/users/Admin@org1.produce.com/msp/keystore/d18828f12121b7251dcf460dc391aca47d9f82864817e91635703ca401e37244_sk"
},
"peers": ["peer0.org1.produce.com"],
"signedCert": {
"path": "/tmp/crypto/peerOrganizations/org1.produce.com/users/Admin@org1.produce.com/msp/signcerts/Admin@org1.produce.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.produce.com": {
"tlsCACerts": {
"path": "/tmp/crypto/peerOrganizations/org1.produce.com/peers/peer0.org1.produce.com/tls/ca.crt"
},
"url": "grpc://peer0.org1.produce.com:7051"
}
}
}
配置文件
{
"network-configs": {
"net_basic": {
"name": "net_basic",
"profile": "./connection-profile/test-network.json"
}
},
"license": "Apache-2.0"
}
我的文件夹目录是
explorer
./crypto-config/peerOrganizations/...
./connection-profile/test-network.json
./config.json
./docker-comopse.yaml
解决方案
推荐阅读
- docker - kubelet 版本高于控制平面版本
- javascript - Firebase 推送通知到不同的令牌组
- java - HttpClient 连接管理器关闭期间运行时异常的可能性?
- c# - C# 用空格解析命令行字符串。System.IO.Path 和 FileInfo 失败
- angular - 在 Firefox 上全屏打开 div
- c# - 我如何知道我何时单击了 UWP 上的退出按钮?
- java - 是否可以在 Firestore 中的对象数组中查询对象字段?
- vba - 创建 vba 代码以连接到远程 SQL 服务器,执行更新 accdb 文件上的表的存储过程
- html - 我可以在谷歌图表中将 x 轴和 y 轴都设为字符串吗?
- python-3.x - scrapinghub上传和使用文件