簡體   English   中英

Wildfly 8,mod_cluster和apache集成

[英]Wildfly 8, mod_cluster & apache integration

我在使用mod_cluster 1.2與Apache一起工作時遇到了問題。 我希望配置允許Apache將我的流量代理到應用服務器,以便myserver.com:9191(apache)將流量路由到myserver.com:9090(jboss)

症狀:

當我啟動Wildfly時,控制台每3-5秒產生以下錯誤:

錯誤[org.jboss.modcluster](UndertowEventHandlerAdapter - 1)MODCLUSTER000042:錯誤null將INFO命令發送到precise32 / 127.0.1.1:6666,配置將被重置:null

我可以在我的Apache日志中看到相應的請求:“INFO / HTTP / 1.1”501 529“ - ”“ClusterListener / 1.0”

myserver:9191 / mod_cluster-manager URL僅顯示頁面標題和鏈接,但沒有集群信息,如下所示: mod_cluster / 1.2.6.Final

自動刷新顯示DUMP輸出顯示INFO輸出

我在同一個虛擬服務器上運行jboss和apache。

服務器信息:

Virtual Box 4.3.14運行:

Ubuntu 12.04 LTS

阿帕奇/ 2.2.22

Wildfly 8.0

我可以直接導航到Wildfly上的我的網絡應用程序,而無需通過Apache,它可以正常工作。 如果我嘗試瀏覽Apache,我的Apache日志中會出現以下錯誤:

[Thu Oct 16 03:12:33 2014] [debug] mod_proxy_cluster.c(2231):proxy:byrequests balancer FAILED

[Thu Oct 16 03:12:33 2014] [錯誤]代理:CLUSTER :( balancer:// mycluster)。 所有工人都處於錯誤狀態

[2014年10月16日03:12:33] [調試] mod_deflate.c(615):[client 10.0.2.2] Zlib:壓縮410到276:URL /

我的相關Apache配置看起來像:

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>

虛擬主機:

#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錯誤日志jboss_cluster_error.log:

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:49] [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

[2014年10月16日18:11:51] [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

[2014年10月16日18:11:51] [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

[2014年10月16日18:11:51] [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

[2014年10月16日18:11:51] [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

[2014年10月16日18:11:51] [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:壓縮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

[2014年10月16日18:13:59] [debug] mod_deflate.c(615):[client 10.0.2.2] Zlib:壓縮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] [錯誤]代理:CLUSTER :( balancer:// mycluster)。 所有工人都處於錯誤狀態

[2014年10月16日18:14:05] [debug] mod_deflate.c(615):[client 10.0.2.2] Zlib:壓縮400到269:URL /

[2014年10月16日18:14:13] [調試] mod_proxy_cluster.c(2231):代理:byrequests balancer FAILED

[2014年10月16日18:14:13] [錯誤]代理人:CLUSTER :(平衡器:// mycluster)。 所有工人都處於錯誤狀態

[2014年10月16日18:14:13] [調試] mod_deflate.c(615):[client 10.0.2.2] Zlib:壓縮400到269:URL /

vhost訪問日志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)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

127.0.0.1 - - [16 / Oct / 2014:18:11:49 +0000]“OPTIONS * HTTP / 1.0”200 126“ - ”“Apache / 2.2.22(Ubuntu)(內部虛擬連接)”

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火狐/ 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火狐/ 32.0"

vhost訪問日志other_vhosts_access.log

exact32:6666 127.0.0.1 - - [16 / Oct / 2014:18:13:43 +0000]“INFO / HTTP / 1.1”501 529“ - ”“ClusterListener / 1.0”

exact32:6666 127.0.0.1 - - [16 / Oct / 2014:18:13:53 +0000]“INFO / HTTP / 1.1”501 529“ - ”“ClusterListener / 1.0”

exact32: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”

exact32: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”

exact32: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”

exact32:6666 127.0.0.1 - - [16 / Oct / 2014:18:16:23 +0000]“INFO / HTTP / 1.1”501 529“ - ”“ClusterListener / 1.0”

消息編輯者:MP添加完整的apache錯誤和訪問日志。 還在我的ProxyPass配置中添加到vhost。

我能夠讓我的配置正常工作。 問題出在我的mod_cluster.conf文件中。 我錯過了2個指令:

    ServerAdvertise On 127.0.1.1:6666
    EnableMCPMReceive

希望這有助於某人......

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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM