2015-01-12 12 views
0

나는 많은 것을 탐색합니다.이 질문은 이미 게시 된 다른 질문과 비슷하지만 해결책이 제 경우에는 작동하지 않는 것 같습니다. 나는 Wildfly를 만들었습니다 .8.2.0. 최종 클러스터와 그것을 httpd 뒤에 넣고 싶습니다. 클러스터가 제대로 실행되고 있습니다. 내 호스트에서 데비안 위지 게스트 세 명을 돌렸고 그 중 두 명은 클러스터 노드 (IP는 192.168.0.101192.168.0.102)를 실행했고 다른 게스트는 mod_cluster.1.2.0.Final 모듈을 사용하여 Apache2.2.22를 실행합니다. 이것은 내 mod_cluster.conf입니다 :Wildfly 클러스터 및 Apache2

<IfModlue mod_manager.so> 
    Listen 192.168.0.104:6666 
    ManagerBalancerName wfycluster 
    <VirtualHost 192.168.0.104:6666> 
    KeepAliveTimeout 300 
    MaxKeepAliveRequests 0 
    AdvertiseFrequency 5 
    ServerAdvertise On 192.168.0.104:6666 
    EnableMCPMReceive 
    <Location /mod_cluster-manager> 
     SetHandler mod_cluster-manager 
     Order deny,allow 
     Deny from all 
     Allow from 192.168.0 
    </Location> 
    </VirtualHost> 
</IfModule> 

모듈이 올바르게로드와 나는 192.168.0.104:6666/mod_cluster_manager에 있지만 노드 정보와 mod_cluster의 관리자 페이지를 볼 수 있습니다. 또한 VirtualHost를 구성했습니다.

Listen 192.168.0.104:6666 
<VirtualHost 192.168.0.104:6666> 
    ServerName wfycluster 
    ProxyPass/balancer://wfycluster 
    ProxyPassReverse/balancer://wfycluster 
    ProxyPreserveHost On 
    <Location /> 
    Order deny,allow 
    Allow from 192.168.0 
    </Location> 
    SetHandler mod_cluster-manager 
    ManagerBalancerName wfycluster 
    ErrorLog /var/log/apache2/wfycluster/error.log 
</VirtualHost> 

기본 standalone-ha.xml을 사용하여 Wildfly 기능이 실행됩니다. 다음 명령입니다.

./standalone.sh -b 192.168.0.101 -c standalone-ha.xml -Djboss.node.name=srv1 -u 230.0.0.4 -Djboss.bind.address.unsecure=192.168.0.101 -Djboss.bind.address.management=192.168.0.101 

명령은 첫 번째 게스트를 나타냅니다. 노드가 올라감에 따라 Apache2 mod_cluster_manager 페이지에 변경 사항이 없으며 192.168.0.104/MyClusteredApp/을 찾으면 404 오류가 발생합니다. 노드에 컬을 직접 사용하면 모든 것이 예상대로 작동합니다. 내 구성에서 무엇이 잘못 되었습니까?

UPDATE : 내 가상 호스트 파일에서이 방법 ManagerBalanceName other-server-group이 라인 ServerAdvertise On 192.168.0.104을 추가하고 라인을 변경했습니다. 이제 노드와 apache2가 의사 소통을 시도하지만 성공하지 못했음을 알 수 있습니다. 내가 ManagerBalanceName wfycluster에서 ManagerBalanceName other-server-group을 변경하고 선 ProxyPass .., ProxyPassReverse.. 댓글을 달았습니다, 내 가상 호스트 구성에 대한 ProxyPreserveHost.. :

...[error] proxy: CLUSTER: (balancer://wfycluster). All workers are in error state 

UPDATE : 아파치 가상 호스트하는 error.log에 나는이 참조하십시오. 또한 balancer=wfyclustermodcluster 하위 시스템의 mod-cluster-config 태그에 추가하는 Wildfly 노드 구성을 변경했습니다.

에서 변경된 오류
...(UndertowEventHandlerAdapter - 1) MODECLUSTER000042: Error null sending INFO command to debian1-2.local/192.168.0.104:6666, configuration will be reset: null 

답변

0

:

이것은 내가 성공적으로 사용한 개념 설정의 기본 증거입니다. 내 mod_cluster.conf이 방법 변경 :

<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> 

을하고 가능한 가상 호스트와 같은 간단한 다른 하나는 변경 : ManagerBalancerName 지금과 일치하는 가상 호스트

<VirtualHost *:80> 
    ServerName wfycluster 
    <Location /> 
     Order deny,allow 
     Allow from 192.168.0. 
    </Location> 
    LogLevel debug 
    ErrorLog /var/log/apache2/wfycluster/error.log 
</VirtualHost> 

제이보스 속성 balancer 값과 mod_cluster을. 마침내 mod_cluster-manager 페이지에서 노드를 볼 수 있습니다. 어쩌면 가능한 최고의 conf는 아니지만, 나는 더 깊게 파고 야하지만 작동합니다. 저에게 올바른 방향을 가르쳐 주신 것에 감사드립니다.

1

ProxyPass 지정 문없이 시도 했습니까? 나는 당신이 그 필요성을 확신하지 못합니다. 나는 아파치 가상 호스트 구성 덤비는했다

<VirtualHost [HOST]:[PORT]> 
    AllowDisplay On 
    EnableMCPMReceive 
    #allow access from cluster nodes to the mod_cluster module 
    <Directory /> 
     Order deny,allow 
     Deny from all 
     Allow from [SUBNET/VPN/... where the nodes are] 
    </Directory> 

    KeepAliveTimeout 60 
    MaxKeepAliveRequests 0 
    AdvertiseFrequency 5 
    ServerAdvertise On http://[HOST]:[PORT] 

    # This directive allows you to view mod_cluster status at URL http://[HOST]:[PORT]/mod-cluster-manager 
    <Location /mod-cluster-manager> 
     SetHandler mod_cluster-manager 
     Order deny,allow 
     Deny from all 
     Allow from [SUBNET/VPN/... from which you want to access mod-cluster manager page] 
    </Location> 
</VirtualHost> 
+0

필자는'ProxyPass..','ProxyPassReserve..' 및'ProxyPreserveHost..' 행에 주석을 달았습니다. '... (UndertowEventHandlerAdapter - 1)에서 오류가 발생했습니다. MODECLUSTER000042 : INFO 명령을 debian1-2.local/192.168.0.104 : 6666으로 보내는 중 오류가 발생했습니다. 구성이 재설정됩니다 : null'. – Francesco

+1

당신은 아파치 설정에이 VirtualHost 항목을 모두 가지고 있습니까?두 번째 목표가 무엇인지 설명해 주시겠습니까? – Bruno

+1

또한 wildfly 측에서 구성을 완료/확인 했습니까? – Bruno