Linux启动gearman服务

好久没用Gearman了,服务器上的Gearman server不知道什么时候被停掉了,所以当执行程序时,报错:
 File "python/response.py", line 41, in <module>

  File "python/response.py", line 38, in main
    gm_worker.set_client_id('your_worker_client_id_name')
  File "/usr/lib64/python2.7/site-packages/gearman-2.0.2-py2.7.egg/gearman/worker.py", line 98, in work
    continue_working = self.poll_connections_until_stopped(worker_connections, continue_while_connections_alive, timeout=poll_timeout)
  File "/usr/lib64/python2.7/site-packages/gearman-2.0.2-py2.7.egg/gearman/connection_manager.py", line 204, in poll_connections_until_stopped
    raise ServerUnavailable('Found no valid connections in list: %r' % self.connection_list)
gearman.errors.ServerUnavailable: Found no valid connections in list: [<GearmanConnection localhost:4730 connected=False>]

从error log的最后一行ServerUnavailable,可以看出是Gearman的server被停掉了。

1.当我执行gearmand -d命令时,先是提示/var/log/gearman/gearman.log不存在,所以先在这个路径下创建一个log文件;

2.启动本机的Server,端口是4730,命令是:

 gearmand --log-file gearmand.log --listen 127.0.0.1 --port=4730 --verbose=INFO &

参考资料:http://tech-lightnight.blogspot.jp/2013/04/start-with-gearman.html


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值