2017-09-04 9 views
0

마라톤, mesos-master, mesos-slave 및 Zookeeper (HA 구성 사용)를 실행 한 다음 mesos-execute를 사용하여 간단한 hello 응용 프로그램 배포를 테스트 한 결과 다음과 같이 작동합니다. 예상했다.마라톤 응용 프로그램 배포가 멈추다 대기 상태

이제 모든 것이 잘 보입니다. 따라서 Marathon에 연결하여 마라톤을 테스트하는 간단한 응용 프로그램 (echo "hello">> /tmp/output.txt)을 배포하지만 응용 프로그램은 "대기 중"상태로 빨려 들게됩니다.

Marathon이 배포를 위해 mesos 리소스를 사용할 수 없게되는 문제는 무엇입니까? 메소 마스터에서

로그 :

I0904 11:23:27.064332 19769 master.cpp:2813] Received SUBSCRIBE call for framework 'marathon' at [email protected]:36324 
I0904 11:23:27.064623 19769 master.cpp:2890] Subscribing framework marathon with checkpointing enabled and capabilities [ PARTITION_AWARE ] 
I0904 11:23:27.064669 19769 master.cpp:6272] Updating info for framework cb16118a-2257-4020-a907-63aa6294e11b-0000 
I0904 11:23:27.064697 19769 master.cpp:2994] Framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 failed over 
I0904 11:23:27.065032 19770 hierarchical.cpp:342] Activated framework cb16118a-2257-4020-a907-63aa6294e11b-0000 
I0904 11:23:27.065465 19770 master.cpp:7305] Sending 3 offers to framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 
I0904 11:23:27.907865 19769 http.cpp:1115] HTTP GET for /files/read?_=1504517007920&jsonp=jQuery17109098185077823333_1504516979864&length=50000&offset=352538&path=%2Fmaster%2Flog from 192.168.40.1:53525 with User-Agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36' 
I0904 11:23:28.916651 19768 http.cpp:1115] HTTP GET for /files/read?_=1504517008930&jsonp=jQuery17109098185077823333_1504516979865&length=50000&offset=353797&path=%2Fmaster%2Flog from 192.168.40.1:53525 with User-Agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36' 
E0904 11:23:30.071293 19775 process.cpp:2450] Failed to shutdown socket with fd 39, address 192.168.40.159:58072: Transport endpoint is not connected 
I0904 11:23:30.073277 19768 master.cpp:1430] Framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 disconnected 
I0904 11:23:30.073307 19768 master.cpp:3160] Deactivating framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 
I0904 11:23:30.073485 19768 master.cpp:3137] Disconnecting framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 
I0904 11:23:30.073496 19768 master.cpp:1445] Giving framework cb16118a-2257-4020-a907-63aa6294e11b-0000 (marathon) at [email protected]:36324 1weeks to failover 
I0904 11:23:30.073519 19768 hierarchical.cpp:374] Deactivated framework cb16118a-2257-4020-a907-63aa6294e11b-0000 

컬 -XGET 'http://mesosphere2:8098/v2/queue?pretty'| 앱이 "대기"에 남아

{ 
    "queue": [ 
    { 
     "count": 1, 
     "delay": { 
     "timeLeftSeconds": 0, 
     "overdue": true 
     }, 
     "since": "2017-09-04T13:12:42.024Z", 
     "processedOffersSummary": { 
     "processedOffersCount": 12, 
     "unusedOffersCount": 12, 
     "lastUnusedOfferAt": "2017-09-04T13:14:52.554Z", 
     "rejectSummaryLastOffers": [ 
      { 
      "reason": "UnfulfilledRole", 
      "declined": 3, 
      "processed": 3 
      }, 
      { 
      "reason": "UnfulfilledConstraint", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "NoCorrespondingReservationFound", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientCpus", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientMemory", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientDisk", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientGpus", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientPorts", 
      "declined": 0, 
      "processed": 0 
      } 
     ], 
     "rejectSummaryLaunchAttempt": [ 
      { 
      "reason": "UnfulfilledRole", 
      "declined": 12, 
      "processed": 12 
      }, 
      { 
      "reason": "UnfulfilledConstraint", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "NoCorrespondingReservationFound", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientCpus", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientMemory", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientDisk", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientGpus", 
      "declined": 0, 
      "processed": 0 
      }, 
      { 
      "reason": "InsufficientPorts", 
      "declined": 0, 
      "processed": 0 
      } 
     ] 
     }, 
     "app": { 
     "id": "/test03", 
     "acceptedResourceRoles": [ 
      "slave_public" 
     ], 
     "backoffFactor": 1.15, 
     "backoffSeconds": 1, 
     "container": { 
      "type": "DOCKER", 
      "docker": { 
      "forcePullImage": false, 
      "image": "laghao/hello-marathon", 
      "network": "BRIDGE", 
      "parameters": [], 
      "portMappings": [ 
       { 
       "containerPort": 80, 
       "hostPort": 80, 
       "labels": {}, 
       "protocol": "tcp", 
       "servicePort": 10003 
       } 
      ], 
      "privileged": false 
      }, 
      "volumes": [] 
     }, 
     "cpus": 0.1, 
     "disk": 0, 
     "executor": "", 
     "instances": 1, 
     "labels": {}, 
     "maxLaunchDelaySeconds": 3600, 
     "mem": 64, 
     "gpus": 0, 
     "portDefinitions": [ 
      { 
      "port": 10003, 
      "name": "default", 
      "protocol": "tcp" 
      } 
     ], 
     "requirePorts": false, 
     "upgradeStrategy": { 
      "maximumOverCapacity": 1, 
      "minimumHealthCapacity": 1 
     }, 
     "version": "2017-09-04T13:12:41.993Z", 
     "versionInfo": { 
      "lastScalingAt": "2017-09-04T13:12:41.993Z", 
      "lastConfigChangeAt": "2017-09-04T13:12:41.993Z" 
     }, 
     "killSelection": "YOUNGEST_FIRST", 
     "unreachableStrategy": { 
      "inactiveAfterSeconds": 300, 
      "expungeAfterSeconds": 600 
     } 
     } 
    } 
    ] 
} 
+0

마라톤 로그를 표시 할 수 있습니까? _waiting_은 응용 프로그램 제한 조건을 충족시키는 데 사용할 수있는 자원이 없음을 의미합니다. 최신 Marathon 1.4+에서는 [/ v2/queue endpoint] (https://mesosphere.github.io/marathon/docs/generated/api.html#v2_queue_get)를 사용하여 주어진 배포에 대해 누락 된 리소스를 디버깅 할 수 있습니다. – janisz

답변

0

documentation에서 JQ 영원히 이 마라톤은이 응용 프로그램의 작업을 시작할 수 메소에서 "자원 오퍼 '수신하지 않음을 의미한다. 가장 간단한 실패는 클러스터에 사용 가능한 리소스가 충분하지 않거나 다른 프레임 워크가 이러한 리소스를 모두 소유하고 있다는 것입니다. Mesos UI에서 사용 가능한 리소스를 확인할 수 있습니다. 필요한 리소스 (예 : CPU, Mem, Disk)는 모두 단일 호스트에서 사용할 수 있어야합니다.

직접 해결책을 찾지 못하고 GitHub 문제를 만들면 사용 가능한 클러스터 리소스를 검사 할 수 있도록 Mesos/state 끝점 출력을 버그 보고서에 추가하십시오.

응용 프로그램 역할 요구 사항 및 에이전트 역할에 문제가 있습니다. UnfulfilledRole에서 추론 할 수 있습니다.

Marathon 1.4에서는 중단 된 배포에 대한 정보가 도입되었습니다. /v2/queue을 쿼리하고 쿠폰이 거부 된 이유에 대한 통계를 볼 수 있습니다.

+0

잘 "대기"상태에 대한 스레드를 읽었지만 리소스를 사용할 수 있기 때문에 직접 mesos를 통해 배포 할 수 있으므로 문제는 어떻게 든 mesos-marathon 통신 사이에서 발생하며 스레드는 Marathon 그룹에서도 열립니다./v2/queue는 거기에 게시 : https://groups.google.com/forum/#!topic/marathon-framework/r1aKkRXIXAE –

+0

문제는 역할과 같습니다. 애플리케이션 json 및 에이전트 구성을 보여줄 수 있습니까? – janisz

+0

맞습니다. 배포 스크립트를 다시 변경했고 그룹에서 확인할 수 있습니다. 배치하고 배포 할 수 있습니까? –