How to stop / kill airflow scheduler running in daemon mode

I and new to airflow and accidentally started airflow scheduler in demon mode. Now I want to kill the scheduler and possibly restart it. I tried doing

    sudo kill -9 <list of pids>
    pkill <name>

      

Nothing happens. When I ran

    ps aux | grep 'airflow scheduler'

      

I see these entries:

    user1   2907  6.0  1.0 329788 62996 ?        Sl   17:37   1:26 /users/user1/anaconda2/bin/python /users/user1/anaconda2/bin/airflow scheduler -D
    user1   2909  0.0  0.9 327576 58948 ?        Sl   17:37   0:00 /users/user1/anaconda2/bin/python /users/user1/anaconda2/bin/airflow scheduler -D
    user1   2910  0.0  0.9 327576 58944 ?        Sl   17:37   0:00 /users/user1/anaconda2/bin/python /users/user1/anaconda2/bin/airflow scheduler -D
    user1   2911  0.0  0.9 327576 58944 ?        Sl   17:37   0:00 /users/user1/anaconda2/bin/python /users/user1/anaconda2/bin/airflow scheduler -D

      

... etc. for 35 lines with different values.

Any recommendation as to how I can stop / kill the airflow scheduler without rebooting my machine. I also checked the pid file for the scheduler and tried to kill that pid but no effect.

Any help is appreciated. Thank!

+7


source to share


2 answers


Unfortuntely

kill $(ps -ef | grep "airflow scheduler" | awk '{print $2}')

      

I was unable to find a clean solution.



Also looking into the code

https://github.com/apache/incubator-airflow/blob/master/airflow/bin/cli.py

+5


source


Change to the airflow directory where the pid file is located and use: cat airflow-webserver.pid | xargs kill



0


source







All Articles