rjurney / Agile_Data_Code_2

Code for Agile Data Science 2.0, O'Reilly 2017, Second Edition
http://bit.ly/agile_data_science
MIT License
456 stars 307 forks source link

Airflow not working #51

Closed josecyc closed 7 years ago

josecyc commented 7 years ago

Whenever I try to run the command $ airflow I get the following:

This happens with any airflow command

Traceback (most recent call last):
  File "/home/ubuntu/anaconda/bin/airflow", line 17, in <module>
    from airflow import configuration
  File "/home/ubuntu/anaconda/lib/python3.5/site-packages/airflow/__init__.py", line 29, in <module>
    from airflow import configuration as conf
  File "/home/ubuntu/anaconda/lib/python3.5/site-packages/airflow/configuration.py", line 769, in <module>
    with open(TEST_CONFIG_FILE, 'w') as f:
PermissionError: [Errno 13] Permission denied: '/home/ubuntu/airflow/unittests.cfg'

can someone please tell me what mistake I might be making.

I am running the ec2 instance...

RayBrown1 commented 7 years ago

Looks like the account running airflow does not have permission to write to the file "/home/ubuntu/airflow/unittests.cfg" which makes sense because the "ubuntu" user probably owns that file.

rjurney commented 7 years ago

@RayBrown1 Thank you, I can reproduce. Working on this...

rjurney commented 7 years ago

@RayBrown1 I get the same thing. Run this command (from aws/ec2_bootstrap.sh to fix it:

sudo chown -R ubuntu /home/ubuntu/airflow
sudo chgrp -R ubuntu /home/ubuntu/airflow
rjurney commented 7 years ago

Although the image is taking a long time to startup right now, I have resolved this issue.

RayBrown1 commented 7 years ago

Russell,

Take a look at the errata for your book. I’ve added a set of corrections. http://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920051619

Thanks, Ray

Sent from Mail for Windows 10

From: Russell Jurney Sent: Friday, July 28, 2017 10:58 PM To: rjurney/Agile_Data_Code_2 Cc: Ray Brown; Mention Subject: Re: [rjurney/Agile_Data_Code_2] Airflow not working (#51)

Although the image is taking a long time to startup right now, I have resolved this issue. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

josenavento commented 7 years ago

Thanks that worked for me!