<@ULVA73B9P> ```$ prefect worker start --pool "sel...
# ask-marvin
d
@Marvin
Copy code
$ prefect worker start --pool "self-hosted testing"
Discovered type 'docker' for work pool 'self-hosted testing'.
Traceback (most recent call last):
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 41, in wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper
    return call()
           ^^^^^^
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 382, in __call__
    return self.result()
           ^^^^^^^^^^^^^
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 282, in result
    return self.future.result(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 345, in _run_async
    result = await coro
             ^^^^^^^^^^
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/cli/worker.py", line 146, in start
    async with worker_cls(
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect/workers/base.py", line 1104, in __aenter__
    await self.setup()
  File "/home/user/Desktop/prefect/prefect-ui/lib/python3.11/site-packages/prefect_docker/worker.py", line 389, in setup
    raise RuntimeError(
RuntimeError: Docker worker cannot be used with an ephemeral server.
An exception occurred.
m
It seems like you're trying to start a Prefect worker with Docker in an ephemeral server environment. However, the error message indicates that Docker workers cannot be used with an ephemeral server. You might want to consider using a different type of worker or changing your server setup. If you need more information about Prefect workers and their setup, I can help you find it.
d
@Marvin What is an ephemeral server?
m
An ephemeral server, often referred to as an ephemeral environment, is a temporary deployment that contains a self-contained version of your application. These environments are typically used for each feature branch and are often automatically spun up for every commit using hosted DevOps platforms. Ephemeral environments are meant to last for a short amount of time. For example, they could be as short as the lifecycle of a CI/CD pipeline, or they could last for a few weeks (the length of a sprint). In the context of your error message, it seems that the Prefect Docker worker is not designed to be used in such temporary environments. You might need to consider a more permanent server setup or a different type of worker. Source 1, Source 2, Source 3