-
1. Re: wildfly 10 session replication issue
wdfink May 28, 2016 5:06 PM (in response to bages)Not that I'm aware of.
Did you see the cluster is build in the logfiles?
Do you use the default "ha" or "full-ha" configuration?
Could you attach the configuration, start option and log exerpt?
-
2. Re: wildfly 10 session replication issue
bages May 30, 2016 5:30 AM (in response to wdfink)I am not entirely sure what i am supposed to see in case of a proper cluster startup, but my guess is the cluster is not built. I tried to check the cluster configuration with a small servlet based on this arcticle: http://www.mastertheboss.com/jboss-server/jboss-cluster/jboss-cluster-discover-cluster-members
In the servlet I simply log out all discovered cluster nodes base on this code snippet:
Channel channel = (Channel) CurrentServiceContainer.getServiceContainer().getService(ServiceName.JBOSS.append(
"jgroups"
,
"channel"
,
"web"
)).getValue();
List<org.jgroups.Address> members = channel.getView().getMembers();
List< IpAddress> addresses =
new
ArrayList< IpAddress>();
for
(org.jgroups.Address member: members) {
PhysicalAddress physicalAddr = (PhysicalAddress)channel.down(
new
Event(Event.GET_PHYSICAL_ADDRESS, member));
IpAddress ipAddr = ( IpAddress)physicalAddr;
System.out.println(
"Found IP: "
+ipAddr.getIpAddress().getHostAddress());
addresses.add(ipAddr);
}
On Wildfly 9 this properly prints the two cluster nodes. In Wildfly 10 it simply prints localhost (127.0.0.1).
I have put the cluster nodes under "other-server-group" which is using full-ha profile.
I have attached the startup logs (i am using master-slave configuration, both hosts running 1-1 cluster server node) and the used configuration.
-
master-startup.log.zip 4.1 KB
-
slave-startup.log.zip 4.1 KB
-
master-config.zip 8.0 KB
-
slave-config.zip 8.2 KB
-
-
3. Re: wildfly 10 session replication issue
xxlali Jun 14, 2016 9:46 AM (in response to bages)Hi Sandor,
We are facing the same issue with standalone(not domain mode) clustering with "ha" configuration xml file. We tested it on our current production environment Wildfly 8.2 and it works fine. We want to run it on the new release Wildfly 10 to upgrade to latest changes however cluster forms(nodes registers to each other) but session is not replicated on a failover case. Have you found any solution for the problem?
-
4. Re: wildfly 10 session replication issue
bages Jun 15, 2016 4:20 AM (in response to xxlali)Hi Ali,
no solution yet. Right now this topic has lower priority in my project, but I will definitely post here if a solution is found later.
-
5. Re: wildfly 10 session replication issue
xxlali Jun 15, 2016 5:38 AM (in response to bages)Hi Sandor,
We have found a solution.
We have a
web-fragment.xml
for general purpose configuration and aweb.xml
for project specific configuration. With these configurations, clustering does not work.But if we delete
web-fragment.xml
and move its content toweb.xml
, everything works fine.Maybe this is the case for you too.
-
6. Re: wildfly 10 session replication issue
wdfink Jun 15, 2016 11:19 AM (in response to xxlali)Yes,
if you have web-fragment.xml files this might switch <distributable> which is enabled in web.xml back to false - unfortunately without any warning.
This will be fixed with
[WFLY-6626] Add log message indicating disabled <distributable/> flag from web-fragments -
7. Re: wildfly 10 session replication issue
danielserva Dec 7, 2016 8:58 AM (in response to bages)Hi,
I am facing the same issue in my environment, but I don't have any web-fragment.xml in my application.
Has anyone found a solution for this?
-
8. Re: wildfly 10 session replication issue
adveyes Mar 29, 2017 9:43 AM (in response to danielserva)The problem lies in "interface" attribute of the udp related socket bindings at both master and slave domain.xml. You have to change
<socket-binding name="jgroups-udp" interface="private"... />
and
<socket-binding name="jgroups-udp-fd" interface="private"... />
to
<socket-binding name="jgroups-udp" interface="public"...
and
<socket-binding name="jgroups-udp-fd" interface="public"... />
-
9. Re: wildfly 10 session replication issue
pferraro Apr 13, 2017 8:10 AM (in response to adveyes)Ideally, you would modify the "private" interface to some non-loopback interface, rather than modify jgroups to use the "public" interface. The rationale behind this interface segregation is that most deployments of WildFly would have one interface for servicing public requests (e.g. WAN, load balancer, etc) and another interface for LAN/intra-server/clustering traffic.