UNABLE TO CONNECT AIRFLOW VIA “http://:8080/login/” (Alexis One-Click Anomaly Detection)

Problem statement: Not able to connect to airflow via “http://:8080/login/”

Error:

Got this “FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn': 'gunicorn'” error after running this command “airflow webserver --port 8080”

Solution:

  1. Based on the airflow webserver error of gunicorn, we found this solution for it: https://stackoverflow.com/questions/66640375/gunicorn-giving-error-while-run-apache-airflow-webserver
  2. Once you make the changes in the AWS EC2 mentioned in the above link then please follow these steps for debugging the issue:
    1. Stop every airflow running process. You can use this command: killall airflow
    2. Check if all the airflow running processes are stopped using this command: ps aux | grep airflow
    3. If you see the following files in the airflow directory then delete them. You will find these files in the same airflow directory where you edited the airflow.cfg file.
      1. airflow-webserver-monitor.pid
      2. airflow-webserver.pid
      3. airflow-scheduler.pid
    4. Start the airflow webserver in a terminal by using this command: airflow webserver --port 8080
    5. Start the airflow scheduler in another terminal by using this command: airflow scheduler
    6. Try accessing the airflow via URL in a browser.

 

Note: As we are not running the airflow webserver and scheduler as a background as we did not include the “-D” parameter in the above commands. So, if you close any of the two terminals then airflow will stop working. The above steps are just used for debugging the issue.