Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true #132

Open
HelmiTrabelsi opened this issue Nov 17, 2020 · 5 comments
Labels
Fabric question Further information is requested

Comments

@HelmiTrabelsi
Copy link

I am running caliper 0.4.0 with a pre-configured fabric network 2.1 and I get this error: Error: Failed to connect before the deadline on Endorser- name: peer0.org1.example.com, url:grpcs://localhost:7051, connected:false, connectAttempted:true

@MUKESHBADIGINENI
Copy link

I'm also facing the same issue while deploying the smart contract, please let me know if you solved it.

@bellaj
Copy link

bellaj commented Apr 19, 2021

@MUKESHBADIGINENI You can look into the peer0 container's log
you'll probably find

[core.comm] ServerHandshake -> ERRO 077 Server TLS handshake failed in 2.193318ms with error EOF server=PeerServer remoteaddress=172.20.0.1:48646

Try first to correctly define the following parameters :

export FABRIC_CFG_PATH=/home/user/fabric-samples/config/
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_LOCALMSPID="Org1MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
export CORE_PEER_ADDRESS=localhost:7051

Therefore to solve the problem you should use the right connection profile

@Jehosua97
Copy link

The problems is that you have multiple containers and they are not in the same network. Try to enter to the bash of one of the docker container and ping the node peer0.org1.example.com. if the ping fails, join the dockers in the same network and allow external connections. Here is my configuration of docker-compose.yaml in ./Explorer folder

version: "2.1"
volumes:
  data:
  walletstore:
networks:
  artifacts_test:
   external: true
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:
      - data:/var/lib/postgresql/data
    networks:
      - artifacts_test
  explorer.mynetwork.com:
    image: hyperledger/explorer:1.1.1
    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
      - ./examples/net1/crypto:/tmp/crypto
      - walletstore:/opt/wallet
      - ./crypto-config/:/etc/data
    command: sh -c "node /opt/explorer/main.js && tail -f /dev/null"
    ports:
      - 8080:8080
    depends_on:
      explorerdb.mynetwork.com:
        condition: service_healthy
    networks:
      - atifacts_test

@davidkel davidkel added the question Further information is requested label Jan 17, 2022
@sadityakumar9211
Copy link

Is this issue resolved?

@sadityakumar9211
Copy link

@Jehosua97 I tried to ping and the ping is working fine. I am getting the same error. I don't know what is the exact cause of this. I would love your help in figuring this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fabric question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants