Not able to connect to airflow via “http://
Got this “FileNotFoundError: [Errno 2] No such file or directory: 'gunicorn': 'gunicorn'” error after running this command “airflow webserver --port 8080”
- 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
- Once you make the changes in the AWS EC2 mentioned in the above link then please follow these steps for debugging the issue:
- Stop every airflow running process. You can use this command: killall airflow
- Check if all the airflow running processes are stopped using this command: ps aux | grep airflow
- 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.
- Start the airflow webserver in a terminal by using this command: airflow webserver --port 8080
- Start the airflow scheduler in another terminal by using this command: airflow scheduler
- 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.