Sunday 15 May 2011

jboss - Wildfly 8, mod_cluster & apache integration -



jboss - Wildfly 8, mod_cluster & apache integration -

i having problems getting mod_cluster 1.2 work apache. want configuration allow apache proxy traffic apps server myserver.com:9191 (apache) routes traffic myserver.com:9090 (jboss)

symptoms:

when start wildfly console produces next error every 3-5 seconds:

error [org.jboss.modcluster] (undertoweventhandleradapter - 1) modcluster000042: error null sending info command precise32/127.0.1.1:6666, configuration reset: null

i can see corresponding request in apache logs as: "info / http/1.1" 501 529 "-" "clusterlistener/1.0"

the myserver:9191/mod_cluster-manager url shows page title , links, no cluster info, this: mod_cluster/1.2.6.final

auto refresh show dump output show info output

i running both jboss , apache on 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 web apps on wildfly straight without going through apache , works fine. if seek , navigate through apache, next errors in 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). workers in error state

[thu oct 16 03:12:33 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] zlib: compressed 410 276 : url /

my relevant apache configs 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 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 </location>

sethandler mod_cluster-manager order deny,allow #deny allow 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 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 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). workers in error state

[thu oct 16 18:14:05 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] zlib: compressed 400 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). workers in error state

[thu oct 16 18:14:13 2014] [debug] mod_deflate.c(615): [client 10.0.2.2] zlib: compressed 400 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 edited by: m p added in finish apache error , access logs. added in proxypass config vhost.

i able configuration working. problem mod_cluster.conf file. missing 2 directives:

serveradvertise on 127.0.1.1:6666 enablemcpmreceive

hope 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 127.0.0 allow </location> </virtualhost>

apache jboss wildfly mod-cluster

No comments:

Post a Comment