-
1. Re: wildfly9 load balancing example not working
tomlux Jun 10, 2015 2:27 PM (in response to gaudina)Hy,
are you trying to get it working under Windows?
Had also some problems to get it running under windows: problems to get it running under Wildfly9.0cr1 · Issue #1 · stuartwdouglas/modcluster-example · GitHub
This fix solved it for me: https://github.com/undertow-io/undertow/pull/304
The cluster is now working with latest CR2-snapshot version under windows.
You have to compile the current 9.x git branch of wildfly to get it working.
Tom
-
2. Re: wildfly9 load balancing example not working
gaudina Jun 10, 2015 3:56 PM (in response to tomlux)Hi Tom, thanks for your response.
I'm trying in a linux box (ubuntu desktop, java 7 and 8 produced same results)
Following your suggestion, I replaced undertow-core-1.2.4.Final.jar for undertow-core-1.2.5.Final.jar (updated module.xml and verified version loaded in wildfly startup), but nothing changed.
If the info helps, after completing steps in the example, I cannot see in wildfly console the next lines:
[Server:load-balancer] .... INFO [io.undertow] .... registering node master:backends1, connection ajp://<my-ip>:8109/?#
...
[Server:load-balancer] .... INFO [io.undertow] .... registering node master:backends2, connection ajp://<my-ip>:8209/?#
like I saw in https://www.youtube.com/watch?feature=player_detailpage&v=xa_gtRDpwyQ#t=0
-
3. Re: wildfly9 load balancing example not working
jaikiran Jun 11, 2015 12:26 AM (in response to gaudina) -
4. Re: wildfly9 load balancing example not working
gaudina Jun 11, 2015 10:32 AM (in response to jaikiran)Hi jaikiran,
I've tried last compilation of wildfly sources (10.0.0.Alpha3.SNAPSHOT), same result.
I've tried 9.0.0.CR1 in a windows vm, I see "... [io.undertow] .... registering node master:backends1, connection ajp://<my-ip>:8109/?#" (for both backends) in console, but load balancing still not working.
Maybe I'm skipping something like startup parameter? user with specific permissions/roles?
I'm doing following:
1) uncompress wildfly-9.0.0.CR1.zip and cd to wildfly-9.0.0.CR1/bin
2) replace undertow-core for 1.2.5.Final and update content in module.xml
3) add user (admin with no roles: (a) -> admin -> yes -> **** -> yes (password guesable) -> *** -> <enter> -> yes -> yes
4) ./domain.sh
5)
:stop-servers(blocking=true)
/host=master/server-config=server-one:remove
/host=master/server-config=server-two:remove
/host=master/server-config=server-three:remove
/server-group=main-server-group:remove
/server-group=other-server-group:remove
/profile=ha/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=alias, value=[192.168.40.X])
/profile=ha/subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=advertise-security-key, value=mypassword)
/server-group=backend-servers:add(profile=ha, socket-binding-group=ha-sockets)
/host=master/server-config=backend1:add(group=backend-servers, socket-binding-port-offset=100)
/host=master/server-config=backend2:add(group=backend-servers, socket-binding-port-offset=200)
/server-group=backend-servers:start-servers
/host=master/server-config=backend1/system-property=server.name:add(boot-time=false, value=backend1)
/host=master/server-config=backend2/system-property=server.name:add(boot-time=false, value=backend2)
6) deploy ~/<path-to-deploy>/clustering-demo.war --server-groups=backend-servers
7)
/profile=default/subsystem=undertow/configuration=filter/mod-cluster=modcluster:add(management-socket-binding=http, advertise-socket-binding=modcluster, security-key=mypassword)
/profile=default/subsystem=undertow/server=default-server/host=default-host/filter-ref=modcluster:add
/socket-binding-group=standard-sockets/socket-binding=modcluster:add(port=23364, multicast-address=224.0.1.105)
/server-group=load-balancer:add(profile=default, socket-binding-group=standard-sockets)
/host=master/server-config=load-balancer:add(group=load-balancer)
/server-group=load-balancer:start-servers
8) navigate to "http://localhost:8080/clustering-demo?stateful" gets 404 - Not found (same url with 8180 and 8280 works)
Thank you for your patience.
-
5. Re: wildfly9 load balancing example not working
gaudina Jun 12, 2015 10:19 AM (in response to gaudina)Good news!
I've tried same steps in wildfly.9.0.0.CR2 (same linux box, same java version) and it's works!
Thank you for your help.
-
6. Re: wildfly9 load balancing example not working
gaudina Jun 15, 2015 4:29 PM (in response to gaudina)Hi all! This is weird.
Today I repeated same steps with a clean install of CR2 and the issue went back.
I don't know if something in my SO is affectign wildfly configuration or what ... even traying this in a clean Ubuntu VM I can reproduce the issue.
Regards.
-
7. Re: wildfly9 load balancing example not working
jaikiran Jun 16, 2015 5:03 AM (in response to gaudina)Please file a JIRA at WildFly - JBoss Issue Tracker and include the details about your setup and what exactly fails to happen.
-
8. Re: wildfly9 load balancing example not working
hwellmann.de Jun 16, 2015 8:14 AM (in response to gaudina)I had a similar problem and found this thread while looking for a solution.
In my case, the solution was to bind WildFly to the appropriate network interface, e.g. by
bin/domain.sh -b 192.168.0.4
and then to use this address in http URLs (instead of localhost).
-
9. Re: wildfly9 load balancing example not working
ctomc Jun 16, 2015 9:20 AM (in response to hwellmann.de)There was some issue on *nix OSes that I introduced while fixing mod cluster discovery on windows.
That was fixed yesterday and Stuart released undertow 1.2.8.Final that contains the fix.
can you guy try using 1.2.8 and let us know if it fixes the problem?
-
10. Re: wildfly9 load balancing example not working
gaudina Jun 16, 2015 9:35 AM (in response to hwellmann.de)jaikiran:
I will file a JIRA if below syntoms don't help to solve my problem. Thank you for your advice.
Harald:
Thank you for your tip. I start wildfly using "./domain.sh -bjboss.bind.address=192.168.40.56", I get following results (in firefox, firewall disabled);
http://192.168.40.56:8180/clustering-demo?stateful --> "Unable to connect"
http://192.168.40.56:8280/clustering-demo?stateful --> "Unable to connect"
http://localhost:8180/clustering-demo?stateful --> Server backend1 Request Count 1
http://localhost:8280/clustering-demo?stateful --> Server backend2 Request Count 2
http://192.168.40.56:8080/clustering-demo?stateful --> "Unable to connect"
http://localhost:8080/clustering-demo?stateful --> "404 - Not Found"
Attachments:
wildfly.log: log of admin user creation and wildfly startup and configuration
clustering-domain-mode.txt: jboss_cli commands for the example of load balancing and clustering.
I know this is almost a JIRA but I want to be (almost) sure that I didn't miss something obvious.
Sorry for my "rustic" english. Regards.
-
wildfly.log.zip 8.0 KB
-
-
11. Re: wildfly9 load balancing example not working
gaudina Jun 16, 2015 9:50 AM (in response to ctomc) -
12. Re: wildfly9 load balancing example not working
ctomc Jun 16, 2015 10:22 AM (in response to gaudina)it is in maven, but there is some bug in nexus repository that sometimes doesn't show version in directory listing.
but if you access it directly it works.
this is the only jar that is important https://repository.jboss.org/nexus/content/groups/public-jboss/io/undertow/undertow-core/1.2.8.Final/undertow-core-1.2.8…
at least for this case.
-
13. Re: wildfly9 load balancing example not working
gaudina Jun 16, 2015 11:10 AM (in response to ctomc)Tomaz Cerar escribió:
it is in maven, but there is some bug in nexus repository that sometimes doesn't show version in directory listing.
but if you access it directly it works.
this is the only jar that is important https://repository.jboss.org/nexus/content/groups/public-jboss/io/undertow/undertow-core/1.2.8.Final/undertow-core-1.2.8…
at least for this case.
Same results.
I've tried wildfly 9.0.0.CR2 with replaced undertow-core also in a windows vm and didn't work. In its console I see something that I don't see in the linux console:
[Server:load-balancer] 11:45:03,880 INFO [io.undertow] (default task-2) UT005053: Registering node master:backend1, connection: ajp://127.0.0.1:8109/?#
[Server:load-balancer] 11:45:03,880 INFO [io.undertow] (default task-3) UT005045: Registering context /clustering-demo, for node master:backend1
[Server:backend1] 11:45:03,893 WARN [org.jboss.modcluster] (UndertowEventHandlerAdapter - 1) MODCLUSTER000045: AverageSystemLoadMetric is not supported on this system and will be disabled.
[Server:load-balancer] 11:45:05,390 INFO [io.undertow] (default task-6) UT005053: Registering node master:backend2, connection: ajp://127.0.0.1:8209/?#
[Server:load-balancer] 11:45:05,390 INFO [io.undertow] (default task-7) UT005045: Registering context /clustering-demo, for node master:backend2
[Server:backend2] 11:45:05,390 WARN [org.jboss.modcluster] (UndertowEventHandlerAdapter - 1) MODCLUSTER000045: AverageSystemLoadMetric is not supported on this system and will be disabled.
But the syntoms are similars to those in linux box.
I will file a JIRA with data in this thread.
Thank you all.
-
14. Re: wildfly9 load balancing example not working
ctomc Jun 16, 2015 11:18 AM (in response to gaudina)Yes that warnings just tell you that some mod cluster metrics don't work on windows.
Otherwise it is ok.
you can see that backends properly register