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 64364200CA3 for ; Thu, 1 Jun 2017 18:08:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 62B2A160BC4; Thu, 1 Jun 2017 16:08:56 +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 81640160BB5 for ; Thu, 1 Jun 2017 18:08:55 +0200 (CEST) Received: (qmail 19558 invoked by uid 500); 1 Jun 2017 16:08:49 -0000 Mailing-List: contact dev-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list dev@airflow.incubator.apache.org Received: (qmail 19546 invoked by uid 99); 1 Jun 2017 16:08:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 16:08:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0CCA3C0AD2 for ; Thu, 1 Jun 2017 16:08:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.381 X-Spam-Level: ** X-Spam-Status: No, score=2.381 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id zr8YbwIYt7_i for ; Thu, 1 Jun 2017 16:08:47 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5364E5F254 for ; Thu, 1 Jun 2017 16:08:47 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id 7so163633721wmo.1 for ; Thu, 01 Jun 2017 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=05VSY05mgZGt1QLu1f0MYMxcKTq3zN71Cblg4jVDaMY=; b=U3gjdezq9lFWusOv0DVf/pZMQ726SIFTWgRbknB+qBSbjSJLsdn+dK28YutmpUDld/ YQTKeAhGkV71NEMB8TVDTmcrjlHzF16kU/eofDNoaux6+CDJ1qxYbdJhlxWzoZyxfyYG O9E5TaAiAxPJeB/iAR7NRwgG4F+vn79tCuttbqRUrY2CIqfdEvoy3HgkpGLkJ6xyaful Vhh1o0lpQ3BPAFG6FUMy27NnqXMvPbAfC8bNqsiDJWwzplaJ84pYoGEmBNy7onTCBmZ8 XfvRq41FDYpHzP63EyJIEfo24Nm1SOKeo7aFsvD0JDS0DAl1K3nRlKuT9Q91WYXTTHjR 5B2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=05VSY05mgZGt1QLu1f0MYMxcKTq3zN71Cblg4jVDaMY=; b=Bf4NwR5mxUk5tnrDQ3ioPfTipUf+fO8dDdFHTgPmiP3a7WU49Ce2F/4pO3y8pPkLUo YbRICUxbFalGG0/DHqDZfAux8/ZkPSzOA7jScyQciP5khM2FY77gOOjT+rgVP3spf8Oj WgRFtxsjIU/gGEYs76nL90YOO834lf/YDfggk5j6PwVkdAassn0WEoeJ5w31KlaKygUy CVkc7QQ66GRc6fQt+SG0SiVTSloFhoYYsE7oI5pCuNAIhYmapCotSSAPQTuMBnAdawgS Td+Shm0mbZBSP+mE0axBpd9cQp1tUUifro/Lfs0pC7eZfhXH1WAHjZUK+29ygxX8wned cgaw== X-Gm-Message-State: AODbwcAg7xuOaBks5snyERohs8QsYPk/29ubWF888fP5zDmDNRtdZmvN 2I1EyDazM7Z71/4aLya2o6chRkK+2Lnw X-Received: by 10.223.161.130 with SMTP id u2mr1105432wru.203.1496333326291; Thu, 01 Jun 2017 09:08:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.152.83 with HTTP; Thu, 1 Jun 2017 09:08:45 -0700 (PDT) In-Reply-To: References: From: Maxime Beauchemin Date: Thu, 1 Jun 2017 09:08:45 -0700 Message-ID: Subject: Re: Subdag failure To: dev@airflow.incubator.apache.org Content-Type: multipart/alternative; boundary="f403045f3ed4617cd30550e840f1" archived-at: Thu, 01 Jun 2017 16:08:56 -0000 --f403045f3ed4617cd30550e840f1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable For the record: https://github.com/apache/incubator-airflow/pull/2336/files On Thu, Jun 1, 2017 at 8:50 AM, Maxime Beauchemin < maximebeauchemin@gmail.com> wrote: > From memory, I'm pretty sure `--local` simply means "run locally without > going through an executor" (as opposed to "run through LocalExecutor" tha= t > you assume). For the record, there are 3 levels of `airflow run`, let's g= o > deeper: > > 1. `airflow run` which typically is only called through a user using the > CLI, and talks to the executor > 2. `airflow run --local` which is executed locally, "on the other side" o= f > the executor, and wraps level 3 (explained bellow) while managing > heartbeats and looking for external kill signals. If you us the CGROUP or > impersonation feature, I believe this has to run with elevated priviledge= s. > Workers typically receive and execute these commands. > 3. `airflow run --raw` which actually runs the operator's execute method, > impersonation and CGROUPs restrictions apply here > > This is a bit confusing and it could help to make `--local` and `--raw` > more "private", as in for system/internal use only. > > I also just noticed that the `--local` for `airflow run` is wrong in the > docs as it's re-using the backfill help text, I'll send a PR to fix the > docs. > > Max > > On Thu, Jun 1, 2017 at 1:31 AM, Zsolt T=C3=B3th > wrote: > >> Hi devs, >> >> I got an issue with airflow subdags, that I can't debug or trace. >> A specific subdag fails nondeterministically (usually it fails) when it'= s >> scheduled by Airflow, and runs fine when the task is re-executed manuall= y. >> >> For the first subtask in the dag the logs can't be found by airflow, but >> that may be a different issue. If the subtask succeeds, Airflow finds th= e >> logs, too. >> >> *** Log file isn't local.=E2=80=A6*** Fetching here: >> http://None:8793/log///201 >> 7-05-28T00:45:00=E2=80=A6*** >> Failed to fetch log file from worker. >> >> If I look into the logs, I can't find any specific details. The >> SubdagOperator's logs: >> >> [2017-05-30 14:06:06,117] {models.py:1219} INFO - Executing >> > on 2017-05-18 00:45:00 >> [2017-05-30 14:06:06,247] {base_executor.py:36} INFO - Adding to queue: >> airflow run 2017-05-18T00:45:00 >> --local >> -sd DAGS_FOLDER/parent_dag_file.py >> [2017-05-30 14:06:11,151] {sequential_executor.py:26} INFO - Executing >> command: airflow run >> 2017-05-18T00:45:00 --local -sd DAGS_FOLDER/parent_dag_file.py >> [2017-05-30 14:06:12,119] {sequential_executor.py:33} ERROR - Failed to >> execute task Command 'airflow run >> 2017-05-18T00:45:00 --local -sd DAGS_FOLDER/parent_dag_file.py ' returne= d >> non-zero exit status 1: >> [2017-05-30 14:06:12,125] {jobs.py:924} ERROR - Task instance >> ('', '', datetime.datetime(2017, 5, 18= , >> 0, 45)) failed >> [2017-05-30 14:06:12,125] {jobs.py:997} INFO - [backfill progress] | >> waiting: 2 | succeeded: 0 | kicked_off: 1 | failed: 1 | skipped: 0 | >> deadlocked: 0 >> [2017-05-30 14:06:16,150] {jobs.py:997} INFO - [backfill progress] | >> waiting: 0 | succeeded: 0 | kicked_off: 1 | failed: 1 | skipped: 0 | >> deadlocked: 2 >> [2017-05-30 14:06:16,182] {models.py:1286} ERROR - >> --------------------------------------------------- >> Some task instances failed: >> set([('', '', datetime.datetime(2017, >> 5, >> 18, 0, 45))]) >> ... >> >> Regarding the subdag's tasks, only the first task contains any logs, and >> only this single line: >> [2017-05-30 14:06:11,980] {models.py:154} INFO - Filling up the DagBag >> from >> >> >> I suspected that the issue may be that Airflow is configured to use the >> SequentialExecutor, but the airflow run command in the logs has the >> --local >> switch, which I think forces the LocalExecutor. I tried to change this t= o >> SequentialExecutor by setting the SubdagOperator's executor field, but t= he >> --local switch is still there. >> >> I'm using Airflow 1.7.1.3. >> >> Thanks, >> Zsolt >> > > --f403045f3ed4617cd30550e840f1--