2014-12-09 6 views
2

다음은 시나리오입니다.어떻게 디버그 akka 협회 porcess?

  1. 스프레이가 포함 된 스칼라 프로젝트를 jar 파일에 패키지했습니다.
  2. 시작 jar 파일 버추얼 박스 (IP. - 192.168.1 38)에 레드햇 6.5의 가상 상자에 레드햇 6.5에
  3. 시작 jar 파일 (IP -. 192.168.1 41)
  4. 모든 로컬로 작동 - 각 가상 시스템에 REST 요청을 보내고 응답을받을 수 있습니다.

문제

Akka 시스템은 클러스터되었다 수 없습니다. 192.168.1을 실행합니다. , 기본 설정은 192.168.1입니다. 에는 akka.tcp://[email protected]:2551으로 설정된 추가 등록 정보 (akka.cluster.seed-nodes)가 있습니다. 알았어.

[WARN] [12/09/2014 17:10:24.043] [mySystem-akka.remote.default-remote-dispatcher-8] [akka.tcp://[email protected]:2551/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FmySystem%40192.168.1.38%3A2551-0] Association with remote system [akka.tcp://[email protected]:2551] has failed, address is now gated for [5000] ms. Reason is: [Association failed with [akka.tcp://[email protected]:2551]]. 

다른 오류나 경고는 없습니다. 또한 akka 연관을 테스트하거나 akka 연관 설정을 인쇄 할 수 있습니까?

또한 리눅스 설정이 akka 연관에 영향을 줍니까?

답변

2

아마도 iptables이 특정 포트를 차단하고 있습니다. 테스트 구성이라면 iptables를 비활성화하십시오.

service iptables save 
service iptables stop 
chkconfig iptables off 

service ip6tables save 
service ip6tables stop 
chkconfig ip6tables off 

이 명령 getenforce 당신이 완전히 비활성화 할 수 있습니다 테스트 목적으로이를 이용하여 당신에게 SELinux 구성을 확인하려고 도움이되지 않을 경우

. 당신의 application.conf의 경우 SELinux manual

, 각 노드에 대해 다음과 같은 구성을 사용해보십시오 : 클러스터 노드에 관련된

akka { 

    log-dead-letters = on 
    loglevel = "debug" 

    actor 
    { 
    provider = "akka.cluster.ClusterActorRefProvider" 
    } 
    extensions = ["akka.contrib.pattern.ClusterReceptionistExtension"] 

    remote { 
    log-remote-lifecycle-events = off 
    netty.tcp { 
     port = 6001 
    } 
    } 
    cluster { 
    seed-nodes = [ 
     "akka.tcp://[email protected]:6001", 
     "akka.tcp://[email protected]:6001" 
    ] 
    auto-down-unreachable-after = 10s 
    } 
} 

모든 로그 info로 기록하지만 테스트 환경에서 debug 로그 레벨을 갖는됩니다 일반적으로 좋은입니다 생각. 두 번째 노드가 클러스터에 가입 할 때

, 당신은 로그에 다음과 같은주의해야합니다

INFO [ActorSystem-akka.actor.default-dispatcher-4] [Cluster(akka://ActorSystem)] - Cluster Node [akka.tcp://[email protected]:6001] - Marking node(s) as REACHABLE [Member(address = akka.tcp://[email protected]:6001, status = Up)] 

클러스터 상태는 JMX akka.Cluster MXBean의

{ "self-address": "akka.tcp://[email protected]:6001", "members": [  {  "address": "akka.tcp://[email protected]:6001",  "status": "Up"  } ], "unreachable": [  ] } 
+0

예, iptables를 정지해야 사용하여 모니터링 할 수 있습니다. 도움이되었습니다. :) – Cherry