使用VirtualBox进行Wildfly群集 [英] Wildfly clustering with VirtualBox
问题描述
我正在WINDOWS7上使用VirtualBox作为两个DEBIAN7.7来宾主机deb1
和deb2
的主机.每个客人可以与另一个客人交流.使用一个访客浏览器,我可以看到在另一访客上运行的Wildfly等距欢迎页面.我在standalone-ha
模式下运行每种方式,网络接口启用了mutlicast,我可以在名为srv1
的Wildfly节点上看到这两种方式构建了一个集群:
I am using VirtualBox on a WINDOWS7 as host of two DEBIAN7.7 guests, deb1
and deb2
. Each guest can comunicate with the other one. Using one guest browser I can see the Wildfly istance welcome page that's running on the other guest. I run each istance in standalone-ha
mode, network interfaces have mutlicast enabled, I can see on Wildfly node named srv1
that the two istances build a cluster:
...
...ISPN000094: Received new cluster view: [srv2/web|3] (2) [srv2/web, srv1/web]
,其中srv1
和srv2
是等式的节点名称. tcpdump显示UDP数据包遇到了JGroups正在侦听的多播地址230.0.0.4.尽管有所有这些优点,但是http会话没有共享,这是我的问题.
我使用的应用程序非常简单且<distributable/>
,我已经在单个主机方案的多个节点中成功使用了它.
where srv1
and srv2
are the node names of the istances. A tcpdump show UDP packets come across the multicast address 230.0.0.4, just where JGroups is listening. Despite all this goodness, http-session is not shared, this is my problem.
The application I use is very simple and <distributable/>
, I have already used it succesfully in a multiple nodes on a single host scenario.
更新:我使用jgroups的测试应用程序McastReceiverTest和McastSenderTest进行了一些测试,其地址为:230.0.0.4:45688、230.0.0.4:45700和224.0.1.105:23364.每次测试都有效,在接收者来宾上,我可以读取发送者来宾所发送的内容.我也尝试更改应用程序,我使用了这个 https://github.com/liweinan/cluster-demo ,但不共享http会话.
UPDATE: I made some tests using jgroups's test application McastReceiverTest and McastSenderTest with the following addresses: 230.0.0.4:45688, 230.0.0.4:45700 and 224.0.1.105:23364. Every test worked, on the receiver guest I can read what I sent by the sender guest. I tried to change my application too, I use this one https://github.com/liweinan/cluster-demo but http session is not shared.
推荐答案
Wildfly运作良好,我一直在查看问题,好像我仍在主机上运行多个角色.当JBoss论坛建议时,我尝试用curl恢复我的JSESSIONID,并且看到集群响应正常.大结局.
Wildfly work well, I was looking at the problem as if I was still running multiple istances on my host. As JBoss forum suggests, I tried with curl retreiving my JSESSIONID and I see the cluster responding as expected. Happy ending.
这篇关于使用VirtualBox进行Wildfly群集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!