运行Hazelcast演示应用程序时遇到的问题

问题描述 投票:0回答:1

我是内存数据网格和Hazelcast的新手。我正在尝试在官方网站上的演示应用程序。

https://training.hazelcast.com/demo-getting-started-with-hazelcast-imdg/277088/scorm/f2u8hre5zf9p

它提到多次运行应用程序时,应将成员添加到同一群集中。

但是,第二次运行该程序时,似乎新成员未添加到同一群集中。

想知道我的设置是否有任何问题,谢谢。

环境:Eclipse IDEJDK 13hazelcast 3.12.2

第一轮:

Oct 07, 2019 8:35:55 PM com.hazelcast.instance.HazelcastInstanceFactory
WARNING: Hazelcast is starting in a Java modular environment (Java 9 and newer) but without proper access to required Java packages. Use additional Java arguments to provide Hazelcast access to Java internal API. The internal API access is used to get the best performance results. Arguments to be used:
 --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
Oct 07, 2019 8:35:55 PM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.2] Prefer IPv4 stack is true, prefer IPv6 addresses is false
Oct 07, 2019 8:35:55 PM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.2] Picked [192.168.0.211]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
Oct 07, 2019 8:35:56 PM com.hazelcast.system
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Hazelcast 3.12.2 (20190802 - e34b163) starting at [192.168.0.211]:5701
Oct 07, 2019 8:35:56 PM com.hazelcast.system
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
Oct 07, 2019 8:35:56 PM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Backpressure is disabled
Oct 07, 2019 8:35:56 PM com.hazelcast.instance.Node
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Creating MulticastJoiner
Oct 07, 2019 8:35:56 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Starting 16 partition threads and 9 generic threads (1 dedicated for priority tasks)
Oct 07, 2019 8:35:56 PM com.hazelcast.internal.diagnostics.Diagnostics
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
Oct 07, 2019 8:35:56 PM com.hazelcast.core.LifecycleService
INFO: [192.168.0.211]:5701 [dev] [3.12.2] [192.168.0.211]:5701 is STARTING
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hazelcast.internal.networking.nio.SelectorOptimizer (file:/Users/patrick/.m2/repository/com/hazelcast/hazelcast/3.12.2/hazelcast-3.12.2.jar) to field sun.nio.ch.SelectorImpl.selectedKeys
WARNING: Please consider reporting this to the maintainers of com.hazelcast.internal.networking.nio.SelectorOptimizer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Oct 07, 2019 8:35:58 PM com.hazelcast.internal.cluster.ClusterService
INFO: [192.168.0.211]:5701 [dev] [3.12.2] 

Members {size:1, ver:1} [
    Member [192.168.0.211]:5701 - 5d8492ad-df09-46fc-8420-5d00784204d9 this
]

Oct 07, 2019 8:35:58 PM com.hazelcast.core.LifecycleService
INFO: [192.168.0.211]:5701 [dev] [3.12.2] [192.168.0.211]:5701 is STARTED
Oct 07, 2019 8:35:58 PM com.hazelcast.internal.partition.impl.PartitionStateManager
INFO: [192.168.0.211]:5701 [dev] [3.12.2] Initializing cluster partition table arrangement...
Customer with key 1: Joe
Map Size: 3
First customer: Tom
Second Customer: Mary
Queue size: 2

第二轮:

Oct 07, 2019 8:39:31 PM com.hazelcast.instance.HazelcastInstanceFactory
WARNING: Hazelcast is starting in a Java modular environment (Java 9 and newer) but without proper access to required Java packages. Use additional Java arguments to provide Hazelcast access to Java internal API. The internal API access is used to get the best performance results. Arguments to be used:
 --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
Oct 07, 2019 8:39:31 PM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.2] Prefer IPv4 stack is true, prefer IPv6 addresses is false
Oct 07, 2019 8:39:31 PM com.hazelcast.instance.AddressPicker
INFO: [LOCAL] [dev] [3.12.2] Picked [192.168.0.211]:5702, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5702], bind any local is true
Oct 07, 2019 8:39:31 PM com.hazelcast.system
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Hazelcast 3.12.2 (20190802 - e34b163) starting at [192.168.0.211]:5702
Oct 07, 2019 8:39:31 PM com.hazelcast.system
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Copyright (c) 2008-2019, Hazelcast, Inc. All Rights Reserved.
Oct 07, 2019 8:39:31 PM com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Backpressure is disabled
Oct 07, 2019 8:39:32 PM com.hazelcast.instance.Node
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Creating MulticastJoiner
Oct 07, 2019 8:39:32 PM com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Starting 16 partition threads and 9 generic threads (1 dedicated for priority tasks)
Oct 07, 2019 8:39:32 PM com.hazelcast.internal.diagnostics.Diagnostics
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
Oct 07, 2019 8:39:32 PM com.hazelcast.core.LifecycleService
INFO: [192.168.0.211]:5702 [dev] [3.12.2] [192.168.0.211]:5702 is STARTING
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hazelcast.internal.networking.nio.SelectorOptimizer (file:/Users/patrick/.m2/repository/com/hazelcast/hazelcast/3.12.2/hazelcast-3.12.2.jar) to field sun.nio.ch.SelectorImpl.selectedKeys
WARNING: Please consider reporting this to the maintainers of com.hazelcast.internal.networking.nio.SelectorOptimizer
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Oct 07, 2019 8:39:34 PM com.hazelcast.internal.cluster.ClusterService
INFO: [192.168.0.211]:5702 [dev] [3.12.2] 

Members {size:1, ver:1} [
    Member [192.168.0.211]:5702 - 10c3d969-f060-4253-8260-5cfc3be87e0f this
]

Oct 07, 2019 8:39:34 PM com.hazelcast.instance.Node
WARNING: [192.168.0.211]:5702 [dev] [3.12.2] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
Oct 07, 2019 8:39:34 PM com.hazelcast.core.LifecycleService
INFO: [192.168.0.211]:5702 [dev] [3.12.2] [192.168.0.211]:5702 is STARTED
Oct 07, 2019 8:39:34 PM com.hazelcast.internal.partition.impl.PartitionStateManager
INFO: [192.168.0.211]:5702 [dev] [3.12.2] Initializing cluster partition table arrangement...
Customer with key 1: Joe
Map Size: 3
First customer: Tom
Second Customer: Mary
Queue size: 2



java hazelcast in-memory-data-grid
1个回答
0
投票

您也许在本地环境中安装了虚拟化软件? hazelcast的默认多播地址可能会发生冲突。尝试将地址更改为:224.0.0.1:

cfg.getNetworkConfig()。getJoin()。getMulticastConfig()。setMulticastGroup(“ 224.0.0.1”);

© www.soinside.com 2019 - 2024. All rights reserved.