Hi Yi, Thanks a lot for your reply. I don't doubt we can get it to work by mucking with the networking configuration, but to me this feels like a workaround, not a solution. InetAddress.getLocalHost().getHostAddress() is not a reliable way of obtaining an IP that other machines can connect to. Just today I tested on several Linux distros and it did not work on any of them. Can we do something more robust here? How does the container communicate status to the AM?
-Tommy ________________________________________ From: Yi Pan [nickpa...@gmail.com] Sent: Thursday, July 30, 2015 6:48 PM To: dev@samza.apache.org Subject: Re: Coordinator URL always 127.0.0.1 Hi, Tommy, I think that it might be a commonly asked question regarding to multiple IPs on a single host. A common trick w/o changing code is (copied from SO: http://stackoverflow.com/questions/2381316/java-inetaddress-getlocalhost-returns-127-0-0-1-how-to-get-real-ip ) {code} 1. Find your host name. Type: hostname. For example, you find your hostname is mycomputer.xzy.com 2. Put your host name in your hosts file. /etc/hosts . Such as 10.50.16.136 mycomputer.xzy.com {code} -Yi On Thu, Jul 30, 2015 at 11:35 AM, Tommy Becker <tobec...@tivo.com> wrote: > We are testing some jobs on a YARN grid and noticed they are often not > starting up properly due to being unable to connect to the job coordinator. > After some investigation it seems as if the jobs are always getting a > coordinator URL of http://127.0.0.1:<port> But my understanding is that > the coordinator runs only in the AM, so I'd expect these URLs to more often > than not be to some other machine. Looking at the code however, I'm not > sure how that would ever happen since the URL for the coordinator always > comes from InetAddress.getLocalHost().getHostAddress() in > org.apache.samza.coordinator.server.HttpServer#getUrl > > Am I off base here? Because I don't see how this is ever going to work in > scenarios where the AM is on a different node than the containers. > > -- > Tommy Becker > Senior Software Engineer > > Digitalsmiths > A TiVo Company > > www.digitalsmiths.com<http://www.digitalsmiths.com> > tobec...@tivo.com<mailto:tobec...@tivo.com> > > ________________________________ > > This email and any attachments may contain confidential and privileged > material for the sole use of the intended recipient. Any review, copying, > or distribution of this email (or any attachments) by others is prohibited. > If you are not the intended recipient, please contact the sender > immediately and permanently delete this email and any attachments. No > employee or agent of TiVo Inc. is authorized to conclude any binding > agreement on behalf of TiVo Inc. by email. Binding agreements with TiVo > Inc. may only be made by a signed written agreement. > ________________________________ This email and any attachments may contain confidential and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments) by others is prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete this email and any attachments. No employee or agent of TiVo Inc. is authorized to conclude any binding agreement on behalf of TiVo Inc. by email. Binding agreements with TiVo Inc. may only be made by a signed written agreement.