microhuang opened a new issue #19279:
URL: https://github.com/apache/airflow/issues/19279
### Apache Airflow version
2.2.0 (latest released)
### Operating System
CentOS 8
### Versions of Apache Airflow Providers
apache-airflow-providers-cncf-kubernetes==2.0.1
apache-airflow-providers-elasticsearch==2.0.2
apache-airflow-providers-ftp==2.0.0
apache-airflow-providers-http==2.0.1
apache-airflow-providers-imap==2.0.0
apache-airflow-providers-mysql==2.1.0
apache-airflow-providers-postgres==2.3.0
apache-airflow-providers-sendgrid==2.0.0
apache-airflow-providers-sftp==2.1.0
apache-airflow-providers-sqlite==2.0.0
apache-airflow-providers-ssh==2.1.0
### Deployment
Virtualenv installation
### Deployment details
_No response_
### What happened
When running worker in daemon mode, the task status is incorrect, but when
running worker in foreground mode, the status is correct。
> my task
```
cd /opt/work/airflow_home/dags
git clean -d -f
git checkout .
git fetch
```
> worker in daemon
```
python3 -m airflow celery worker --daemon
```
> task log
```
Running command: ['bash', '-c', '\ncd /opt/work/airflow_home/dags\ngit clean
-d -f\ngit checkout .\ngit fetch']
Output:
fatal: The remote end hung up unexpectedly
Command exited with return code -13
ERROR - Task failed with exception
```
> worker in daemon
```
python3 -m airflow celery worker
```
> task log
```
Running command: ['bash', '-c', '\ncd /opt/work/airflow_home/dags\ngit clean
-d -f\ngit checkout .\ngit fetch']
Output:
Command exited with return code 0
```
### What you expected to happen
_No response_
### How to reproduce
_No response_
### 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]