Исследователь Hyperledger [DEBUG] FabricClient - Администратор не найден для grpc: // localhost: 7051 - PullRequest
0 голосов
/ 26 октября 2018

Невозможно настроить обозреватель 3.8 с фабрикой 1.2 Я пытаюсь интегрировать проводник гиперледжера с фабрикой, и я не использую TLS, в моем случае это false.Может кто-нибудь, пожалуйста, помогите мне здесь.

Исследователь Hyperledger 3.8

Ткань Hyperledger 1.2

Узел js v8.11.4

postgresql 9.5

logs / console / console.log

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
(node:28473) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead

Please open web browser to access :http://localhost:8080/

pid is 28473

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer

Sync process is started for the network : [net_basic] and client : [org1]
(node:28493) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
<<<<<<<<<<<<<<<<<<<<<<<<<< Synchronizer Error >>>>>>>>>>>>>>>>>>>>>
Error :  [ 'Failed to connect client peer, please check the configuration and peer status' ]
<<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor >>>>>>>>>>>>>>>>>>>>>

logs / app / app.log

[2018-10-26 10:20:35.233] [DEBUG] FabricClient - Channel genesis hash for channel [mychannel] >> ac4b7048da8b35c7b740babcb4dd8f911c94a15e45f442d5f6291a66f9b5ec5d
[2018-10-26 10:20:35.233] [DEBUG] FabricClient - Initialized channel >> mychannel
[2018-10-26 10:20:35.244] [DEBUG] FabricClient - Set client [cli] default orderer as  >> grpc://localhost:7050
[2018-10-26 10:20:35.245] [DEBUG] FabricClient - Admin peer Not found for grpc://localhost:7051

и здесьмой конфиг.json

{
"network-configs": {
    "net_basic": {
        "version": "1.0",
        "clients": {
            "org1": {
                "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": "9000",
                            "eventHub": "9000",
                            "eventReg": "9000"
                        }
                    }
                }
            }
        },
        "organizations": {
            "Org1MSP": {
                "mspid": "Org1MSP",
                "fullpath": false,
                "adminPrivateKey": {
                    "path": "/education/Example/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore"
                },
                "signedCert": {
                    "path": "/education/Example/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
                }
            },
            "OrdererMSP": {
                "mspid": "OrdererMSP",
                "adminPrivateKey": {
                    "path": "/education/Example/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
                }
            }
        },
        "peers": {
            "peer0.org1.example.com": {
                "tlsCACerts": {
                    "path": "/education/Example/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
                },
                "url": "grpc://localhost:7051",
                "eventUrl": "grpc://localhost:7053",
                "grpcOptions": {
                    "ssl-target-name-override": "peer0.org1.example.com"
                }
            }
        },
        "orderers": {
            "orderer.example.com": {
                "url": "grpc://localhost:7050"
            }
        }
    },
    "network-2": {}
  },
"configtxgenToolPath": "/home/ubuntu/user/binaries/fabric-samples/bin/",
"license": "Apache-2.0"
}

Ответы [ 2 ]

0 голосов
/ 28 октября 2018

Попробуйте добавить последнюю строку (CORE_PEER_GOSSIP_EXTERNALENDPOINT)

peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer
environment:
  - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  - CORE_PEER_ID=peer0.org1.example.com
  - CORE_LOGGING_PEER=info
  - CORE_CHAINCODE_LOGGING_LEVEL=info
  - CORE_PEER_LOCALMSPID=Org1MSP
  - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
  - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
  - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051

в соответствующем docker-compose.yml, который описывает сеть. Без этой строки кажется, что пэр виден только внутри организации. Вам также необходимо ./generate.sh и ./start.sh вашей сети. Надеюсь, это поможет.

0 голосов
/ 26 октября 2018

Настройте соединение с фабрикой, обновив blockchain-explorer / app / platform / fabric / config.json, см. Инструкции в README, найдите «## Fabric Configure Hyperledger Explorer».

...