title: Hyperledger Fabric Peer Connection error with Orderer
body: <p>I am trying to connect the peer with the orderer in the local machine.
  Here is what I have done so far.</p>
  
  <p>I started the Orderer after starting the Fabric CA Server</p>
  
  <pre><code>export ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
  export ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
  export ORDERER_GENERAL_LOCALMSPID=OrdererMSP
  export ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
  export ORDERER_GENERAL_LISTENADDRESS=192.168.2.103
  export ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
  export ORDERER_GENERAL_LOGLEVEL=debug
  export ORDERER_GENERAL_GENESISMETHOD=file
  export ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
  export FABRIC_CFG_PATH=/etc/hyperledger/fabric
  export ORDERER_GENERAL_TLS_ENABLED=true
  orderer
  </code></pre>
  
  <p>Then I am trying to start the fabric peer using this command.</p>
  
  <pre><code> export CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
   export CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
   export CORE_PEER_GOSSIP_ORGLEADER=false
   export CORE_PEER_PROFILE_ENABLED=true
   export CORE_PEER_LOCALMSPID=Org1MSP
   export CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
   export CORE_PEER_TLS_ENABLED=true
   export CORE_PEER_ID=peer0.org1.example.com
   export CORE_LOGGING_LEVEL=DEBUG
   export CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
   export FABRIC_CFG_PATH=/etc/hyperledger/fabric
   export CORE_PEER_ADDRESS=peer0.org1.example.com:7051
   export CORE_PEER_GOSSIP_USELEADERELECTION=true
  </code></pre>
  
  <p>I already copied the necessary files to the required directory as experter above after that I ran the command <code>peer node start</code>
  This command is giving me error </p>
  
  <blockquote>
    <p>2017-12-26 18:22:47.613 IST [deliveryClient] connect -> DEBU 32e
    Connected to  2017-12-26 18:22:47.613 IST [deliveryClient] connect ->
    ERRO 32f Failed obtaining connection: Could not connect to any of the
    endpoints: [orderer.example.com:7050] 2017-12-26 18:22:47.614 IST
    [deliveryClient] try -> WARN 330 Got error: Could not connect to any
    of the endpoints: [orderer.example.com:7050] ,at 8 attempt. Retrying
    in 2m8s</p>
  </blockquote>
  
  <p>On the orderer side I am getting this</p>
  
  <blockquote>
    <p>2017-12-26 18:24:55.617 IST [grpc] Printf -> DEBU 191 grpc: Server.Serve failed to complete security handshake from "192.168.2.103:56580": EOF</p>
  </blockquote>
  
  <p>Can anyone tell What i am doing wrong here?</p>
  
  <p>Thanks</p>