Dokku deployment issue - "setuidgid: fatal: unable to run gunicorn: file does not exist"

46 Views Asked by At

I'm encountering a deployment issue with Dokku while trying to deploy my project. The error message suggests an issue with gunicorn, and I'm having trouble figuring out the root cause. Here are the details:

Error Message:

remote: perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
       Attempting pre-flight checks (web.1)
-----> Executing 2 healthchecks
       Running healthcheck name='default' type='uptime' uptime=10
       Running healthcheck name='port listening check' attempts=3 port=5000 retries=2 timeout=5 type='listening' wait=5
       Healthcheck succeeded name='port listening check'
=====> Start healthcheck output
       state=restarting
=====> End healthcheck output
remote:  !     Failure in name='default': container has restarted 6 times
some_id
remote:  !     Could not start due to 1 failed checks (web.1)
=====> Start of myproject container output (web.1)
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
=====> End of myproject container output (web.1)
=====> Start of  container output (.)
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
       setuidgid: fatal: unable to run gunicorn: file does not exist
=====> End of  container output (.)
remote: parallel: This job failed:
remote: /var/lib/dokku/plugins/available/scheduler-docker-local/bin/scheduler-deploy-process-container myproject herokuish dokku/myproject:latest latest web 1 1
To id_adress:myproject
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'id_adress:myproject'

The failure seems to be related to the gunicorn file not being found.

I've checked the Dokku documentation and ensured the necessary configurations are in place. I used this advice and this advice, but I still have the same issue.

Has anyone encountered a similar issue with Dokku deployments and the gunicorn process? What steps can I take to troubleshoot and resolve this issue? Any insights or guidance would be greatly appreciated. Thank you!

UPD: turns out I needed to write in Procfile web: gunicorn config.wsgi --log-file -

1

There are 1 best solutions below

0
Jose Diaz-Gonzalez On

The application in question is likely a buildpack-based application. Buildpacks are run by the herokuish base image in a specific order, with the first detected one being the one that is applied.

Without more logging information (the first part of your deploy was cut out in your posted logs), it is likely that multiple buildpacks were detected, with the python buildpack - which would install dependencies in the requirements.txt - not being the first. You'll probably want to use multiple buildpacks by creating and committing a .buildpacks file to the base of your repository, with each buildpack that you need being specified as it's contents. Below is an example for specifying just the heroku/python buildpack.

heroku/python

You can also set the buildpacks via the buildpacks commands:

dokku buildpacks:add node-js-app heroku/python

This will manage the .buildpacks file on your behalf.