【问题标题】:hyperledger explorer error problem reading the PEM file :: Error: EISDIR读取 PEM 文件的 hyperledger explorer 错误问题 :: Error: EISDIR
【发布时间】:2018-12-27 19:00:27
【问题描述】:

我正在尝试为我的 fabric 1.3 网络运行 hyperledger explorer。

超级账本结构配置:

  • 2 个组织
  • 每个组织下有2个同行
  • 2 个订购者
  • 4 个 kafka 和 3 个 zookeeper

这些使用 docker swarm 和覆盖网络在 3 个 aws 虚拟机下运行。

我的超级账本浏览器配置:

   {
  "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": {},
            "peer1.org1.example.com": {},
            "peer0.org2.example.com": {},
            "peer1.org2.example.com": {}
          },
          "connection": {
            "timeout": {
              "peer": {
                "endorser": "6000",
                "eventHub": "6000",
                "eventReg": "6000"
              }
            }
          }
        }
      },
      "organizations": {
        "Org1MSP": {
          "mspid": "Org1MSP",
          "fullpath": true,
          "adminPrivateKey": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
          },    
          "signedCert": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
          }
        },
        "Org2MSP": {
          "mspid": "Org2MSP",
          "adminPrivateKey": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore"
          }
        },
        "OrdererMSP": {
          "mspid": "OrdererMSP",
          "adminPrivateKey": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
          }
        }
      },
      "peers": {
        "peer0.org1.example.com": {
          "tlsCACerts": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
          },
          "url": "grpcs://172.31.15.22:7051",
          "eventUrl": "grpcs://172.31.15.22:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
          }
        },
        "peer1.org1.example.com": {
          "tlsCACerts": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
          },
          "url": "grpcs://172.31.15.22:8051",
          "eventUrl": "grpcs://172.31.15.22:8053",
          "grpcOptions": {
            "ssl-target-name-override": "peer1.org1.example.com"
          }
        },
        "peer0.org2.example.com": {
          "tlsCACerts": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
          },
          "url": "grpcs://172.31.0.27:9051",
          "eventUrl": "grpcs://172.31.0.27:9053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org2.example.com"
          }
        },
        "peer1.org2.example.com": {
          "tlsCACerts": {
            "path":
              "/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
          },
          "url": "grpcs://172.31.0.27:10051",
          "eventUrl": "grpcs://172.31.0.27:10053",
          "grpcOptions": {
            "ssl-target-name-override": "peer1.org2.example.com"
          }
        }
      },
      "orderers": {
        "orderer0.example.com": {
          "url": "grpcs://172.31.15.22:7050"
        },
        "orderer1.example.com": {
          "url": "grpcs://172.31.0.27:8050"
        }
      }
    }
  },
  "configtxgenToolPath": "/home/ubuntu/efsmount/mynetwork/bin",
  "license": "Apache-2.0"
}

错误日志:

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
error: [NetworkConfig101.js]: NetworkConfig101 - problem reading the PEM file :: Error: EISDIR: illegal operation on a directory, read
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
{ Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at Object.fs.readFileSync (fs.js:583:19)
    at readFileSync (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:418:17)
    at getPEMfromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:407:13)
    at NetworkConfig_1_0.getOrganization (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:263:18)
    at Client._setAdminFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/Client.js:1221:53)
    at Client.loadFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/Client.js:129:9)
    at FabricClient.LoadClientFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/app/platform/fabric/FabricClient.js:215:27)
    at FabricClient.initialize (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/app/platform/fabric/FabricClient.js:53:16) errno: -21, code: 'EISDIR', syscall: 'read' }
(node:26776) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections

我已按照以下所有步骤:https://github.com/hyperledger/blockchain-explorer 配置、构建和启动资源管理器。

任何帮助将不胜感激。

【问题讨论】:

    标签: hyperledger-fabric hyperledger hyperledger-explorer


    【解决方案1】:

    找到问题了。

    我必须在配置文件中传递密钥文件名,即 /home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore /{此处为关键文件名}

    【讨论】:

    • 我在运行 hyperledger calibre 时遇到了类似的错误。请你帮助我好吗。错误:[NetworkConfig101.js]:NetworkConfig101 - 读取 PEM 文件时出现问题 :: 错误:ENOENT:没有这样的文件或目录,打开 '/home/omar/caliper-benchmarks/networks/fabric/config_solo/crypto-config/peerOrganizations/ org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem' p:错误:ENOENT:没有这样的文件或目录,打开'/home/omar/caliper-benchmarks/networks/fabric /config_solo/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem
    • 确保你有这个密钥文件:'/home/omar/caliper-benchmarks/networks/fabric/config_solo/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1。 example.com/msp/keystore/key.pem
    猜你喜欢
    • 2019-12-25
    • 1970-01-01
    • 1970-01-01
    • 2013-12-23
    • 2015-08-19
    • 2012-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多