2017-07-03 87 views
1

您已成功设法使用docker swarm获得运行的Infinispan群集。我用这个网站弄清楚如何去做http://blog.infinispan.org/2016/07/improved-infinispan-docker-image.html使用Docker群运行Infinispan群集和服务器管理控制台

我创建了我自己的覆盖网络,名为infinispan。 我然后使用下面的命令起转一个JGroups的八卦服务:

docker service create --name jgroupsGossip --replicas 2 --network infinispan jboss/jgroups-gossip 

然后我起转集群中使用:

docker service create --name infinispanTest --replicas 4 --network infinispan jboss/infinispan-server:latest -Djboss.default.jgroups.stack=tcp-gossip -Djgroups.gossip.initial_hosts=jgroupsGossip[12001] 

以下命令显示的簇能够跨看到彼此在群两个节点

docker exec -it {CONTAINER_ID} /opt/jboss/infinispan-server/bin/ispn-cli.sh -c "/subsystem=datagrid-infinispan/cache-container=clustered:read-attribute(name=members)" 

我的问题是试图让使用以下两种命令,而不是infinispanTest Servi大街运行的管理控制台CE。

docker service create --name infinispanUI --replicas 2 --network infinispan --publish 9990:9990 jboss/infinispan-server domain-controller -Djboss.default.jgroups.stack=tcp-gossip -Djgroups.gossip.initial_hosts=jgroupsGossip[12001] 

docker service create --name infinispanCluster --replicas 4 --network infinispan jboss/infinispan-server host-controller -Djboss.default.jgroups.stack=tcp-gossip -Djgroups.gossip.initial_hosts=jgroupsGossip[12001] 

的infinispanCluster服务拒绝停止旋转并访问管理控制台时对IP地址:9990它要求凭据,然后只是显示一个空白屏幕。任何人都厌倦了此设置并取得了进展

从一个infinispanCluster容器中获取一些日志。

Entry point arguments: host-controller -Djboss.default.jgroups.stack=tcp-gossip -Djgroups.gossip.initial_hosts=jgroupsGossip[12001] 
Added user 'user' to file '/opt/jboss/infinispan-server/standalone/configuration/application-users.properties' 
Added user 'user' to file '/opt/jboss/infinispan-server/domain/configuration/application-users.properties' 
========================================================================= 

JBoss Bootstrap Environment 

JBOSS_HOME: /opt/jboss/infinispan-server 

JAVA: /usr/lib/jvm/java/bin/java 

JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true 

========================================================================= 

15:23:59,225 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final 
15:23:59,371 INFO [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller' 
[Host Controller] 15:23:59,911 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final 
[Host Controller] 15:24:00,087 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final 
[Host Controller] 15:24:00,132 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: Infinispan Server 9.1.0.CR1 (WildFly Core 2.2.0.Final) starting 
[Host Controller] 15:24:00,781 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'permgen-size' in the resource at address '/host=c04c29fac2cd/jvm=default' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. 
[Host Controller] 15:24:00,782 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'max-permgen-size' in the resource at address '/host=c04c29fac2cd/jvm=default' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation. 
[Host Controller] 15:24:00,816 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ 
[Host Controller]  ("host" => "c04c29fac2cd"), 
[Host Controller]  ("core-service" => "discovery-options"), 
[Host Controller]  ("static-discovery" => "primary") 
[Host Controller] ]) - failure description: "WFLYCTL0113: '' is an invalid value for parameter host. Values must have a minimum length of 1 characters" 
[Host Controller] 15:24:00,822 INFO [org.xnio] (MSC service thread 1-4) XNIO version 3.4.0.Final 
[Host Controller] 15:24:00,828 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.4.0.Final 
[Host Controller] 15:24:00,859 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0034: Host Controller boot has failed in an unrecoverable manner; exiting. See previous messages for details. 
[Host Controller] 15:24:00,860 FATAL [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0178: Aborting with exit code 99 
[Host Controller] 15:24:00,871 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: Infinispan Server 9.1.0.CR1 (WildFly Core 2.2.0.Final) stopped in 6ms 
[Host Controller] 
15:24:01,198 INFO [org.jboss.as.process.Host Controller.status] (reaper for Host Controller) WFLYPC0011: Process 'Host Controller' finished with an exit status of 99 
15:24:01,200 INFO [org.jboss.as.process] (Thread-8) WFLYPC0017: Shutting down process controller 
15:24:01,201 INFO [org.jboss.as.process] (Thread-8) WFLYPC0016: All processes finished; exiting 

回答

0

域模式通过按名称链接容器来工作。域控制器被称为“dc”,从属链接到它,以便变量DC_PORT,DC_HOST等可见。

你能在码头群上跟随这个命名吗?

+0

只要im感知链接不在群中使用/可用。然而,如果使用用户定义的覆盖网络(即时使用)连接2个或更多服务,则他们可以使用群组服务名称例如彼此查询。从运行在service_name_2中的容器ping/curl/wget service_name_1应该可以工作 –