what port does `--with-healthcheck` run on? -- it'...
# ask-community
p
what port does
--with-healthcheck
run on? -- it's not documented with the command: https://docs.prefect.io/latest/concepts/work-pools/ :: 8080 ruturns
{"detail":"Not Found"}
1
dug into the code and found that it's at:
<http://127.0.0.1:8080/health>
-- this would be very helpful to add to the docs and description for the cli
j
Hi @pyinthesky. Thank you. The default worker webserver port is 8080, but you can change that for the active Prefect profile with the command
prefect config set PREFECT_WORKER_WEBSERVER_PORT='8081'
. You can see all the values for the current profile with
prefect config view --show-defaults
. I’ll make an issue for expanding the health check docs.
p
Sounds great. Given the newness of workers, there's very few examples of workers using docker compose, so I'd be more than happy to see this full compose example added to the docs, if it can be of benefit to others. What's extra confusing is that prefect server health is at
127.0.0.1:4200/api/health
-- so different path and port.
additionally, it would be nice if the create did an exit(0) instead of exit(1), if the item was already created, that way '&&'s could be used
--update-- found out this was fixed in latest versions of uvloop and prefect --- ... and while I'm at it 🤣 ... this happens if (uvicorn/uvloop) is installed in the venv
Copy code
Failed to submit flow run 'a1dd7a94-ad83-4419-8a03-d4f9e59cd083' to infrastructure.
Traceback (most recent call last):
  File "/opt/app-root/lib64/python3.11/site-packages/prefect/workers/base.py", line 896, in _submit_run_and_capture_errors
    result = await self.run(
             ^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/prefect/workers/process.py", line 185, in run
    process = await run_process(
              ^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/prefect/utilities/processutils.py", line 258, in run_process
    async with open_process(
  File "/usr/lib64/python3.11/contextlib.py", line 204, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/prefect/utilities/processutils.py", line 202, in open_process
    process = await anyio.open_process(command, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/anyio/_core/_subprocesses.py", line 126, in open_process
    return await get_asynclib().open_process(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/app-root/lib64/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1041, in open_process
    process = await asyncio.create_subprocess_exec(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/subprocess.py", line 221, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/base_events.py", line 1694, in subprocess_exec
    transport = await self._make_subprocess_transport(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/unix_events.py", line 198, in _make_subprocess_transport
    with events.get_child_watcher() as watcher:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/events.py", line 811, in get_child_watcher
    return get_event_loop_policy().get_child_watcher()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/asyncio/events.py", line 637, in get_child_watcher
    raise NotImplementedError
NotImplementedError