Ongoing Deploy Failure: waitress-serve Command Not Found Error
kiimleo
TRIALOP

a year ago

development id: d1c318c9-2b66-484d-abe3-fb3413735146

I am experiencing consistent deployment failures with my Django project on Railway, specifically due to the following recurring error in the deployment logs:
/bin/bash: line 1: waitress-serve: command not found

Issue Details:
Environment: I am deploying a Django project with Python 3.7.6
Start Command: I am using waitress-serve to serve my application, with the following startCommand in railway.json:
"startCommand": "waitress-serve --port=$PORT pesticide_project.wsgi:application"

railway.json Configuration:
{

"$schema": "https://railway.app/railway.schema.json",

"build": {

"builder": "NIXPACKS",

"nixpacks": {

"plan": "python@3.7"

}

},

"deploy": {

"startCommand": "waitress-serve --port=$PORT pesticide_project.wsgi:application",

"numReplicas": 1,

"restartPolicyType": "ON_FAILURE",

"restartPolicyMaxRetries": 10

}

}

Dependencies:waitress==2.1.2 is specified in requirements.txt and should be installed during the build process.

Despite these settings, the deployment fails with the waitress-serve command not being recognized, suggesting that the waitress package may not be installed correctly or is not accessible in the deployment environment.

Steps Already Taken:

  1. Verified Python version compatibility with python@3.7 in the railway.json.

  2. Ensured waitress==2.1.2 is included in requirements.txt.

  3. Removed any custom start command in Railway settings that could override Procfile or railway.json.

  4. Attempted multiple deployments with these configurations, but consistently encounter the same error.

    Additional Information:

    In the logs, the error /bin/bash: line 1: waitress-serve: command not found appears repeatedly, causing the container to restart continuously without successfully running.

0 Replies

Loading...