2014-12-24 8 views
0

개발중인 소프트웨어의 개발 환경을 만들려고합니다. 이를 위해 Mac (Yosemite)에서 작업하기 때문에 Docker와 Boot2docker를 사용합니다. 제품에서 Hazelcast를 사용하지만, "도킹"할 때 문제가 있습니다. 여기 Hazelcast하는 첫 번째 연결에서 발생 내용은 다음과 같습니다Boot2Docker Hazelcast 및 ulimit

INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Hazelcast Community Edition 3.2.2 (20140527) starting at Address[172.17.0.2]:5601 
déc. 24, 2014 2:11:27 PM com.hazelcast.system 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Copyright (C) 2008-2014 Hazelcast.com 
déc. 24, 2014 2:11:27 PM com.hazelcast.core.LifecycleService 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Address[172.17.0.2]:5601 is STARTING 
déc. 24, 2014 2:11:27 PM com.hazelcast.instance.Node 
AVERTISSEMENT: [172.17.0.2]:5601 [akio] [3.2.2] No join method is enabled! Starting standalone. 
déc. 24, 2014 2:11:27 PM com.hazelcast.core.LifecycleService 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Address[172.17.0.2]:5601 is STARTED 
déc. 24, 2014 2:12:30 PM com.hazelcast.nio.SocketAcceptor 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Accepting socket connection from /127.0.0.1:55736 
déc. 24, 2014 2:12:30 PM com.hazelcast.nio.TcpIpConnectionManager 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] 5601 accepted socket connection from /127.0.0.1:55736 
déc. 24, 2014 2:12:30 PM com.hazelcast.client.AuthenticationRequest 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Received auth from Connection [/127.0.0.1:55736 -> null] live=true, client=true, type=JAVA_CLIENT, successfully authenticated 
déc. 24, 2014 2:12:30 PM com.hazelcast.nio.SocketAcceptor 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Accepting socket connection from /172.17.0.2:57088 
déc. 24, 2014 2:12:30 PM com.hazelcast.nio.TcpIpConnectionManager 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] 5601 accepted socket connection from /172.17.0.2:57088 
déc. 24, 2014 2:12:30 PM com.hazelcast.client.AuthenticationRequest 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Received auth from Connection [/172.17.0.2:57088 -> null] live=true, client=true, type=JAVA_CLIENT, successfully authenticated 
déc. 24, 2014 2:12:31 PM com.hazelcast.partition.InternalPartitionService 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Initializing cluster partition table first arrangement... 
déc. 24, 2014 2:13:42 PM com.hazelcast.nio.TcpIpConnection 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Connection [Address[172.17.0.2]:57088] lost. Reason: Socket explicitly closed 
déc. 24, 2014 2:13:42 PM com.hazelcast.nio.TcpIpConnection 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Connection [Address[127.0.0.1]:55736] lost. Reason: Socket explicitly closed 
déc. 24, 2014 2:13:42 PM com.hazelcast.initializer 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Destroying node initializer. 
déc. 24, 2014 2:13:42 PM com.hazelcast.instance.Node 
INFOS: [172.17.0.2]:5601 [akio] [3.2.2] Hazelcast Shutdown is completed in 111 ms. 
java.lang.OutOfMemoryError: unable to create new native thread 
déc. 24, 2014 2:13:42 PM com.hazelcast.concurrent.lock.operations.LockOperation 
GRAVE: [172.17.0.2]:5601 [akio] [3.2.2] unable to create new native thread 
java.lang.OutOfMemoryError: unable to create new native thread 
    at java.lang.Thread.start0(Native Method) 
    at java.lang.Thread.start(Thread.java:714) 
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949) 
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360) 
    at com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.runAsynchronous(BasicInvocation.java:617) 
    at com.hazelcast.spi.impl.BasicInvocation$InvocationFuture.set(BasicInvocation.java:668) 
    at com.hazelcast.spi.impl.BasicInvocation.notify(BasicInvocation.java:303) 
    at com.hazelcast.spi.impl.BasicPartitionInvocation.notify(BasicPartitionInvocation.java:28) 
    at com.hazelcast.spi.impl.ResponseHandlerFactory$LocalInvocationResponseHandler.sendResponse(ResponseHandlerFactory.java:144) 
    at com.hazelcast.spi.impl.BasicOperationService.processOperation(BasicOperationService.java:385) 
    at com.hazelcast.spi.impl.BasicOperationService.access$300(BasicOperationService.java:102) 
    at com.hazelcast.spi.impl.BasicOperationService$BasicOperationProcessorImpl.process(BasicOperationService.java:754) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.process(BasicOperationScheduler.java:276) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.doRun(BasicOperationScheduler.java:270) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.run(BasicOperationScheduler.java:245) 

déc. 24, 2014 2:13:42 PM com.hazelcast.spi.OperationService 
AVERTISSEMENT: [172.17.0.2]:5601 [akio] [3.2.2] While sending op error... op: [email protected], error: java.lang.OutOfMemoryError: unable to create new native thread 
com.hazelcast.spi.exception.ResponseAlreadySentException: NormalResponse already sent for callback: BasicInvocation{ serviceName='hz:impl:lockService', [email protected]2a, partitionId=50, replicaIndex=0, tryCount=100, tryPauseMillis=500, invokeCount=1, callTimeout=10000, target=Address[172.17.0.2]:5601}, current-response: : com.hazelcast.core.HazelcastInstanceNotActiveException: Hazelcast instance is not active! 
    at com.hazelcast.spi.impl.ResponseHandlerFactory$LocalInvocationResponseHandler.sendResponse(ResponseHandlerFactory.java:141) 
    at com.hazelcast.spi.impl.BasicOperationService.handleOperationError(BasicOperationService.java:531) 
    at com.hazelcast.spi.impl.BasicOperationService.processOperation(BasicOperationService.java:404) 
    at com.hazelcast.spi.impl.BasicOperationService.access$300(BasicOperationService.java:102) 
    at com.hazelcast.spi.impl.BasicOperationService$BasicOperationProcessorImpl.process(BasicOperationService.java:754) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.process(BasicOperationScheduler.java:276) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.doRun(BasicOperationScheduler.java:270) 
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.run(BasicOperationScheduler.java:245) 

구글에이 오류를 검색 한 후 때문에 사용자가 제어 할 수있는 경계 과정에 발생할 수 있습니다. 내 연구 후, 호스트 (Boot2Docker)에서 "ulimit -u"로 사용해야하지만 옵션을 제공하지 않습니다.

누군가 이미 문제가 발생 했습니까? 그렇다면 주변을 둘러 볼 수 있습니까?

PS : 도커 호스트 = 마지막에 CentOS 6.6 자바 버전 "1.7.0_60" Hazelcast = 나는 "ulimit를 -u"하지만, 일반적으로 당신을 수있는 옵션을 제공하지 않습니다 모르겠어요 3.2.2

+0

메모리 부족 예외가 관련되어 있습니까? java.lang.OutOfMemoryError : 새 네이티브 스레드를 만들 수 없습니다. –

+0

실제로 서비스 중단을 설명하는 유일한 단서입니다. – Ben

답변

0

이것을 리눅스 셸에서 실행하십시오. 도커 컨테이너 내부 및 호스트 시스템의 열린 파일에 대한 소프트 및 하드 제한을 구성해야합니다. 도커를 직접 사용하지는 않았지만 이것은 일반적인 리눅스 문제입니다. Hazelcast가 아닌 도커는 아닙니다.

+0

도커를 사용하면 호스트에 한계를 설정해야합니다 (경쟁자 자체에서는 불가능 함). Docker는 Mac에서 기본적으로 작동하지 않으므로 boot2docker (Tiny Core Linux 기반 VM)에서 실행해야합니다. 그러나 boot2docker의 ulimit는 사용자 당 최대 스레드 수를 설정하는 -u 옵션을 제공하지 않습니다. – Ben