yzhsieh opened a new issue, #50038:
URL: https://github.com/apache/airflow/issues/50038
### Apache Airflow version
3.0.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
When starting dag-processor using command: `airflow dag-processor --daemon`,
it will end with following error:
OSError: [Errno 22] Invalid argument
Logs:
```
2025-05-01 00:50:40,229 INFO - Starting the Dag Processor Job
2025-05-01 00:50:40,229 INFO - Processing files using up to 2 processes at a
time
2025-05-01 00:50:40,230 INFO - Process each file at most once every 30
seconds
2025-05-01 00:50:40,231 INFO - DAG bundles loaded: dags-folder, example_dags
2025-05-01 00:50:40,235 INFO - DAG bundles loaded: dags-folder, example_dags
2025-05-01 00:50:40,235 INFO - Checking for new files in bundle dags-folder
every 300 seconds
2025-05-01 00:50:40,236 INFO - Checking for new files in bundle example_dags
every 300 seconds
2025-05-01 00:50:40,241 INFO - Refreshing bundle dags-folder
2025-05-01 00:50:40,246 INFO - Searching for files in dags-folder at
/home/yzhsieh/airflow/dags
2025-05-01 00:50:40,246 INFO - Found 0 files for bundle dags-folder
2025-05-01 00:50:40,258 INFO - Refreshing bundle example_dags
2025-05-01 00:50:40,263 INFO - Searching for files in example_dags at
/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/example_dags
2025-05-01 00:50:40,273 INFO - Found 58 files for bundle example_dags
2025-05-01 00:50:40,296 ERROR - Exception when executing DagProcessorJob
Traceback (most recent call last):
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/jobs/dag_processor_job_runner.py",
line 61, in _execute
self.processor.run()
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/dag_processing/manager.py",
line 262, in run
return self._run_parsing_loop()
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/dag_processing/manager.py",
line 347, in _run_parsing_loop
self._start_new_processes()
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/dag_processing/manager.py",
line 894, in _start_new_processes
processor = self._create_process(file)
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/dag_processing/manager.py",
line 876, in _create_process
return DagFileProcessorProcess.start(
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/dag_processing/processor.py",
line 245, in start
proc: Self = super().start(target=target, **kwargs)
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/sdk/execution_time/supervisor.py",
line 487, in start
proc._register_pipe_readers(
File
"/home/yzhsieh/tmp/airflow_venv/lib/python3.10/site-packages/airflow/sdk/execution_time/supervisor.py",
line 506, in _register_pipe_readers
self.selector.register(
File "/usr/lib/python3.10/selectors.py", line 360, in register
self._selector.register(key.fd, poller_events)
OSError: [Errno 22] Invalid argument
```
### What you think should happen instead?
_No response_
### How to reproduce
1. Create an python venv and install airflow via Pypi
2. Use `airflow standalone` to setup a simple Airflow instance
3. Issue `airflow dag-processor --daemon`, then we can find error in
`airflow-dag-processor.log`
In step 3, if I use `airflow dag-processor` instead, then it will work
without any error
### Operating System
Ubuntu 22.04.5 LTS
### Versions of Apache Airflow Providers
(Not install any extra provider)
### Deployment
Virtualenv installation
### Deployment details
Python 3.10.12
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]