Re: CORE_PEER_ADDRESS vs CORE_PEER_LISTENADDRESS
One more question.
I am assuming the CORE_PEER_CHAINCODEADDRESS and CORE_PEER_CHAINCODELISTENADDRESS are analogous to CORE_PEER_ADDRESS and CORE_PEER_LISTENADDRESS respectively i.e.,
whereas the CORE_PEER_LISTENADDRESS is the address the peer will listen on for communication from other peers and orderers the CORE_PEER_CHAINCODELISTENADDRESS is the address the peer will listen on for communication from chaincode container. And the logic for other two env variables is same.
So now the question is can one set CORE_PEER_LISTENADDRESS = CORE_PEER_CHAINCODELISTENADDRESS and CORE_PEER_ADDRESS = CORE_PEER_CHAINCODEADDRESS or will that create a problem. If yes, why?
From: Yacov Manevich <YACOVM@...>
Sent: Monday, January 27, 2020 11:33 AM
To: Siddharth Jain <siddjain@...>
Cc: fabric@... <fabric@...>
Subject: Re: [Hyperledger Fabric] CORE_PEER_ADDRESS vs CORE_PEER_LISTENADDRESS
What if your friend is abroad and you're calling his office phone, and he configured his office phone to redirect the call to his cellphone?
The listen address is the address the peer binds its socket. It can be 0.0.0.0 for instance.
The peer address is an address that the peer publishes to other peers in its organization via gossip.
Imagine that you have a VM and inside the VM you have a docker container that runs the peer.
The address of the docker container is 172.20.0.2 so you'd want to bind to this address.
However, other peers cannot reach your docker container via this address, and they need to use the VM's IP which can be like 10.0.0.2
So you'd want to configure your peer address to be the VM's external address and have a port forwarding rule.
From: "Siddharth Jain" <siddjain@...>
To: "fabric@..." <fabric@...>
Date: 01/27/2020 09:27 PM
Subject: [EXTERNAL] [Hyperledger Fabric] CORE_PEER_ADDRESS vs CORE_PEER_LISTENADDRESS
Sent by: fabric@...
from the docs w.r.t. CORE_PEER_ADDRESS it is said that this represents the endpoint to other peers in the same organization.
and CORE_PEER_LISTENADDRESS is The Address at local network interface this Peer will listen on.
So why would anyone want to set these two differently? If my friend's actual phone number is 123-456-7890 (the CORE_PEER_LISTENADDRESS) and the number I have in my phone book is 234-567-8901 (the CORE_PEER_ADDRESS) then there is bound to be a problem when I try to call my friend. So why does Fabric open up this possibility?