Re: [jgroups-users] Eclipselink cache coordination with JGroups in Docker in AWS

Questions/problems related to using JGroups <[email protected]> Fri, 3 Feb 2017 13:05:18 -0700 (MST)
Newsgroups gmane.comp.java.javagroups.general
Message-ID <[email protected]>
Hi, thanks for your reply. I decided to go for the S3_PING as discovery
mechanism. Since I run the application in Docker, I'm under the impression
that I must bind to the IP-address of the host so that the other instances
can connect to it. In AWS the IP of the host can be found with the following
command:
http://169.254.169.254/latest/meta-data/local-ipv4
I then use a sed command to stick the IP into the jgroups xml config file. 

Problem is that when I start up the application I get the following error: 
Internal Exception: Exception [EclipseLink-22118] (Eclipse Persistence
Services - 2.6.1.v20150605-31e8258):
org.eclipse.persistence.exceptions.RemoteCommandManagerException
Exception Description: Failed to create JGroups connection using config
file: /usr/local/glassfish4/glassfish/domains/domain1/config/jgroups.xml
Internal Exception: java.net.BindException: [TCP] /172.31.41.16 is not a
valid address on any local network interface. Please see server.log for more
details.
Command deploy failed.

I understand that since 172.31.41.16 is the IP of the host but not bound to
any local network interface on the container jgroups cannot bind to it, but
I have no clue how to resolve this. Is it any way around it ? 

When I run my container on my local machine it works if I run docker with
--net="host" so that the container
uses the host's networks stack, but in AWS Elastic Beanstalk I don't think I
have that option. 

Regards
Steinar  



--
View this message in context: http://jgroups.1086181.n5.nabble.com/jgroups-users-Eclipselink-cache-coordination-with-JGroups-in-Docker-in-AWS-tp11257p11268.html
Sent from the JGroups - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot