Reputation: 2477
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?
Upvotes: 16
Views: 35561
Reputation: 854
In order to be able to see UI up and running on your browser at http://localhost:8080/
, you need also to run port forwarding: kubectl port-forward POD_ID 8080:8080
Upvotes: 0
Reputation: 8012
If you're running Airflow in a Docker, then killing the PID won't help, neither restarting the service. What you need to do is to search for the Docker container of Airflow's webserver and remove it like this:
docker ps
CONTAINER ID IMAGE ... PORTS NAMES
25d9df23d557 apache/airflow:2.3.2 ... 8080/tcp airflow-webserver
docker container rm {airflow-webserver}
Upvotes: 0
Reputation: 5249
I hit this error while developing in my mac, and looking at the logs I found an exited with code: 137
, which is an OOM code (although perhaps not always).
In any case, I fixed it by increasing the memory limit to 3GB in docker, following these docs:
Upvotes: 9
Reputation: 183
hey actually same thing happened with me. i am sharing following steps which i did. kill the running pid by using kill pid command. then confirm that you have initiated db with airflow db init command. and created user by using airflow users create command. after doing this step by step. use localhost:8080 in place 0.0.0.0:8080. it worked for me.
Upvotes: 1
Reputation: 615
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:-
sudo lsof -i tcp:8080
:- will show are the processes running asCOMMAND 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)
Kill the PID's by kill -9 945
and so on..
delete the airflow-webserver.pid
file and start the server again and you will see that it is running fine.
Upvotes: 21