Worker 'ProcessWorker 6e0ffb8d-c234-4739-b662-90ba...
# ask-marvin
p
Worker 'ProcessWorker 6e0ffb8d-c234-4739-b662-90ba03b0ff39' submitting flow run 'b1590c8c-3fee-4553-8101-dd45e7b46c18' 084821 PM prefect.flow_runs.worker Opening process... 084821 PM prefect.flow_runs.runner Completed submission of flow run 'b1590c8c-3fee-4553-8101-dd45e7b46c18' 084821 PM prefect.flow_runs.worker Process for flow run 'distributor-beauty-care-terpadu-di-sumber-sari-jember-jawa-timur-2026-02-22' exited with status code: -2 084823 PM prefect.flow_runs.runner Reported flow run 'b1590c8c-3fee-4553-8101-dd45e7b46c18' as crashed: Flow run process exited with non-zero status code -2. 084824 PM prefect.flow_runs.runner Loading flow to check for on_crashed hooks 084824 PM prefect.flow_runs.runner Running 1 deployment pull step(s) 084824 PM prefect.flow_runs > Running git_clone step... 084824 PM prefect.flow_runs Failed to clone repository 'https://github.com/aidevakasha/outlet-scrape.git' with exit code 255. 084827 PM prefect.flow_runs Runner failed to retrieve flow to execute on_crashed hooks for flow run UUID('b1590c8c-3fee-4553-8101-dd45e7b46c18'). Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/prefect/deployments/steps/core.py", line 186, in run_steps step_output = await run_step(step, upstream_outputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/deployments/steps/core.py", line 140, in run_step result = await from_async.call_soon_in_new_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Call.new(step_func, **inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ).aresult() ^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/concurrency/calls.py", line 374, in aresult return await asyncio.wrap_future(self.future) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/concurrency/calls.py", line 399, in _run_sync result = self.fn(*self.args, **self.kwargs) File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/compatibility/async_dispatch.py", line 94, in wrapper return fn(*args, **kwargs) File "/app/.venv/lib/python3.13/site-packages/prefect/deployments/steps/pull.py", line 221, in git_clone run_coro_as_sync(_pull_git_repository_with_retries(storage)) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/utilities/asyncutils.py", line 207, in run_coro_as_sync return call.result() ~~~~~~~~~~~^^ File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/concurrency/calls.py", line 365, in result return self.future.result(timeout=timeout) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/concurrency/calls.py", line 192, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/concurrency/calls.py", line 441, in _run_async result = await coro ^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/utilities/asyncutils.py", line 188, in coroutine_wrapper return await task ^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/_internal/retries.py", line 57, in wrapper return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/deployments/steps/pull.py", line 47, in _pull_git_repository_with_retries await repo.pull_code() File "/app/.venv/lib/python3.13/site-packages/prefect/runner/storage.py", line 417, in pull_code await self._clone_repo() File "/app/.venv/lib/python3.13/site-packages/prefect/runner/storage.py", line 462, in _clone_repo raise RuntimeError( ...<2 lines>... ) from exc_chain RuntimeError: Failed to clone repository 'https://github.com/aidevakasha/outlet-scrape.git' with exit code 255. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/prefect/runner/runner.py", line 1529, in _run_on_crashed_hooks flow = await load_flow_from_flow_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ flow_run, storage_base_path=str(self._tmp_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/app/.venv/lib/python3.13/site-packages/prefect/client/utilities.py", line 69, in wrapper return await func(client, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.13/site-packages/prefect/flows.py", line 2939, in load_flow_from_flow_run output = await run_steps( ^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ File "/app/.venv/lib/python3.13/site-packages/prefect/deployments/steps/core.py", line 231, in run_steps raise StepExecutionError(f"Encountered error while running {fqn}") from exc prefect.deployments.steps.core.StepExecutionError: Encountered error while running prefect.deployments.steps.git_clone why above happen, it intermitten error @Marvin
m
thought for 344.2 seconds
Thanks for the logs — there are two separate things happening here: 1) The flow process crashed with exit code -2 - On POSIX systems, a negative exit code usually means the process was terminated by a signal. -2 corresponds to SIGINT (interrupt). - Common causes: - The run was cancelled (manually or by an automation) - The worker/shutdown script sent SIGINT (e.g., host shutting down or container pre-stop) - Another process signaled the run to stop - Action: Check the Flow Run timeline and worker logs just before 084821–23 to see if there was a cancellation/shutdown event. If you’re on Kubernetes or another orchestrator, check for pod termination signals around that time. 2) While trying to run on_crashed hooks, the runner attempted a git_clone pull step and Git failed with exit code 255 - Exit code 255 is Git’s generic “something went wrong” (auth failures, network issues, invalid URL, etc.). Prefect just surfaces that. - Your error shows a duplicated/mangled URL like: https://github.com/aidevakasha/outlet-scrape.git' That duplication is usually Slack/renderer link formatting, not necessarily your config. Still, please double‑check the repository string in your deployment does not include angle brackets or extra characters. What typically makes git_clone fail intermittently - Network flakiness (DNS, firewall, proxy) reaching github.com - GitHub rate limiting or transient 5xx - Credentials intermittently unavailable (e.g., SSH agent not loaded) or expired tokens - Using SSH without provisioning keys/known_hosts properly in the worker environment - Git not installed (less likely here; that’s usually exit code 127) How Prefect performs the clone (so you can verify) - Prefect 3.x runs Git as a subprocess in the worker environment; Git must be installed and reachable on PATH. - For HTTPS, Prefect will embed your token into the clone URL at runtime; for SSH, you must provide the SSH key/known_hosts yourself. - There are built-in retries (3 attempts with backoff) in the git_clone step; if it still fails, the underlying issue is persistent enough to outlast retries. - Source: https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments/steps/pull.py and https://github.com/PrefectHQ/prefect/blob/main/src/prefect/runner/storage.py Quick checks to narrow it down - From the same machine/container as the ProcessWorker, try:
Copy code
git ls-remote https://<your-token>@github.com/aidevakasha/outlet-scrape.git
If using SSH:
Copy code
ssh -T <mailto:git@github.com|git@github.com>
  git ls-remote git@github.com:aidevakasha/outlet-scrape.git
This will confirm auth and network outside Prefect. - Ensure your deployment’s pull config is clean (no angle brackets, no double-embedding credentials). Example for HTTPS + token:
Copy code
pull:
    - prefect.deployments.steps.git_clone:
        repository: <https://github.com/aidevakasha/outlet-scrape.git>
        access_token: "{{ prefect.blocks.secret.github_token }}"
        branch: main
Avoid mixing a URL that already has credentials with a separate token/credentials parameter. - If using SSH: - Make sure the key is present in the worker environment and the host key is trusted in
~/.ssh/known_hosts
- For debugging, you can temporarily relax host key checking:
Copy code
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no"
- Prefer HTTPS + PAT in headless environments to avoid agent issues. - Get more Git detail in logs by setting these env vars on the worker:
Copy code
GIT_TRACE=1
  GIT_CURL_VERBOSE=1
Then re-run to capture Git’s actual error message (auth denied, TLS, DNS, etc.). - For reproducibility, consider pinning a commit:
Copy code
pull:
    - prefect.deployments.steps.git_clone:
        repository: <https://github.com/aidevakasha/outlet-scrape.git>
        access_token: "{{ prefect.blocks.secret.github_token }}"
        commit_sha: <your-commit-sha>
Lastly, because your on_crashed hooks depend on fetching the flow code, any Git failure will prevent those hooks from running. If that’s a concern, consider storing code in a way that’s available at runtime without relying on a fresh clone (e.g., bake code into the image you run, or use a highly reliable storage location). Could you share: - Your deployment’s
pull
section from
prefect.yaml
(with secrets redacted)? - Whether you’re using HTTPS+token or SSH? - Where the ProcessWorker is running (local host, Docker image, Kubernetes) and whether it has stable outbound access to GitHub? With that, I can help pinpoint the root cause and the best fix.