Skip to content

'NoneType' object has no attribute 'is_alive' - while running 'airflow standalone' #19365

Description

@int3rlop3r

Apache Airflow version

2.2.1 (latest released)

Operating System

Ubuntu (16.04)

Versions of Apache Airflow Providers

apache-airflow-providers-celery==2.1.0
apache-airflow-providers-ftp==2.0.1
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.1
apache-airflow-providers-sqlite==2.0.1

Deployment

Virtualenv installation

Deployment details

No response

What happened

Got an error while running $ airflow standalone.

Stacktrace:

webserver | [2021-11-02 16:59:56 +0530] [15195] [INFO] Booting worker with pid: 15195
Traceback (most recent call last):
File "/home/jonathan/programs/venv/bin/airflow", line 8, in
sys.exit(main())
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/main.py", line 48, in main
args.func(args)
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/cli/commands/standalone_command.py", line 48, in entrypoint
StandaloneCommand().run()
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/cli/commands/standalone_command.py", line 95, in run
if not self.ready_time and self.is_ready():
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/cli/commands/standalone_command.py", line 209, in is_ready
return self.port_open(8080) and self.job_running(SchedulerJob) and self.job_running(TriggererJob)
File "/home/jonathan/programs/venv/lib/python3.6/site-packages/airflow/cli/commands/standalone_command.py", line 231, in job_running
return job.most_recent_job().is_alive()
AttributeError: 'NoneType' object has no attribute 'is_alive'

What you expected to happen

I expect the server to start without any errors or stacktraces.

How to reproduce

Follow the installation instructions in the docs and then run $ airflow standalone.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions