osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: question about bring up airflow webserver using cron job


Resend this question. Thanks.
---------- Forwarded message ----------
From: Vivian Wang <vivianwang@xxxxxxxxxxx>
Date: Sat, Apr 21, 2018 at 11:09 PM
Subject: question about bring up airflow webserver using cron job
To: dev@xxxxxxxxxxxxxxxxxxxxxxxxxxxx


Hi,

I use AWS ec2 server:


NAME="Amazon Linux AMI"

VERSION="2016.03"

ID="amzn"

ID_LIKE="rhel fedora"

VERSION_ID="2016.03"

PRETTY_NAME="Amazon Linux AMI 2016.03"

ANSI_COLOR="0;33"

CPE_NAME="cpe:/o:amazon:linux:2016.03:ga"

HOME_URL="http://aws.amazon.com/amazon-linux-ami/";

user_id: ec2-user

When I bring up airflow webserver manually  using following command, it's
fine.

/usr/local/bin/airflow webserver -p 8080 -D

but  when run this in cronjob:

sudo -u ec2-user -i /usr/local/bin/airflow webserver -p 8080 -D


then I got error about this:
Traceback (most recent call last):
 File “/usr/local/bin/airflow”, line 27, in <module>
   args.func(args)
 File “/usr/local/lib/python2.7/site-packages/airflow/bin/cli.py”, line
769, in webserver
   subprocess.Popen(run_args)
 File “/usr/lib64/python2.7/subprocess.py”, line 710, in __init__
   errread, errwrite)
 File “/usr/lib64/python2.7/subprocess.py”, line 1335, in _execute_child
   raise child_exception
OSError: [Errno 2] No such file or directory

I tried a lot time, but cannot figure out the problem.
Please help me.

Thanks.

-- 

Vivian Wang

Sr. Data Engineer

O:

C:

<http://transfix.io>

LinkedIn <https://www.linkedin.com/company/1694643/> | Twitter
<https://twitter.com/transfixio> | Facebook
<https://www.facebook.com/transfixIO>



-- 

Vivian Wang

Sr. Data Engineer

O:

C:

<http://transfix.io>

LinkedIn <https://www.linkedin.com/company/1694643/> | Twitter
<https://twitter.com/transfixio> | Facebook
<https://www.facebook.com/transfixIO>

-- 
This message may contain confidential and privileged information.  If it 
has been sent to you in error, please reply to advise the sender of the 
error and then immediately delete this message.