我发现使用Karaf 4.1.5和Karaf Cellar 4.1.2的make群集包含10个带有IPv4连接的服务器。在第一步karaf安装和karaf地窖,然后hazelcast.xml文件编辑为在网络上配置IP接口。当在所有服务器上安装完成后,我在群集节点列表中找到了所有IP,但是当其中一个节点重新启动(停止然后启动)时,所有服务器上的hazelcast crash和cluster:*命令都无法识别。我在karaf.log文件中发现了有关hazelcast和TCP / IP连接异常错误的异常。这种经历一再重复。我想在关键项目中使用Karaf Cellar技术,而不是每次崩溃都会导致大问题!请指导我使用酒窖或告知我Karaf酒窖是否不可靠。
Hazelcast配置文件编辑如下:
<join>
<multicast enabled="false">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="true">
<interface>10.12.47.125</interface>
<interface>10.12.47.126</interface>
<interface>10.12.47.127</interface>
<interface>10.12.47.128</interface>
<interface>10.12.47.129</interface>
<interface>10.12.47.130</interface>
<interface>10.12.47.131</interface>
<interface>10.12.47.132</interface>
<interface>10.12.47.133</interface>
<interface>10.12.47.134</interface>
</tcp-ip>
<aws enabled="false">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<!--optional, default is us-east-1 -->
<region>us-west-1</region>
<!--optional, default is ec2.amazonaws.com. If set, region shouldn't be set as it will override this property -->
<host-header>ec2.amazonaws.com</host-header>
<!-- optional, only instances belonging to this group will be discovered, default will try all running instances -->
<security-group-name>hazelcast-sg</security-group-name>
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
karaf酒窖4.1.2与karaf 4.1.5不兼容。该问题的解决方案是将karaf更新为4.2.1或更高版本。