supervisord always returns exit status 127 at WebFaction

2024/9/16 22:47:59

I keep getting the following errors from supervisord at webFaction when tailing the log:

INFO exited: my_app (exit status 127; not expected)
INFO gave up: my_app entered FATAL state, too many start retries too quickly

Here's my supervisord.conf:

[unix_http_server]
file=/home/btaylordesign/tmp/supervisord.sock[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface[supervisorctl]
serverurl=unix:///home/btaylordesign/tmp/supervisord.sock[supervisord]
logfile=/home/btaylordesign/tmp/supervisord.log
logfile_maxbytes=50MB
logfile_backups=5
loglevel=info
nodaemon=false
pidfile=/home/btaylordesign/tmp/supervisord.pid supervisord.pid[program:my_app]
directory=/home/btaylordesign/webapps/my_app/my_app
command=celery worker -A my_app --concurrency=3 --loglevel=debug

I'm starting supervisord from the same directory as supervisord.conf:

$ supervisord -c ./supervisord.conf

but I can't seem to find the right combination of settings. I need to be able to do three things:

  1. Start my celery workers in the background and keep them running.
  2. Stop the celery workers when I deploy code.
  3. Restart the celery workers when the deploy is complete.

But, I can't do any of that until I resolve the error. What am I doing wrong?

Answer

Exit code 127 means "command not found":

http://www.tldp.org/LDP/abs/html/exitcodes.html

Try passing the full path to the celery command:

command=/home/something/bin/celery worker -A my_app --concurrency=3 --loglevel=debug

Also, try setting the redirect_stderr and stdout_logfile options in your [program:x] section to capture the error message and make debugging easier.

https://en.xdnf.cn/q/72235.html

Related Q&A

One dimensional Mahalanobis Distance in Python

Ive been trying to validate my code to calculate Mahalanobis distance written in Python (and double check to compare the result in OpenCV) My data points are of 1 dimension each (5 rows x 1 column). I…

DeprecationWarning: please use dns.resolver.Resolver.resolve()

I am using resolver() as an alternative to socket() as I found that when multiple connections are made to different IPs it ends up stopping working. Anyway it returns a warning to me that I should use …

python cannot find module when using ssh

Im using python on servers. When I run a python command which needs numpy module, if I do ssh <server name> <python command>that server will complain no module named numpy found.However, if…

Python sklearn installation windows

When trying to install Pythons sklearn package on Windows 10 using pip I am given an EnvironmentError that tells me there is no such file or directory of a specific file: ERROR: Could not install packa…

Python PSD layers?

I need to write a Python program for loading a PSD photoshop image, which has multiple layers and spit out png files (one for each layer). Can you do that in Python? Ive tried PIL, but there doesnt se…

Multiple inheritance: overridden methods containing super()-calls

With the file super5.py:class A:def m(self):print("m of A called")class B(A):def m(self):print("m of B called")super().m()class C(A):def m(self):print("m of C called")supe…

Specifying the output file name in Apache Spark

I have a MapReduce job that Im trying to migrate to PySpark. Is there any way of defining the name of the output file, rather than getting part-xxxxx?In MR, I was using the org.apache.hadoop.mapred.li…

How to plot two DataFrame on same graph for comparison

I have two DataFrames (trail1 and trail2) with the following columns: Genre, City, and Number Sold. Now I want to create a bar graph of both data sets for a side by side comparison of Genre vs. total N…

Babel doesnt recognize jinja2 extraction method for language support

Im adding language translation support to my project. The code is on Python and has jinja2 in the html files, and Javascript.Im trying to use Babel to do the translation, but it doesnt recognize the ex…

Automatically simplifying/refactoring Python code (e.g. for loops - list comprehension)? [closed]

Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.We don’t allow questi…