Gearman的问题:GEARMAN_COULD_NOT_CONNECT [英] Problem with Gearman: GEARMAN_COULD_NOT_CONNECT

查看:175
本文介绍了Gearman的问题:GEARMAN_COULD_NOT_CONNECT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用apt-get install gearman-server安装了齿轮箱,而不是构建PHP PECL。

I've installed gearman using "apt-get install gearman-server" and than build the PHP PECL.

如果我尝试工作者:


$ gearman -w -f wc - wc -l <​​/ p>

$ gearman -w -f wc -- wc -l

它开始等待

但是,如果我尝试开始工作(如本教程中所述)

But if i try to start a job (as descriped in the tutorial)


$ gearman -f wc

$ gearman -f wc < /etc/passwd

它说:


gearman:gearman_client_run_tasks:flush(GEARMAN_COULD_NOT_CONNECT)
127.0.0.1:4730 - > libgearman / connection.cc:480

gearman: gearman_client_run_tasks : flush(GEARMAN_COULD_NOT_CONNECT) 127.0.0.1:4730 -> libgearman/connection.cc:480

如果我尝试在教程中描述的PHP str_rev演示文稿,它给出了相同的错误。

And if i try the PHP str_rev demo descriped in the tutorial it gives me the very same error.


PHP警告:GearmanClient :: do ():flush(GEARMAN_COULD_NOT_CONNECT)
127.0.0.1:4730 - > libgearman / connection.cc:480在
第4行的/root/client.php中

PHP Warning: GearmanClient::do(): flush(GEARMAN_COULD_NOT_CONNECT) 127.0.0.1:4730 -> libgearman/connection.cc:480 in /root/client.php on line 4

以下是我使用的教程: http:/ /gearman.org/index.php?id=getting_started

Here's the tutorial i've used: http://gearman.org/index.php?id=getting_started

有人可以帮助我吗?

编辑:
好​​的。我做了以下操作:apt-get remove gearman-server,然后apt-get install gearman-job-server。现在错误消失了但另一个问题:工人和客户都在冻结。就在他们等待某事的时候有人可以帮助我吗?

Ok. I did the following: "apt-get remove gearman-server" and then "apt-get install gearman-job-server". Now the error is gone. But Another Problem: Both, Worker and Client, are now freezing. Just as they wait for something. Can someone help me?

推荐答案

通过示例快速工作时,我遇到了同样的问题。听起来你没有装备运行 - 这是可以找到可用的工作人员做你的工作的过程。记住,有3个部分 - 需要完成工作的客户,要完成工作的工作人员,以及根据客户要求找到可用的工作人员的工作 - 服务器(也称为齿轮)。

I had the same problem when working quickly through the example. It sounds like you don't have gearmand running - that's the process that will find available workers to do your job. Remember there are 3 parts - the client who wants the work done, the worker who will do the work, and the job-server (aka gearmand) who will find an available worker for the client's request.

这篇关于Gearman的问题:GEARMAN_COULD_NOT_CONNECT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆