Open dagsterbot[bot] opened 3 years ago
I have something similar. (I run dagster on an raspberry pi 3b) I get the error
Exception while setting up compute log capture
FileNotFoundError: [Errno 2] No such file or directory: 'tail'
There is tail installed, I've used before, so I'm not sure what happens here?
FileNotFoundError: [Errno 2] No such file or directory: 'tail'
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/execution/plan/execute_plan.py", line 66, in inner_plan_execution_iterator
stack.enter_context(
File "/usr/lib/python3.9/contextlib.py", line 429, in enter_context
result = _cm_type.__enter__(cm)
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/storage/compute_log_manager.py", line 69, in watch
with self._watch_logs(pipeline_run, step_key):
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/storage/local_compute_log_manager.py", line 50, in _watch_logs
with mirror_stream_to_file(sys.stdout, outpath):
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 29, in mirror_stream_to_file
with tail_to_stream(filepath, stream) as pids:
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 77, in tail_to_stream
with execute_posix_tail(path, stream) as pids:
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/home/dagster/dagster_project/venv/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 122, in execute_posix_tail
tail_process = subprocess.Popen(tail_cmd, stdout=stream)
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
also on another ubuntu (22.04) distribution
Exception while setting up compute log capture
FileNotFoundError: [Errno 2] No such file or directory: 'tail'
Could it be that the log location is not send through?
FileNotFoundError: [Errno 2] No such file or directory: 'tail'
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/execution/plan/execute_plan.py", line 64, in inner_plan_execution_iterator
stack.enter_context(
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 448, in enter_context
result = _cm_type.__enter__(cm)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/storage/compute_log_manager.py", line 69, in watch
with self._watch_logs(pipeline_run, step_key):
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/storage/local_compute_log_manager.py", line 51, in _watch_logs
with mirror_stream_to_file(sys.stdout, outpath):
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 29, in mirror_stream_to_file
with tail_to_stream(filepath, stream) as pids:
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 77, in tail_to_stream
with execute_posix_tail(path, stream) as pids:
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/contextlib.py", line 119, in __enter__
return next(self.gen)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/site-packages/dagster/core/execution/compute_logs.py", line 122, in execute_posix_tail
tail_process = subprocess.Popen(tail_cmd, stdout=stream)
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/riker/.pyenv/versions/3.9.13/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
I think I know what causes this in my case. I run this process as a systemd service and that has (intentionally) not the entire PATH. And therefore it cannot find 'tail', tail lives in /usr/bin/
so I had to add that to the environmental variables for systemd. (my case is therefore closed)
Thanks. I'm on MacOS, on Apple Silicon, running from a Python 3.9.16 venv and was seeing a similar error. Adding PATH=$PATH:/usr/bin
to my .env
file, picked up by direnv
, fixed it for me.
Issue from the Dagster Slack
Compute logs intermittently raise exception during tail_polling on Windows
This issue was generated from the slack conversation at: https://dagster.slack.com/archives/C01U954MEER/p1626886529357400?thread_ts=1626886529.357400&cid=C01U954MEER
Conversation excerpt:
Message from the maintainers:
Are you looking for the same documentation content? Give it a :thumbsup:. We factor engagement into prioritization.