简体   繁体   English

laravel app中的beanstalkd驱动程序配置错误

[英]beanstalkd driver configuration error in laravel app

I am trying to use beanstalkd as the queue driver for my laravel app. 我正在尝试使用beanstalkd作为我的laravel应用程序的队列驱动程序。 I am getting this error when I am trying to push something on the queue. 当我试图在队列中推送某些内容时,我收到此错误。

Pheanstalk_Exception_ConnectionException
Socket error 111: Connection refused (connecting to localhost:11300)

Please note that in ' queue.php ' I have just changed the default driver to ' beanstalkd ' but haven't changed any settings for the driver. 请注意,在' queue.php '中我刚刚将默认驱动程序更改为' beanstalkd ',但没有更改驱动程序的任何设置。 The settings for the driver are as follows- 司机的设定如下─

'beanstalkd' => array(
            'driver' => 'beanstalkd',
            'host'   => 'localhost',
            'queue'  => 'default',
        ),

Please help me with this. 请帮我解决一下这个。

Figured it out. 弄清楚了。 Did these two things - 这两件事 -

$ sudo vim /etc/default/beanstalkd
> START yes     # uncomment

$ sudo service beanstalkd start
# Alternatively: /etc/init.d/beanstalkd start

Got it from this link - http://fideloper.com/ubuntu-beanstalkd-and-laravel4 从这个链接 - http://fideloper.com/ubuntu-beanstalkd-and-laravel4

The answer by @halkujabra is correct. @halkujabra的答案是正确的。 The error is because beanstalkd is not running. 该错误是因为beanstalkd未运行。 To fix it you just have to start beanstalkd. 要修复它,你只需要启动beanstalkd。 For MacOS use this script https://gist.github.com/finger-berlin/1942295 to to that. 对于MacOS,请使用此脚本https://gist.github.com/finger-berlin/1942295

  • Download and save it as script.sh 下载并保存为script.sh
  • Make it executable: chmod a+x script.sh 使其可执行: chmod a+x script.sh
  • Run ./script.sh start 运行./script.sh start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM