supervisord 与 ENOEXEC 一起退出 [英] supervisord exiting with ENOEXEC
本文介绍了supervisord 与 ENOEXEC 一起退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 supervisord 运行一个 java 进程,结果:
I am trying to run a java process with supervisord and am getting:
couldn't exec /var/application/start_tester: ENOEXEC
start_tester 的内容是:
The contents of start_tester is:
java -Duser.dir=/var/application/ -cp /var/application/application.jar:/var/application/toepoke.jar com.application.Application
当我从控制台运行脚本时,应用程序按预期运行.这是我的主管配置
When I run the script from the console the app runs as expected. Here is my supervisor config
[program:application_tester]
directory=/var/application
command=/var/application/start_tester ; the program (relative uses PATH, can take args)
log_stdout=true ; if true, log program stdout (default true)
log_stderr=true ; if true, log program stderr (def false)
logfile=/var/log/application_tester.log
当我从控制台运行脚本时,这是输出:
When I run the script from the console this is the output:
[root@monitor application]# ./start_tester
20131009 203657: application starting up.
20131009 203657 (33): version 2.2.3
推荐答案
您的文件需要是可执行的.所以要么:
Your file needs to be executable. So either:
- 你应该
chmod +x
它来设置可执行位. - 在文件开头放置一个shebang.没有这个是导致
ENOEXEC
的原因.
- You should
chmod +x
it to set the executable bit. - Put a shebang at the start of the file. Not having this is what caused the
ENOEXEC
.
或
- 将您的配置文件修改为类似
command=sh/var/application/start_tester
的内容.
这篇关于supervisord 与 ENOEXEC 一起退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文