Prefect Server (v2.20) silently crashing in Docker Compose on Ubuntu 24.04 LTS #18007
-
Problem Description: Hello Prefect Community, I am trying to deploy Prefect Server using Docker Compose on my Ubuntu 24.04 LTS machine. The database service starts correctly, and the Prefect Server container itself starts, but the Prefect Server application process inside the container immediately exits after printing the Prefect ASCII logo in the logs. There are no error messages, warnings, or any other output following the logo. The container then enters a The Prefect Agent container also starts but then restarts ( I've followed extensive troubleshooting steps over several hours, including fixes for common issues like missing dependencies and configuration, but the silent crash persists with the exact same log output pattern. Environment:
Docker Compose Configuration:
Observed Behavior:
Troubleshooting Steps Taken: I've followed extensive debugging steps over several hours, collaborating with an AI assistant. Here's a summary:
Despite all these steps, the Prefect Server consistently exhibits the same behavior: starts, prints the logo, and exits immediately with exit code 0, without logging any errors or further startup progress. The lack of logs at the point of failure is the main blocker for further diagnosis. Request for Help: I would be very grateful for any insights or suggestions from the community on what could be causing this very early, silent exit in the Prefect Server startup process.
Thank you for your time and expertise! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @richelieuli! I noticed this comment in your server Dockerfile:
The Prefect Docker images set an You can see this behavior by running something like this: docker run prefecthq/prefect:2.20-python3.10 which will print the ASCII art and exit like you're seeing. To fix this, I think you should add the Let me know if that solves the issue for you. We can dig in more to find the underlying issue if it doesn't. |
Beta Was this translation helpful? Give feedback.
Hey @richelieuli!
I noticed this comment in your server Dockerfile:
The Prefect Docker images set an
ENTRYPOINT
, but they don't set a default command. If no command is provided, the entrypoint will print the Prefect ASCII art and then immediately exit with a 0 exit code.You can see this behavior by running something like this:
which will print the ASCII art and exit like you're seeing.
To fix this, I think you should add the
prefect server start
command to yourprefect-server
service in yourdocker-compose.yml
.Let me know if that solves the issue for you. We can …