我的设置:运行在boot2docker vm中的Hazelcast docker容器(托管在windows上,是的,端口5701被转发)。这是榛子3.4.2。
当我尝试将一个简单的java客户端连接到这个hazelcast实例时,我得到一个:
avr. 01, 2015 10:52:03 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is STARTING
avr. 01, 2015 10:52:04 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is STARTED
avr. 01, 2015 10:52:06 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is CLIENT_CONNECTED
avr. 01, 2015 10:52:06 PM com.hazelcast.client.spi.impl.ClusterListenerThread
INFOS:
Members [1] {
Member [172.17.42.1]:5701
}
avr. 01, 2015 10:53:46 PM com.hazelcast.client.spi.ClientPartitionService
GRAVE: Error while fetching cluster partition table!
java.io.IOException: java.util.concurrent.TimeoutException
at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl.getOrConnect(Cli entConnectionManagerImpl.java:337)
...
Exception in thread "main" java.lang.IllegalStateException: Cannot get initial partitions!
at com.hazelcast.client.spi.impl.ClientPartitionServiceImpl.getInitialPartitions(ClientPartitionServiceImpl.java:89)
at com.hazelcast.client.spi.impl.ClientPartitionServiceImpl.start(ClientPartitionServiceImpl.java:65)
at com.hazelcast.client.impl.HazelcastClientInstanceImpl.start(HazelcastClientInstanceImpl.java:189)
at ...
avr. 01, 2015 10:56:35 PM com.hazelcast.client.spi.impl.ClusterListenerThread
AVERTISSEMENT: Error while listening cluster events! -> ClientConnection{live=true, writeHandler=com.hazelcast.client.connection.nio.ClientWriteHandler@3a2f22ed, readHandler=com.hazelcast.client.connection.nio.ClientReadHandler@6b7cdede, connectionId=1, socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[connected local=/127.0.0.1:64753 remote=/127.0.0.1:5701]}, remoteEndpoint=Address[172.17.42.1]:5701}, Error: java.io.EOFException: Remote socket closed!
avr. 01, 2015 10:56:35 PM com.hazelcast.client.connection.nio.ClientConnection
AVERTISSEMENT: Connection [null] lost. Reason: Socket explicitly closed
avr. 01, 2015 10:56:35 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is CLIENT_DISCONNECTED
avr. 01, 2015 10:56:43 PM com.hazelcast.client.spi.impl.ClusterListenerThread
AVERTISSEMENT: Unable to get alive cluster connection, try in 0 ms later, attempt 1 of 2.
avr. 01, 2015 10:56:50 PM com.hazelcast.client.spi.impl.ClusterListenerThread
AVERTISSEMENT: Unable to get alive cluster connection, try in 0 ms later, attempt 2 of 2.
avr. 01, 2015 10:56:50 PM com.hazelcast.client.spi.impl.ClusterListenerThread
GRAVE: Error while connecting to cluster!
java.lang.IllegalStateException: Unable to connect to any address in the config! The following addresses were tried:[/127.0.0.1:5701, /172.17.42.1:5701, /127.0.0.1:5702, /127.0.0.1:5703]
at com.hazelcast.client.spi.impl.ClusterListenerThread.connectToOne(ClusterListenerThread.java:286)
at com.hazelcast.client.spi.impl.ClusterListenerThread.run(ClusterListenerThread.java:89)
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:111)
at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$ConnectionProcessor.call(ClientConnectionManagerImpl.java:386)
at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl$ConnectionProcessor.call(ClientConnectionManagerImpl.java:353)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.hazelcast.util.executor.CompletableFutureTask.run(CompletableFutureTask.java:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:92)
avr. 01, 2015 10:56:50 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is SHUTTING_DOWN
avr. 01, 2015 10:56:50 PM com.hazelcast.core.LifecycleService
INFOS: HazelcastClient[hz.client_0_test][3.4.2] is SHUTDOWN
总而言之:客户机似乎看到了集群及其成员,但接下来发生的事情阻止了连接按预期工作。
知道吗?
我想您的问题是,Hazelcast节点的内部地址和外部地址不同,并且该节点尽管可以通过NAT访问,但拒绝接受公共地址上的请求。您可以使用配置来配置公有地址:http://docs.hazelcast.org/docs/3.4/manual/html-single/hazelcast-documentation.html#public-address(参见上面的示例)。
我很担心,因为我在启动Hazelcast实例后会得到以下跟踪日志: 使用最新版本的Hazelcast 3.7进行测试,但使用3.6进行测试,并在多播环境中使用默认的Hazelcast配置 到底是什么意思?这是有问题的征兆? 谢谢你
我正在尝试创建一个Hazelcast服务项目,在该项目中,我将订阅一个RDBMS(Oracle DB12C)数据存储,使用反射动态创建一个POJO/Java Bean,然后解析该Java Bean对象,将JDBC ResultSet作为结果行值映射到Java Bean对象中,并将这些映射对象加载到分布式映射中。 我检查了试图加载到Hazelcast IMap中的两个表的数据量,发现它们的数据量低至
我正在使用hazelcast集群的两个成员运行一个POC,使用3.4.1版本的hazelcast。我观察到一个奇怪的行为,其中一个成员不断抛出WrongTargetException。这是一个罕见的场景,我能够通过以下事件序列复制: 假设我运行的集群有两个成员,比如X和Y。 从集群中拔出Y,使其变得无响应。 X认为Y没有响应,因此将其从集群中删除。 再次插入Y,Y假设它没有收到来自X的任何响应/心
我试图创建一个Hazelcast服务项目,其中我将订阅一个RDBMS(Oracle DB 12c)数据存储,使用反射动态创建一个POJO/JavaBean,然后解析JavaBean对象以映射JDBC ResultSet作为结果行值放入JavaBean对象,并将这些映射对象加载到分布式映射中。 我检查了两个表的数据量,我试图从这两个表加载在Hazelcast IMap中,它低至0.0625和0.03
我正在进行一个Spring启动项目,我使用Hazelcast作为缓存。我启用了tcp作为连接方法,我还提到了一些成员。会员可以加入。但问题是其他节点也可以加入除了成员。有人能告诉我如何限制它吗? 这是我的配置,
对于我的暑期实习项目,我正在尝试在多个节点上分配作业。但是,我想根据谓词(cpu使用情况)以编程方式创建自定义集群组,就像在Apache Ignite中一样。我的公司已经使用Hazelcast IMDG。Hazelcast是否提供类似的功能?我知道我可以根据组名称创建不同的Hazelcast实例,但有没有办法使用cpu指标在Hazelcast中创建自定义集群组?