当Supervisord运行时,Gearman不工作

我在一个专门的工作服务器(Ubuntu 12.04)上为我的PHP项目(使用pecl / gearman作为PHP的障碍)testingGearman。

手动这工作得很好:启动客户端,添加作业,并运行一个或多个工作在不同的shell按预期工作。 现在我想使用Supervisord来运行这些工人,但是这会在Gearman日志中产生很多以下错误:

WARNING [ 4 ] lost connection to client recv(peer has closed connection) 127.0.0.1:37126 -> libgearman-server/io.cc:608 ERROR [ 4 ] Failed while in _connection_read() -> libgearman-server/io.cc:489 

主pipeconf是默认的,我刚刚添加了一个程序:

 [program:migration] command=/path/to/script process_name=%(program_name)s_%(process_num)02d numprocs=10 stdout_logfile=/var/log/gearman.log stderr_logfile=/var/log/gearman-error.log stdout_logfile_maxbytes=1MB environment=GEARMAN_USER=gearman autostart=true autorestart=true user=gearman stopsignal=KILL 

Gearman进程信息:

 gearman 9802 0.0 0.0 476116 1780 ? Ssl 12:18 0:00 /usr/sbin/gearmand --pid-file=/var/run/gearman/gearmand.pid --user=gearman --daemon --log-file=/var/log/gearman-job-server/gearman.log --listen=127.0.0.1 

当testing主pipe:

 supervisord -n -c /etc/supervisor/supervisord.conf 

我有点困在这里,因为错误信息并没有真正返回谷歌的结果。 任何帮助表示赞赏。

在几乎完全相同的服务器堆栈中出现相同的错误,并find解决scheme。 警告和错误是由于您尝试将作业发送给非注册工作人员而引发的。 检查你的工作者的名字,并检查命令行上的ps -ax是否运行。

在命令行上使用gearmand -f发送作业给非现有的工作人员将不会给您任何反馈。 使用pecl模块进行操作会导致错误。

PS:我知道你已经跳船了,跟着Beanstalkd一起移动,但也许可以帮助别人。