Hyperledger fabric 无法使用一个节点设置hyperledger explorer(如基本网络示例)

Hyperledger fabric 无法使用一个节点设置hyperledger explorer(如基本网络示例),hyperledger-fabric,hyperledger-explorer,Hyperledger Fabric,Hyperledger Explorer,是否有人使用基本网络示例设置hyperledger explorer(使用第一个网络设置hyperledger explorer)。在这种情况下,它不会占用我的同行/渠道。该配置可与四个对等方和一个具有两个Org(第一个网络)的订购方配合使用,但我似乎无法仅与一个对等方配合使用。任何帮助都将不胜感激 结构版本:1.2 资源管理器版本:3.7.1 config.json(实际文件格式良好):- 首先,关于配置文件的一些建议: tlsEnable应为false-基本网络示例不使用TLS 所有URL

是否有人使用基本网络示例设置hyperledger explorer(使用第一个网络设置hyperledger explorer)。在这种情况下,它不会占用我的同行/渠道。该配置可与四个对等方和一个具有两个Org(第一个网络)的订购方配合使用,但我似乎无法仅与一个对等方配合使用。任何帮助都将不胜感激

结构版本:1.2 资源管理器版本:3.7.1

config.json(实际文件格式良好):-


首先,关于配置文件的一些建议:

  • tlsEnable应为false-基本网络示例不使用TLS
  • 所有URL都应使用grpc-grpc仅在启用TLS时使用
  • 所有URL都应该使用localhost-假设您的路径条目正确,看起来您是在本地运行Explorer(即,不是在容器中)。在这种情况下,所有地址都应该使用localhost
您还需要编辑基本网络使用的
docker compose.yml
文件,以添加以下内容:

services: 
  peer0.org1.example.com: 
      environment:
        - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
否则,对等方将拒绝来自其自身组织外部的所有连接

通过将此更改应用于
docker compose.yml
,我能够按照说明,使用名为
basic network
的配置文件夹和以下命令,在docker容器中成功部署Explorer 3.7:

./deploy_explorer.sh basic-network net_basic
并使用
区块链资源管理器/examples/basic network
中的以下
config.json
文件:

{
  "network-configs": {
    "network-1": {
      "version": "1.0",
      "clients": {
        "client-1": {
          "tlsEnable": false,
          "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"
              }
            }
          }
        }
      },
      "organizations": {
        "Org1MSP": {
          "mspid": "Org1MSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
          },
          "signedCert": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
          }
        },
        "OrdererMSP": {
          "mspid": "OrdererMSP",
          "adminPrivateKey": {
            "path":
              "/tmp/crypto/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
          }
        }
      },
      "peers": {
        "peer0.org1.example.com": {
          "tlsCACerts": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
          },
          "url": "grpc://peer0.org1.example.com:7051",
          "eventUrl": "grpc://peer0.org1.example.com:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
          }
        }
      },
      "orderers": {
        "orderer.example.com": {
          "url": "grpc://orderer.example.com:7050"
        }
      }
    }
  },
  "configtxgenToolPath": "/home/fabric-path/workspace/fabric-samples/bin",
  "license": "Apache-2.0"
}
如果按照上述说明操作后仍有问题,请发布区块链资源管理器报告的任何错误的详细信息,以及区块链资源管理器日志文件(app.log)。在使用docker部署脚本时,可以使用以下命令查看这些脚本:

docker logs blockchain-explorer
docker exec -t blockchain-explorer cat /opt/logs/app/app.log

首先,关于配置文件的一些建议:

  • tlsEnable应为false-基本网络示例不使用TLS
  • 所有URL都应使用grpc-grpc仅在启用TLS时使用
  • 所有URL都应该使用localhost-假设您的路径条目正确,看起来您是在本地运行Explorer(即,不是在容器中)。在这种情况下,所有地址都应该使用localhost
您还需要编辑基本网络使用的
docker compose.yml
文件,以添加以下内容:

services: 
  peer0.org1.example.com: 
      environment:
        - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
否则,对等方将拒绝来自其自身组织外部的所有连接

通过将此更改应用于
docker compose.yml
,我能够按照说明,使用名为
basic network
的配置文件夹和以下命令,在docker容器中成功部署Explorer 3.7:

./deploy_explorer.sh basic-network net_basic
并使用
区块链资源管理器/examples/basic network
中的以下
config.json
文件:

{
  "network-configs": {
    "network-1": {
      "version": "1.0",
      "clients": {
        "client-1": {
          "tlsEnable": false,
          "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"
              }
            }
          }
        }
      },
      "organizations": {
        "Org1MSP": {
          "mspid": "Org1MSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
          },
          "signedCert": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
          }
        },
        "OrdererMSP": {
          "mspid": "OrdererMSP",
          "adminPrivateKey": {
            "path":
              "/tmp/crypto/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
          }
        }
      },
      "peers": {
        "peer0.org1.example.com": {
          "tlsCACerts": {
            "path":
              "/tmp/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
          },
          "url": "grpc://peer0.org1.example.com:7051",
          "eventUrl": "grpc://peer0.org1.example.com:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
          }
        }
      },
      "orderers": {
        "orderer.example.com": {
          "url": "grpc://orderer.example.com:7050"
        }
      }
    }
  },
  "configtxgenToolPath": "/home/fabric-path/workspace/fabric-samples/bin",
  "license": "Apache-2.0"
}
如果按照上述说明操作后仍有问题,请发布区块链资源管理器报告的任何错误的详细信息,以及区块链资源管理器日志文件(app.log)。在使用docker部署脚本时,可以使用以下命令查看这些脚本:

docker logs blockchain-explorer
docker exec -t blockchain-explorer cat /opt/logs/app/app.log