Junnplus commented on issue #13741:
URL: https://github.com/apache/airflow/issues/13741#issuecomment-785703692
It seems that the `daemonContext` will close the socket of statsd.
```py
return self.statsd.incr(stat, count, rate)
File "/usr/local/lib/python3.8/site-packages/statsd/client/base.py", line
35, in incr
self._send_stat(stat, '%s|c' % count, rate)
File "/usr/local/lib/python3.8/site-packages/statsd/client/base.py", line
59, in _send_stat
self._after(self._prepare(stat, value, rate))
File "/usr/local/lib/python3.8/site-packages/statsd/client/base.py", line
74, in _after
self._send(data)
File "/opt/airflow/airflow/stats.py", line 40, in _send
self._sock.sendto(data.encode('ascii'), self._addr)
OSError: [Errno 9] Bad file descriptor
```
A simple fix is to let stastd client load lazily.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]