【问题标题】:Resque and redis server not playing well with each otherResque 和 redis 服务器不能很好地相互配合
【发布时间】:2012-05-16 08:27:36
【问题描述】:

我已经使用这些命令安装了 redis 服务器,

wget http://download.redis.io/redis-stable.tar.gz
xvzf redis-stable.tar.gz
cd redis-stable
make
make test # to test everything is working out well or not

之后,我导航到 redis-stable 目录以使用

启动 redis 服务器
src/redis-server

现在,如果我正在运行 rails 应用程序并尝试访问 localhost:3000/resque 它正在正常工作,并且没有错误,

但是当我尝试停止(我正在使用 cntrl+c 停止正在运行的服务器)并使用 src/redis-server 重新启动时,它会抛出这样的异常

 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
    [10020] 16 May 13:30:31 # Opening port 6379: bind: Address already in use

由此我推断 redis 服务器已经在运行,但是当我访问 localhost:3000/resque 时出现此错误

Errno::EAGAIN at /resque/overview
Resource temporarily unavailable - Timeout reading from the socket 

目前我正在重新启动我的 ubuntu 系统以解决这个问题 任何想法如何解决这个问题?

感谢阅读。

【问题讨论】:

    标签: ruby-on-rails ubuntu redis resque


    【解决方案1】:

    你确定你是通过 Ctrl-C 关闭它,而不仅仅是通过 Ctrl-Z kbd>?从你写的内容来看,你已经有一些东西绑定到端口 6379,它对连接没有反应(因此我认为你实际上使用的是 Ctrl-Z)。下次当它发生在你身上时,尝试运行netstat -tlnp 你会看到哪个进程绑定了 6379 端口,这样你就可以杀死它。

    【讨论】:

    • 是的,我想我是在暂停它而不是杀死我多么愚蠢!
    猜你喜欢
    • 2016-12-08
    • 1970-01-01
    • 1970-01-01
    • 2018-07-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-28
    • 2010-09-28
    相关资源
    最近更新 更多