Amazon ec2 JGroups ec2群集无法与Hibernate Search/Infinispan安装程序连接(超时)

Amazon ec2 JGroups ec2群集无法与Hibernate Search/Infinispan安装程序连接(超时),amazon-ec2,amazon-elastic-beanstalk,hibernate-search,infinispan,jgroups,Amazon Ec2,Amazon Elastic Beanstalk,Hibernate Search,Infinispan,Jgroups,我正试图在我的Elastic Beanstalk(Tomcat8)环境中,使用Infinispan(8.2.4)和JGroups建立一个分布式Hibernate搜索(5.5.4)集群 我目前遇到一个问题,节点无法连接到现有集群,并且尝试连接时超时 Starting JGroups channel ISPN variable "${jgroups.s3.pre_signed_delete_url}" in S3_PING could not be substituted; pre_signed_d

我正试图在我的Elastic Beanstalk(Tomcat8)环境中,使用Infinispan(8.2.4)和JGroups建立一个分布式Hibernate搜索(5.5.4)集群

我目前遇到一个问题,节点无法连接到现有集群,并且尝试连接时超时

Starting JGroups channel ISPN
variable "${jgroups.s3.pre_signed_delete_url}" in S3_PING could not be substituted; pre_signed_delete_url is removed from properties
variable "${jgroups.s3.prefix}" in S3_PING could not be substituted; prefix is removed from properties
variable "${jgroups.s3.pre_signed_put_url}" in S3_PING could not be substituted; pre_signed_put_url is removed from properties
ip-172-31-24-216-1799: JOIN(ip-172-31-24-216-1799) sent to ip-172-31-14-33-238 timed out (after 5000 ms), on try 1
ip-172-31-24-216-1799: JOIN(ip-172-31-24-216-1799) sent to ip-172-31-14-33-238 timed out (after 5000 ms), on try 2
...
ip-172-31-24-216-1799: JOIN(ip-172-31-24-216-1799) sent to ip-172-31-14-33-238 timed out (after 5000 ms), on try 10
ip-172-31-24-216-1799: too many JOIN attempts (10): becoming singleton
ISPN000094: Received new cluster view for channel ISPN: [ip-172-31-24-216-Channel ISPN local address is ip-172-31-24-216-1799, physical addresses are [127.0.0.1:7800]
我已经在elastic beanstalk安全组中启用了所有类型的入站流量,并且可以使用内部IP地址成功ping组中的其他节点

这是我的infinispan.xml文件


jgroups配置文件是默认的ec2配置,它与Infinispan打包在一起


有没有人知道我哪里出了问题,或者我需要做些什么才能让它正常工作?

您的本地地址是127.0.0.1:7800,这是默认地址。如果您需要与其他节点通话,这肯定不起作用。

您的本地地址是127.0.0.1:7800,这是默认值。如果您需要与其他节点通话,这肯定不起作用。

您也可以在日志中看到这些消息:

variable "${jgroups.s3.pre_signed_delete_url}" in S3_PING could not be substituted; pre_signed_delete_url is removed from properties
variable "${jgroups.s3.prefix}" in S3_PING could not be substituted; prefix is removed from properties
variable "${jgroups.s3.pre_signed_put_url}" in S3_PING could not be substituted; pre_signed_put_url is removed from properties

您可能应该定义这些变量。

您还可以在日志中看到这些消息:

variable "${jgroups.s3.pre_signed_delete_url}" in S3_PING could not be substituted; pre_signed_delete_url is removed from properties
variable "${jgroups.s3.prefix}" in S3_PING could not be substituted; prefix is removed from properties
variable "${jgroups.s3.pre_signed_put_url}" in S3_PING could not be substituted; pre_signed_put_url is removed from properties

您可能应该定义这些变量。

谢谢,我还没有机会测试任何东西,但我假设这是您所说的default-jgroups-ec2.xml中的默认bind_addr值。我将尝试使用EC2MetataUtils获取私有IP,并设置“jgroups.tcp.address”系统属性我还没有机会使用EC2,但可能使用
hostname-I
提取IP地址并将其传递给应用程序就足够了。如果您知道EC2分配的IP地址类型,您可以使用
bind\u addr=match address:192.168.*
绑定到以192.168开头的任何地址。请参阅详细信息Hanks@BelaBan,我现在已经开始工作了。如上所述,我在应用程序初始化阶段(在hibernate搜索初始化之前)使用AWS java API中的EC2MetadataUtils获取私有IP并将其设置为系统属性(“jgroups.tcp.address”)。我认为这是最可靠的选择,因为IP块可能会在不同的地区发生变化或有所不同,并且在启动时将其作为参数传递给应用程序需要一些弹性beanstalk启动过程的技巧谢谢,我还没有机会测试任何东西,但我假设这是您所说的default-jgroups-ec2.xml值中的默认bind_addr。我将尝试使用EC2MetataUtils获取私有IP,并设置“jgroups.tcp.address”系统属性我还没有机会使用EC2,但可能使用
hostname-I
提取IP地址并将其传递给应用程序就足够了。如果您知道EC2分配的IP地址类型,您可以使用
bind\u addr=match address:192.168.*
绑定到以192.168开头的任何地址。请参阅详细信息Hanks@BelaBan,我现在已经开始工作了。如上所述,我在应用程序初始化阶段(在hibernate搜索初始化之前)使用AWS java API中的EC2MetadataUtils获取私有IP并将其设置为系统属性(“jgroups.tcp.address”)。我认为这是最健壮的选项,因为IP块可能会在不同区域之间发生变化或有所不同,在启动时将其作为参数传递给应用程序需要弹性beanstalk启动过程的一些技巧谢谢,但这些是可选值,在我为s3存储桶设置位置时不需要。目前没有从s3读/写的问题,只是节点之间相互连接谢谢,但是当我为s3存储桶设置位置时,这些是可选值,不是必需的。目前没有从s3读/写的问题,只是节点相互连接