airflow webserver started but UI doesn't show in browser

Issue

I’m trying to use airflow .

I want to take a local test of the dags I wrote. I’m on windows so I decided to install ubuntu WLS following this bief tutorial https://coding-stream-of-consciousness.com/2018/11/06/apache-airflow-windows-10-install-ubuntu/.
Everything seems fine.

I started my db with airflow initdb.

Then I run airflow webserver -p 8080 and it seems running. When I go to http://0.0.0.0:8080/ I can’t see any user interface. If I try to run again the airflow webserver I got

Error: Already running on PID 6244 (or pid file '/home/marcofumagalli/airflow/airflow-webserver.pid' is stale)

so i suppose that webserver is running.

Is it something related to proxy?

Solution

Error: Already running on PID 6244 (or pid file '/home/marcofumagalli/airflow/airflow-webserver.pid' is stale)

This means that the port 8080 is busy.

Try running the commands below:-

  1. sudo lsof -i tcp:8080:- will show are the processes running as

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Python 945 amanraheja 6u IPv4 0xb7fcab59337d7455 0t0 TCP *:http-alt (LISTEN)
Python 1009 amanraheja 6u IPv4 0xb7fcab59337d7455 0t0 TCP *:http-alt (LISTEN)
Python 1052 amanraheja 6u IPv4 0xb7fcab59337d7455 0t0 TCP *:http-alt (LISTEN)
Python 1076 amanraheja 6u IPv4 0xb7fcab59337d7455 0t0 TCP *:http-alt (LISTEN)
Python 96034 amanraheja 6u IPv4 0xb7fcab59337d7455 0t0 TCP *:http-alt (LISTEN)

  1. Kill the PID’s by kill -9 945 and so on..

  2. delete the airflow-webserver.pid file and start the server again and you will see that it is running fine.

Answered By – Aman Raheja

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published