2015-02-06 5 views
1

우리는 하나의 노드 자체가 horisontally distributed cube (8 노드) 인 다형성 큐브 (2 노드) 인 ActivePivot 큐브를 사용합니다. 배포를 위해 JGroup TCP를 사용하여 Tomcat에서 실행 중입니다. 매일 다시 시작되지만 종료 될 때마다 (노드 서비스가 순차적으로 중지됨) 로그에 다양한 오류가 표시됩니다. 이것은 무해하지만 모니터링의 관점에서 불리합니다.어떻게 분산 된 ActivePivot 설치를 완전히 종료합니까?

예 일일 (모두 동일한 노드)에서 :

19:00:17.353 ERROR [pivot-remote-0-][distribution] A safe broadcasting task could not be performed 
com.quartetfs.fwk.QuartetRuntimeException: [<node name>] Cannot run a broadcasting task with a STOPPED messenger 

사람이 종료하는 깨끗한 방법을 알고 있나요 : 또 다른 하루 (다수의 서로 다른 노드에서 동일한 오류)에서

19:04:43.100 ERROR [Pool-LongPollin][streaming] A listener dropped (5f587379-ac67-4645-8554-2e02ed739924). The number of listeners is now 1 
19:04:45.767 ERROR [Pool-LongPollin][streaming] Publishing global failure 
19:05:16.313 ERROR [localhost-start][core] Failed to stop feed type MDXFEED with id A1C1D8D92CF7D867F09DCB7E65077B18.0.PT0 

예 이런 식으로 내려?

답변

2

응용 프로그램 종료시 ActivePivotManager가 분산 된 ActivePivot에 다른 큐브가 중지되었음을 알리는 것을 기다리지 않고 적극적으로 배포를 중지하기 때문에 이러한 오류가 나타납니다.

원활하게 배포를 중지하려면 DistributionUtil 클래스의 메서드를 사용할 수 있습니다. 예를 들어 :

public class DistributionStopper { 

protected final IActivePivotManager manager; 

public DistributionStopper (IActivePivotManager manager){ 
    this.manager = manager; 
} 

public void stop(){ 
    // Get all the schemas from the manager 
    final Collection<IActivePivotSchema> schemas = manager.getSchemas().values(); 

    // To store all the available messengers 
    final List<IDistributedMessenger<?>> availableMessengers = new LinkedList<>(); 

    // Find all the messengers 
    for(IActivePivotSchema schema : schemas){ 
     for(String pivotId : schema.getPivotIds()){ 
      // Retrieve the activePivot matching this id 
      final IMultiVersionActivePivot pivot = schema.retrieveActivePivot(pivotId); 

      if(pivot instanceof IMultiVersionDistributedActivePivot){ 
       IDistributedMessenger<IActivePivotSession> messenger = ((IMultiVersionDistributedActivePivot) pivot).getMessenger(); 
       if(messenger != null){ 
        availableMessengers.add(messenger); 
       } 
      } 
     } 
    } 

    // Smoothly stop the messengers 
    DistributionUtil.stopMessengers(availableMessengers); 
} 

} 

는 다음의 destroyMethod은 관리자의 일 전에 호출 한 것으로 위해, activePivotManager 싱글 톤 빈에 따라 스프링 빈 등이 사용자 정의 클래스를 등록합니다.

+0

감사합니다. 다른 종료 오류가 있습니다 : [http : // localhost : 8080/remoting/LongPollingService]의 HTTP 호출자 원격 서비스에 액세스 할 수 없습니다. 중첩 예외가 java.net.SocketException : 연결 재설정,하지만 그 큐브 및 라이브 서버의 종료 순서에 관한 또 다른 문제가 있어야합니다 같아요. –

+0

수정 사항 : 제안 된 해결책이 개선되었지만 여전히 문제가 있습니다. 19 : 00 : 50.403 정보 [localhost-start] [DistributionStopper] 분산 메신저가 중지됨, 19 : 00 : 50.403 정보 [pivot-remote-0 -] [distribution ] 방송 작업 중에 예외가 발생했습니다. 재 시도 중 ... (...에 의해 ... 메신저가 연결되지 않음), 19 : 00 : 50.403 오류 [pivot-remote-0 -] [배포] 안전한 방송 작업을 수행 할 수 없습니다. 방송을 실행할 수 없습니다. STOPPED 메신저가있는 작업. –