Reputation: 433
I am having problems getting mod_cluster 1.2 to work with Apache. I want the configuration to allow Apache to proxy my traffic to the apps server so that myserver.com:9191 (apache) routes traffic to myserver.com:9090 (jboss)
Symptoms:
When I start Wildfly the console produces the following error every 3-5 seconds:
ERROR [org.jboss.modcluster] (UndertowEventHandlerAdapter - 1) MODCLUSTER000042: Error null sending INFO command to precise32/127.0.1.1:6666, configuration will be reset: null
I can see a corresponding request in my Apache logs as: "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
The myserver:9191/mod_cluster-manager URL only shows the page title and links, but no cluster info, like this: mod_cluster/1.2.6.Final
Auto Refresh show DUMP output show INFO output
I am running both jboss and apache on the same virtual server.
Server Info:
Virtual Box 4.3.14 running:
Ubuntu 12.04 LTS
Apache/2.2.22
Wildfly 8.0
I can navigate to my web apps on Wildfly directly without going through Apache and it works fine. If I try and navigate through Apache, I get the following errors in my Apache log:
[Thu Oct 16 03:12:33 2014] [debug] mod_proxy_cluster.c(2231): proxy: byrequests balancer FAILED
[Thu Oct 16 03:12:33 2014] [error] proxy: CLUSTER: (balancer://mycluster). All workers are in error state
[Thu Oct 16 03:12:33 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] Zlib: Compressed 410 to 276 : URL /
My relevant Apache configs look like:
mod_cluster.load:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule advertise_module /usr/lib/apache2/modules/mod_advertise.so
LoadModule manager_module /usr/lib/apache2/modules/mod_manager.so
LoadModule proxy_cluster_module /usr/lib/apache2/modules/mod_proxy_cluster.so
LoadModule slotmem_module /usr/lib/apache2/modules/mod_slotmem.so
mod_cluster.conf:
CreateBalancers 1
Listen 127.0.1.1:6666
ManagerBalancerName mycluster
<VirtualHost 127.0.1.1:6666>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
AdvertiseFrequency 5
ServerAdvertise On
<Location />
Order deny,allow
Allow from 127.0.0
</Location>
</VirtualHost>
virtual host:
#ServerAdmin me@domain.edu
ServerName jboss.cluster
ServerAlias jboss.cluster
ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://mycluster
ProxyPreserveHost On
<Location />
Order deny,allow
Allow from All
</Location>
SetHandler mod_cluster-manager
Order deny,allow
#Deny from all
Allow from 127.0.0
ErrorLog ${APACHE_LOG_DIR}/jboss_cluster_error.log
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/jboss_access.log combined
standalone.xml:
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jdr"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.jsf"/>
<extension module="org.jboss.as.logging"/>
<extension module="org.jboss.as.mail"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.pojo"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.sar"/>
<extension module="org.jboss.as.security"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.webservices"/>
<extension module="org.jboss.as.weld"/>
<extension module="org.wildfly.extension.batch"/>
<extension module="org.jboss.as.modcluster"/>
<extension module="org.wildfly.extension.io"/>
<extension module="org.wildfly.extension.undertow"/>
</extensions>
...
<mod-cluster-config advertise-socket="modcluster" connector="ajp">
<dynamic-load-provider>
<load-metric type="cpu"/>
</dynamic-load-provider>
</mod-cluster-config>
</subsystem>
......
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
<socket-binding name="http" port="${jboss.http.port:9090}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
vhost error log jboss_cluster_error.log:
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:49 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:11:51 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:13:55 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] Zlib: Compressed 494 to 255 : URL /mod_cluster-manager
[Thu Oct 16 18:13:58 2014] [debug] mod_proxy_cluster.c(1010): update_workers_node starting
[Thu Oct 16 18:13:58 2014] [debug] mod_proxy_cluster.c(1025): update_workers_node done
[Thu Oct 16 18:13:59 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] Zlib: Compressed 494 to 255 : URL /mod_cluster-manager
[Thu Oct 16 18:14:05 2014] [debug] mod_proxy_cluster.c(2231): proxy: byrequests balancer FAILED
[Thu Oct 16 18:14:05 2014] [error] proxy: CLUSTER: (balancer://mycluster). All workers are in error state
[Thu Oct 16 18:14:05 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] Zlib: Compressed 400 to 269 : URL /
[Thu Oct 16 18:14:13 2014] [debug] mod_proxy_cluster.c(2231): proxy: byrequests balancer FAILED
[Thu Oct 16 18:14:13 2014] [error] proxy: CLUSTER: (balancer://mycluster). All workers are in error state
[Thu Oct 16 18:14:13 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] Zlib: Compressed 400 to 269 : URL /
vhost access log jboss_access.log
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [16/Oct/2014:18:11:49 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
10.0.2.2 - - [16/Oct/2014:18:13:55 +0000] "GET /mod_cluster-manager HTTP/1.1" 200 556 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
10.0.2.2 - - [16/Oct/2014:18:13:59 +0000] "GET /mod_cluster-manager HTTP/1.1" 200 529 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
10.0.2.2 - - [16/Oct/2014:18:14:05 +0000] "GET / HTTP/1.1" 503 504 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
10.0.2.2 - - [16/Oct/2014:18:14:13 +0000] "GET / HTTP/1.1" 503 504 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
vhost access log other_vhosts_access.log
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:13:43 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:13:53 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:03 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:13 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:23 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:33 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:43 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:14:53 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:03 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:13 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:23 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:33 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:43 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:15:53 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:16:03 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:16:13 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
precise32:6666 127.0.0.1 - - [16/Oct/2014:18:16:23 +0000] "INFO / HTTP/1.1" 501 529 "-" "ClusterListener/1.0"
Message was edited by: M P Added in complete apache error and access logs. Also added in my ProxyPass config to the vhost.
Upvotes: 1
Views: 6834
Reputation: 433
I was able to get my configuration working. The problem was with my mod_cluster.conf file. I was missing the 2 directives:
ServerAdvertise On 127.0.1.1:6666
EnableMCPMReceive
hope this helps someone...
Listen 127.0.1.1:6666
ManagerBalancerName mycluster
<VirtualHost 127.0.1.1:6666>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
AdvertiseFrequency 5
ServerAdvertise On 127.0.1.1:6666
EnableMCPMReceive
<Location />
Order deny,allow
# Allow from 127.0.0
Allow from all
</Location>
</VirtualHost>
Upvotes: 3