EDIT: Re-parsing the docs I see this probably counts as "expected behavior" however it doesn't seem very obvious or clear, so perhaps this is more of a feature request.
I think this is because process.get_execv_args only checks my path for the executable and not the directory set by directory.
example
mal:~# ls -l /opt/hello/bin/hello
-rwxrwxr-x 1 mal mal 1088 Jan 29 14:27 /opt/hello/bin/hello
mal:~# sudo supervisorctl status
example BACKOFF can't find command 'bin/hello'
[program:example]
command = bin/hello
directory = /opt/hello
I can confirm this - supervisor [sometimes] can't find command with path relative to the directory, but you can run this command from the directory manually. As a workaround you can provide a full path to the command.
I figure out the lines of code doing with this:
if "/" in program:
filename = program
try:
st = self.config.options.stat(filename)
except OSError:
st = None
I want the /opt/hello/bin/hello to run if directory is set to a valid directory path. I create one pr But I don't know if this has any side effect.
any update on this issue? @mnaberez
I ran into this issue today. It celebrated its 3rd birthday this year ;)
Her guys, you have a ready-made PR.
Problem exists 3-years :(
I just ran into this. Can confirm that it's still a problem in 2018.
Adding to this: I found a workaround (albeit less-than-ideal). Instead of directly running the application, run it in a shell. E.g.
[program:hello]
command=bash -c "exec bin/hello"
directory=/opt/hello
@kgreenek this require a extra bash process
Most helpful comment
I ran into this issue today. It celebrated its 3rd birthday this year ;)