-
1. Re: Wildfly cluster and Apache2
rhusar Jan 12, 2015 12:39 PM (in response to fpezzati)Modules are loaded correctly and I can see the mod_cluster's manager page on 192.168.0.104:6666/mod_cluster_manager but with no nodes info. I also configured a VirtualHost:
So even after you start the cluster, you can't see any nodes added to the manager page?
ManagerBalancerName wfycluster
Most likely, did you also configure the same name for balancer in WildFly and reload?
[rhusar@x220 wildfly-8.1.0.Final]$ ./bin/jboss-cli.sh -c [standalone@localhost:9990 /] /subsystem=modcluster/mod-cluster-config=configuration:write-attribute(name=balancer,value=wfycluster) { "outcome" => "success", "response-headers" => { "operation-requires-reload" => true, "process-state" => "reload-required" } } [standalone@localhost:9990 /] :reload { "outcome" => "success", "result" => undefined }
Try adding a debug log to apache as well if that fails:
LogLevel debug
-
2. Re: Wildfly cluster and Apache2
fpezzati Jan 13, 2015 5:25 AM (in response to rhusar)Hello,
I can't see no nodes in mod_cluster-manager page. I change my virtual host configuration this way:
Listen 192.168.0.104:6666
<VirtualHost 192.168.0.104:6666>
ServerName wfycluster
<Location />
</Location>
SetHandler mod_cluster-manager
ManagerBalancerName wfycluster
ServerAdvertise On 192.168.0.104:6666
LogLevel debug
ErrorLog /var/log/apache2/wfycluster/error.log
</VirtualHost>
I also add balancer=wfycluster attribute to mod-cluster-config tag in mod-cluster subsystem. Now Wildfly nodes report this error:
...(UndertowEventHandlerAdapter - 1) MODECLUSTER000042: Error null sending INFO command to debian1-2.local/192.168.0.104:6666, configuration will be reset: null
and Apache2's virtual host return this errors:
... [client 192.168.0.101] Invalid method in request INFO / HTTP/1.1
... [client 192.168.0.102] Invalid method in request INFO / HTTP/1.1
...
192.168.0.101 and 192.168.0.102 are Wildfly nodes ip addresses. Still no nodes on the mod_cluster-manager page. Maybe I'm doin' some mess with configuration.
-
3. Re: Re: Wildfly cluster and Apache2
rhusar Jan 13, 2015 8:32 AM (in response to fpezzati)1 of 1 people found this helpfulListen 192.168.0.104:6666
<VirtualHost 192.168.0.104:6666>
ServerName wfycluster
<Location />
</Location>
SetHandler mod_cluster-manager
ManagerBalancerName wfycluster
ServerAdvertise On 192.168.0.104:6666
LogLevel debug
ErrorLog /var/log/apache2/wfycluster/error.log
</VirtualHost>
You are missing EnableMCPMReceive directive, thus this request is opaque and results in "Invalid method in request".
-
4. Re: Wildfly cluster and Apache2
fpezzati Jan 13, 2015 3:49 PM (in response to fpezzati)I was messing with Apache2 virtualhost configurations. I change my
mod_cluster.conf
this way:<IfModule manager_module>
Listen 192.168.0.104:6666
ManagerBalancerName wfycluster
<VirtualHost 192.168.0.104:6666>
AllowDisplay On
KeepAliveTimeout 300
MaxKeepAliveRequests 0
AdvertiseFrequency 5
ServerAdvertise On 192.168.0.104:6666
AdvertiseGroup 224.0.1.105:23364
EnableMCPMReceive
<Location />
Order allow,deny
# Deny from all
Allow from 192.168.0.
</Location>
<Location /wfycluster>
SetHandler mod_cluster-manager
Order deny,allow
Allow from 192.168.0
</Location>
</VirtualHost>
</IfModule>
and change the other one virtualhost as simple as possible:
<VirtualHost *:80>
ServerName wfycluster
<Location />
Order deny,allow
Allow from 192.168.0.
</Location>
LogLevel debug
ErrorLog /var/log/apache2/wfycluster/error.log
</VirtualHost>
Wildfly attribute
balancer
value and mod_cluster virtualhostManagerBalancerName
now matches. I can finally see nodes on mod_cluster-manager page. Maybe not the best conf possible, I have to dig deeper, but it works. Thanks for the help. -
5. Re: Re: Wildfly cluster and Apache2
rhusar Jan 14, 2015 10:13 AM (in response to fpezzati)Great.
Just make sure to remove the debug log level and consider adding advertise-security-key / advertiseSecurityKey configuration before going public with the setup.