Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tomcat Can';我不能让Hazelcast在Docker Swarm工作_Tomcat_Docker_Hazelcast_Docker Swarm - Fatal编程技术网

Tomcat Can';我不能让Hazelcast在Docker Swarm工作

Tomcat Can';我不能让Hazelcast在Docker Swarm工作,tomcat,docker,hazelcast,docker-swarm,Tomcat,Docker,Hazelcast,Docker Swarm,我一直在尝试在运行Amazon EC2的Docker swarm中设置Hazelcast,用作Tomcat会话复制器(如果有人关注我的另一个问题:p,则后退,因为Amazon ELB的粘性会话设置拒绝工作),我正在尝试使用Hazelcast Tomcat会话管理器() 我有3个EC2节点,Docker Swarm正在运行(使用Docker for AWS设置),每个节点上运行一个Tomcat实例 我无法让每个Tomcat实例上的Hazelcast彼此对话。多播根本不起作用,TCP/IP会导致持续

我一直在尝试在运行Amazon EC2的Docker swarm中设置Hazelcast,用作Tomcat会话复制器(如果有人关注我的另一个问题:p,则后退,因为Amazon ELB的粘性会话设置拒绝工作),我正在尝试使用Hazelcast Tomcat会话管理器()

我有3个EC2节点,Docker Swarm正在运行(使用Docker for AWS设置),每个节点上运行一个Tomcat实例

我无法让每个Tomcat实例上的Hazelcast彼此对话。多播根本不起作用,TCP/IP会导致持续拒绝连接,即使一切都设置正确

以下是tomcat在尝试使用TCP/IP并手动指定IP地址时的错误输出:

25-Jul-2017 16:41:13.934 INFO [main] com.hazelcast.instance.DefaultAddressPicker.null [LOCAL] [dev] [3.8.3] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: [172.31.23.183, 172.31.8.28, 172.31.37.34]
25-Jul-2017 16:41:13.934 INFO [main] com.hazelcast.instance.DefaultAddressPicker.null [LOCAL] [dev] [3.8.3] Prefer IPv4 stack is true.
25-Jul-2017 16:41:13.936 WARNING [main] com.hazelcast.instance.DefaultAddressPicker.null [LOCAL] [dev] [3.8.3] Could not find a matching address to start with! Picking one of non-loopback addresses.
25-Jul-2017 16:41:13.939 INFO [main] com.hazelcast.instance.DefaultAddressPicker.null [LOCAL] [dev] [3.8.3] Picked [10.255.0.5]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is true
25-Jul-2017 16:41:13.949 INFO [main] com.hazelcast.system.null [10.255.0.5]:5701 [dev] [3.8.3] Hazelcast 3.8.3 (20170704 - 10e1449) starting at [10.255.0.5]:5701
25-Jul-2017 16:41:13.949 INFO [main] com.hazelcast.system.null [10.255.0.5]:5701 [dev] [3.8.3] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
25-Jul-2017 16:41:13.949 INFO [main] com.hazelcast.system.null [10.255.0.5]:5701 [dev] [3.8.3] Configured Hazelcast Serialization version : 1
25-Jul-2017 16:41:14.187 INFO [main] com.hazelcast.spi.impl.operationservice.impl.BackpressureRegulator.null [10.255.0.5]:5701 [dev] [3.8.3] Backpressure is disabled
25-Jul-2017 16:41:14.702 INFO [main] com.hazelcast.instance.Node.null [10.255.0.5]:5701 [dev] [3.8.3] Creating TcpIpJoiner
25-Jul-2017 16:41:14.865 INFO [main] com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.null [10.255.0.5]:5701 [dev] [3.8.3] Starting 2 partition threads
25-Jul-2017 16:41:14.866 INFO [main] com.hazelcast.spi.impl.operationexecutor.impl.OperationExecutorImpl.null [10.255.0.5]:5701 [dev] [3.8.3] Starting 3 generic threads (1 dedicated for priority tasks)
25-Jul-2017 16:41:14.877 INFO [main] com.hazelcast.core.LifecycleService.null [10.255.0.5]:5701 [dev] [3.8.3] [10.255.0.5]:5701 is STARTING
25-Jul-2017 16:41:14.914 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.8.28:5702, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.915 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.8.28:5702. Reason: SocketException[Connection refused to address /172.31.8.28:5702]
25-Jul-2017 16:41:14.915 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.8.28]:5702 is added to the blacklist.
25-Jul-2017 16:41:14.916 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.37.34:5701, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.917 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-4] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.23.183:5701, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.917 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.8.28:5701, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.917 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.8.28:5701. Reason: SocketException[Connection refused to address /172.31.8.28:5701]
25-Jul-2017 16:41:14.917 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.8.28]:5701 is added to the blacklist.
25-Jul-2017 16:41:14.918 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.37.34:5701. Reason: SocketException[Connection refused to address /172.31.37.34:5701]
25-Jul-2017 16:41:14.918 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-3] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.37.34]:5701 is added to the blacklist.
25-Jul-2017 16:41:14.918 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-4] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.23.183:5701. Reason: SocketException[Connection refused to address /172.31.23.183:5701]
25-Jul-2017 16:41:14.918 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-4] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.23.183]:5701 is added to the blacklist.
25-Jul-2017 16:41:14.918 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-2] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.8.28:5703, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.919 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-2] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.8.28:5703. Reason: SocketException[Connection refused to address /172.31.8.28:5703]
25-Jul-2017 16:41:14.919 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-2] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.8.28]:5703 is added to the blacklist.
25-Jul-2017 16:41:14.921 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.23.183:5702, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.922 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.23.183:5702. Reason: SocketException[Connection refused to address /172.31.23.183:5702]
25-Jul-2017 16:41:14.922 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.23.183]:5702 is added to the blacklist.
25-Jul-2017 16:41:14.923 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.37.34:5703, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.924 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.37.34:5703. Reason: SocketException[Connection refused to address /172.31.37.34:5703]
25-Jul-2017 16:41:14.924 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.37.34]:5703 is added to the blacklist.
25-Jul-2017 16:41:14.925 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.23.183:5703, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.926 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.23.183:5703. Reason: SocketException[Connection refused to address /172.31.23.183:5703]
25-Jul-2017 16:41:14.926 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-1] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.23.183]:5703 is added to the blacklist.
25-Jul-2017 16:41:14.930 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-8] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Connecting to /172.31.37.34:5702, timeout: 0, bind-any: true
25-Jul-2017 16:41:14.932 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-8] com.hazelcast.nio.tcp.InitConnectionTask.null [10.255.0.5]:5701 [dev] [3.8.3] Could not connect to: /172.31.37.34:5702. Reason: SocketException[Connection refused to address /172.31.37.34:5702]
25-Jul-2017 16:41:14.932 INFO [hz.SESSION-REPLICATION-INSTANCE.cached.thread-8] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3] [172.31.37.34]:5702 is added to the blacklist.
25-Jul-2017 16:41:15.930 INFO [main] com.hazelcast.system.null [10.255.0.5]:5701 [dev] [3.8.3] Cluster version set to 3.8
25-Jul-2017 16:41:15.931 INFO [main] com.hazelcast.cluster.impl.TcpIpJoiner.null [10.255.0.5]:5701 [dev] [3.8.3]
Members [1] {
Member [10.255.0.5]:5701 - 7995c688-0236-49b2-9894-53873cf5dc49 this
}
25-Jul-2017 16:41:15.955 INFO [main] com.hazelcast.core.LifecycleService.null [10.255.0.5]:5701 [dev] [3.8.3] [10.255.0.5]:5701 is STARTED

您是否在部署脚本中或docker swarm后面使用zookeeper、etcd等服务发现?不,我没有运行类似的服务发现。我从日志中看到,群集成员不在同一网络接口上,Hazelcast支持AWS ECS和发现。我建议您也可以在HZ客户端和成员的部署中使用compose file进行部署,并添加类似zookeeper的发现服务。对于AWS发现,您可以参考。查看了hazelcast AWS,但由于配置看起来非常吓人而将其驳回。。。此外,它似乎需要主机联网模式才能工作,Docker swarm模式与此不兼容。它目前不是官方AFAIK,但您可以检查。当做