Uploaded image for project: 'Blockchain Explorer'
  1. Blockchain Explorer
  2. BE-676

Explorer not able to connect orderer from docker.

    Details

      Description

      When running hyperledger in docker not able to connect to orderer. It tries to connect to orderer to localhost:7050. I have provided the certificate in the connection-profile/ctb.json.

       

      Error

      initializeChannelFromDiscover mychannel
      FabricClient.discover_results endpoint { host: 'orderer.example.com', port: 7050 }

      initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer.example.com:7050

      2019-07-01T19:31:03.622Z - [31merror[39m: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050
      SyncServices.synchNetworkConfigToDB client ctb channel_name mychannel
      2019-07-01T19:31:06.637Z - [31merror[39m: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:7050
      <<<<<<<<<<<<<<<<<<<<<<<<<< Synchronizer Error >>>>>>>>>>>>>>>>>>>>>

      Unknown macro: { Error}

      <<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor >>>>>>>>>>>>>>>>>>>>>

       

      Dockerfile

      FROM node:10.15.1
      MAINTAINER Harsh Jain <harsh-98.github.io>
      
      EXPOSE 8080
      
      RUN git clone --single-branch -b master https://github.com/hyperledger/blockchain-explorer ; cd /blockchain-explorer ; git checkout 863278adb9d8c; rm -rf /blockchain-explorer/client
      
      WORKDIR /blockchain-explorer
      
      
      RUN npm install
      

      docker-compose.yaml

      container_name: server.explorer.com
      image: hlf-explorer-server:1.0
      tty: true
      stdin_open: true
      volumes:
      - ./config.json:/blockchain-explorer/app/platform/fabric/config.json
      - ./ctb.json:/blockchain-explorer/app/platform/fabric/connection-profile/ctb.json
      - ./explorerconfig.json:/blockchain-explorer/app/explorerconfig.json
      - ../server/wallet/admin:/blockchain-explorer/wallet/ctb/admin
      - ./logs:/blockchain-explorer/logs
      - ../crypto-config:/blockchain-explorer/crypto-config
      command: /bin/bash
      networks:
      - outside
      ports:
      - "8080:8080"
      

       

      connection-profile/ctb.json

      {
          "name": "ctb",
          "version": "1.0.0",
          "license": "Apache-2.0",
          "client": {
              "tlsEnable": true,
              "adminUser": "admin",
              "adminPassword": "adminpw",
              "enableAuthentication": true,
              "organization": "Org1",
              "connection": {
                  "timeout": {
                      "peer": {
                          "endorser": "300"
                      },
                      "orderer": "300"
                  }
              }
          },
          "channels": {
              "mychannel": {
                  "peers": {
                      "peer0.org1.example.com": {}
                  },
                  "connection": {
                      "timeout": {
                          "peer": {
                              "endorser": "6000",
                              "eventHub": "6000",
                              "eventReg": "6000"
                          }
                      }
                  }
              }
          },
          "organizations": {
              "Org1": {
                  "mspid": "Org1MSP",
                  "peers": ["peer0.org1.example.com"]
              }
          },
          "peers": {
              "peer0.org1.example.com": {
                  "tlsCACerts": {
                      "path": "/blockchain-explorer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
                  },
                  "url": "grpcs://peer0.org1.example.com:7051",
                  "grpcOptions": {
                      "ssl-target-name-override": "peer0.org1.example.com"
                  }
              }
      },
      "orderers": {
      "orderer.example.com": {
      "url": "grpcs://orderer.example.com:7050",
      "tlsCACerts": {
      "path": "/blockchain-explorer/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
      },
      "grpcOptions": {
      "ssl-target-name-override": "orderer.example.com",
                      "grpc.http2.keepalive_time": 360,
                      "grpc.keepalive_time_ms": 360000,
                      "grpc.http2.keepalive_timeout": 180,
                      "grpc.keepalive_timeout_ms": 180000
      }
      }
      },
      "OrdererMSP": {
      "mspid": "OrdererMSP",
      "adminPrivateKey": {
      "path":
      "/blockchain-explorer/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore"
      }
      }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              nekia Atsushi Katada
              Reporter:
              harsh-98 harsh jain
              Watchers:
              Agustina Busto, Atsushi Katada, harsh jain, Nik Frunza
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: