Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 37816200AC8 for ; Tue, 7 Jun 2016 13:19:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 36169160A36; Tue, 7 Jun 2016 11:19:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 56DB0160A35 for ; Tue, 7 Jun 2016 13:19:23 +0200 (CEST) Received: (qmail 26551 invoked by uid 500); 7 Jun 2016 11:19:17 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 26536 invoked by uid 99); 7 Jun 2016 11:19:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2016 11:19:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C7CA018057D for ; Tue, 7 Jun 2016 11:19:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.999 X-Spam-Level: X-Spam-Status: No, score=-3.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_HI=-5] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id cHQKPoHSeBu0 for ; Tue, 7 Jun 2016 11:19:14 +0000 (UTC) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BEC5B5FAF4 for ; Tue, 7 Jun 2016 11:19:13 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.26,432,1459807200"; d="scan'208";a="221450605" Received: from tifenn.irisa.fr (HELO [131.254.17.40]) ([131.254.17.40]) by mail2-relais-roc.national.inria.fr with ESMTP; 07 Jun 2016 13:19:06 +0200 Subject: Re: how to debug HTTP API To: dev@mesos.apache.org References: <57569C1C.6020100@irisa.fr> From: Olivier Sallou Message-ID: <5756ADAC.8040406@irisa.fr> Date: Tue, 7 Jun 2016 13:19:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit archived-at: Tue, 07 Jun 2016 11:19:24 -0000 On 06/07/2016 12:25 PM, Guangya Liu wrote: > Olivier, > > For such case, seems there is sth wrong with your framework? can you please > run the following two commands and check the output? I don't think it is a framework issue, I receive offers, heartbeats etc... It is only at task creation step, when I have no rejection nor update message. It could be (certainly) an issue with the json task message I sent in the ACCEPT, but as there is no error, I have no way to understand what's wrong with it. > > curl "http://:5050/master/frameworks" 2>/dev/null|python -m > json.tool { "completed_frameworks": [], "frameworks": [ { "active": true, "capabilities": [], "checkpoint": false, "completed_tasks": [], "executors": [], "failover_timeout": 0.0, "hostname": "", "id": "e303a1f0-4e7c-4c32-aafc-8707ea2b2718-0021", "name": "GoDocker HTTP Framework", "offered_resources": { "cpus": 4.0, "disk": 459470.0, "mem": 14898.0, "ports": "[31000-32000]" }, "offers": [ { "framework_id": "e303a1f0-4e7c-4c32-aafc-8707ea2b2718-0021", "id": "1f1486e3-43ee-44c5-b073-82a901add956-O0", "resources": { "cpus": 4.0, "disk": 459470.0, "mem": 14898.0, "ports": "[31000-32000]" }, "slave_id": "e303a1f0-4e7c-4c32-aafc-8707ea2b2718-S0" } ], "registered_time": 1465298174.2483, "resources": { "cpus": 4.0, "disk": 459470.0, "mem": 14898.0, "ports": "[31000-32000]" }, "role": "*", "tasks": [], "unregistered_time": 0.0, "used_resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "user": "godocker_http_test", "webui_url": "" } ], "unregistered_frameworks": [] } > curl "http://:5050/master/state" 2>/dev/null|python -m > json.tool { "activated_slaves": 1.0, "build_date": "2016-04-14 15:44:54", "build_time": 1460648694.0, "build_user": "root", "completed_frameworks": [], "deactivated_slaves": 0.0, "elected_time": 1465298164.01165, "flags": { "allocation_interval": "1secs", "allocator": "HierarchicalDRF", "authenticate": "false", "authenticate_http": "false", "authenticate_slaves": "false", "authenticators": "crammd5", "authorizers": "local", "framework_sorter": "drf", "help": "false", "hostname_lookup": "true", "http_authenticators": "basic", "initialize_driver_logging": "true", "log_auto_initialize": "true", "log_dir": "/var/log/mesos", "logbufsecs": "0", "logging_level": "INFO", "max_completed_frameworks": "50", "max_completed_tasks_per_framework": "1000", "max_slave_ping_timeouts": "5", "port": "5050", "quiet": "false", "quorum": "1", "recovery_slave_removal_limit": "100%", "registry": "replicated_log", "registry_fetch_timeout": "1mins", "registry_store_timeout": "20secs", "registry_strict": "false", "root_submissions": "true", "slave_ping_timeout": "15secs", "slave_reregister_timeout": "10mins", "user_sorter": "drf", "version": "false", "webui_dir": "/usr/share/mesos/webui", "work_dir": "/var/lib/mesos", "zk": "zk://localhost:2181/mesos", "zk_session_timeout": "10secs" }, "frameworks": [ { "active": true, "capabilities": [], "checkpoint": false, "completed_tasks": [], "executors": [], "failover_timeout": 0.0, "hostname": "", "id": "e303a1f0-4e7c-4c32-aafc-8707ea2b2718-0021", "name": "GoDocker HTTP Framework", "offered_resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "offers": [], "registered_time": 1465298174.2483, "resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "role": "*", "tasks": [], "unregistered_time": 0.0, "used_resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "user": "godocker_http_test", "webui_url": "" } ], "git_sha": "555db235a34afbb9fb49940376cc33a66f1f85f0", "git_tag": "0.28.1", "hostname": "tifenn.irisa.fr", "id": "1f1486e3-43ee-44c5-b073-82a901add956", "leader": "master@127.0.1.1:5050", "log_dir": "/var/log/mesos", "orphan_tasks": [], "pid": "master@127.0.1.1:5050", "slaves": [ { "active": true, "attributes": { "hostname": "127.0.0.1" }, "hostname": "tifenn.irisa.fr", "id": "e303a1f0-4e7c-4c32-aafc-8707ea2b2718-S0", "offered_resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "pid": "slave(1)@127.0.1.1:5051", "registered_time": 1465298164.37517, "reregistered_time": 1465298164.37526, "reserved_resources": {}, "resources": { "cpus": 4.0, "disk": 459470.0, "mem": 14898.0, "ports": "[31000-32000]" }, "unreserved_resources": { "cpus": 4.0, "disk": 459470.0, "mem": 14898.0, "ports": "[31000-32000]" }, "used_resources": { "cpus": 0.0, "disk": 0.0, "mem": 0.0 }, "version": "0.28.1" } ], "start_time": 1465298159.26321, "unregistered_frameworks": [], "version": "0.28.1" } > > Thanks, > > Guangya > > On Tue, Jun 7, 2016 at 6:04 PM, Olivier Sallou > wrote: > >> Hi, >> I am trying to switch from Python to HTTP API. I use mesos 0.28.1 >> >> I could create framework to register, receive offers etc... but I have >> an issue accepting offers. >> >> I send my ACCEPT message but I do not receive any UPDATE message, only >> new offers and hearbeat messages. >> >> On mesos master logs I see: >> >> I0607 11:45:15.873184 14896 http.cpp:312] HTTP POST for >> /master/api/v1/scheduler from 127.0.0.1:38298 with >> User-Agent='python-requests/2.9.1' >> I0607 11:45:15.873584 14896 master.cpp:3104] Processing ACCEPT call for >> offers: [ e303a1f0-4e7c-4c32-aafc-8707ea2b2718-O28 ] on slave >> e303a1f0-4e7c-4c32-aafc-8707ea2b2718-S0 at slave(1)@127.0.1.1:5051 >> (tifenn.irisa.fr) for framework >> e303a1f0-4e7c-4c32-aafc-8707ea2b2718-0020 (GoDocker HTTP Framework) >> >> There is a "Processing ACCEPT" and no error, but my task is not ran on >> mesos. >> No error on slave either. >> >> Response code to my ACCEPT is 202 as expected. >> >> Here is my HTTP json message: >> >> {'type': 'ACCEPT', >> 'framework_id': {'value': u'e303a1f0-4e7c-4c32-aafc-8707ea2b2718-0020'}, >> 'accept': { >> 'operations': [ >> {'type': 'LAUNCH', >> 'launch': {'container': { >> 'docker': {'image': u'centos:latest', >> 'force_pull_image': True, 'port_mappings': [], 'network': 2}, >> 'type': 1, >> 'volumes': [ >> {'host_path': u'/a/b', 'container_path': >> u'/mnt/home', 'mode': 1}, >> {'host_path': u'/a/b/c', 'container_path': >> u'/mnt/go-docker', 'mode': 1}, >> {'host_path': u'/b/c/d', 'container_path': >> u'/mnt/god-data', 'mode': 2} >> ] >> }, >> 'name': u'testr', >> 'task_id': {'value': '128'}, >> 'command': {'uris': [{'value': >> u'/home/osallou/docker.tar.gz'}], 'value': u'/mnt/go-docker/wrapper.sh'}, >> 'slave_id': {'value': >> u'e303a1f0-4e7c-4c32-aafc-8707ea2b2718-S0'}, >> 'resources': [ >> {'scalar': {'value': 1}, 'type': 0, 'name': 'cpus'}, >> {'scalar': {'value': 2000}, 'type': 0, 'name': 'mem'} >> ] >> } # end launch >> } # end operation >> ], >> 'offer_ids': [{'value': u'e303a1f0-4e7c-4c32-aafc-8707ea2b2718-O28'}] >> } >> } >> >> There could be an issue with my task definition, but as no error is >> raised and I receive no UPDATE error message..... >> >> Any hint on how to debug this? >> >> Thanks >> >> >> -- >> Olivier Sallou >> IRISA / University of Rennes 1 >> Campus de Beaulieu, 35000 RENNES - FRANCE >> Tel: 02.99.84.71.95 >> >> gpg key id: 4096R/326D8438 (keyring.debian.org) >> Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438 >> >> -- Olivier Sallou IRISA / University of Rennes 1 Campus de Beaulieu, 35000 RENNES - FRANCE Tel: 02.99.84.71.95 gpg key id: 4096R/326D8438 (keyring.debian.org) Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438