Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view logs in UI #1436

Closed
aaur0 opened this issue Apr 27, 2016 · 1 comment
Closed

Unable to view logs in UI #1436

aaur0 opened this issue Apr 27, 2016 · 1 comment

Comments

@aaur0
Copy link
Contributor

aaur0 commented Apr 27, 2016

Environment

Before I tell you about my issue, let me describe my Airflow environment:

Airflow version:

154dec0 Merge pull request #1196 from jlowin/subdag_class
3198756 Merge pull request #1231 from msumit/boto_calling_format
16f53cc Add support for calling_format from boto to S3_Hook

Airflow components: UI

Python Version: 2.7

Operating System :

Linux WebServer-101557060-1-116499607 2.6.32-504.30.3.el6.x86_64 #1 SMP Wed Jul 15 10:13:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Description of Issue

The UI is not able to resolve the log file path. This is the error I get

screen shot 2016-04-26 at 4 54 57 pm

This seems to be happen because the path to the file is formed using the hostname, instead it should use the fully qualified domain name (FQDN).

@aaur0
Copy link
Contributor Author

aaur0 commented Apr 27, 2016

This issue can be fixed by replacing socket.gethostname() with socket.getfqdn()

Refer : http://stackoverflow.com/questions/20792499/how-to-get-fully-qualified-host-name-in-python

Also, even Python docs recommends using getfqdn over gethostname to fetch the hostname of the machine.

socket.gethostname()
Return a string containing the hostname of the machine where the Python interpreter is currently executing. If you want to know the current machine’s IP address, you may want to use gethostbyname(gethostname()). This operation assumes that there is a valid address-to-host mapping for the host, and the assumption does not always hold.Note: gethostname() doesn’t always return the fully qualified domain name; use getfqdn() (see above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants