I've been stuck with the same issue, and the preceding answer did not help me (albeit well written).

The solution is here : check your /etc/redis/redis.conf, and make sure to change the default

bind 127.0.0.1

to

bind 0.0.0.0

Then restart your service (service redis-server restart)

You can then now check that redis is listening on non-local interface with

redis-cli -h 192.168.x.x ping

(replace 192.168.x.x with your IP adress)

---------------------------------------------------------------------------------------------------------------------------------------------

I've just install Redis succesfully using the instructions on the Quick Start guide on http://redis.io/topics/quickstart on my Ubuntu 10.10 server. I'm running the service as dameon (so it can be run by init.d)

The server is part of Rackspace Cluster with Internal and External IPs. The host is running on port 6379 (standard for Redis)

I've added a row in the iptables to allow incoming connections from port 6379 as shown below:

 ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:6379

In my PHP code on another server, I'm trying to connect to the new Redis server here:

$this->load->helper("iredis");

$hostname = "IP ADDRESS HERE";

$redis = new iRedis(array('hostname' => $hostname, 'port' => 6379));

Once I do this - I always get a connection refused. In my redis.conf file, I have the local bind command commented out, so it should be listening on more than the localhost IP. I can connect to the database on the local machine just not on another server. I've tried the external and internal IPs with no luck.

Any suggestions on getting this to work?

最新文章

  1. wex5 教程之 图文讲解 文件上传attachmentSimple(1)
  2. 深入了解Activity-生命周期
  3. CF 103E Buying Sets 最大权闭合子图,匹配 难度:4
  4. Java7编程高手进阶读书笔记—集合框架
  5. SQL优化的四个方面,缓存,表结构,索引,SQL语句
  6. 用JDK自带的工具生成客户端调用Webservice的代码
  7. Yii PHP 框架分析(二)
  8. oracle 中的select ...connect by prior ...start with 及(+)的用法
  9. WPF换肤之七:异步
  10. linux下磁盘进行分区、文件系统创建、挂载和卸载(转)
  11. 二、mongo数据库
  12. windows 上搭建 sftp 服务器 --freesshd
  13. Linux Ubuntu从零开始部署web环境及项目 -----快捷键设置(四)
  14. [Hdu1342] Lotto
  15. 001_HTTP参数中Etag的重要性
  16. Debug技巧
  17. English trip V1 - 19.Where Am I? 我在哪里?Teacher:Patrick Key:Ask for and directions
  18. Forbidden Subwords
  19. 控制台输出到txt
  20. c++多态特性总结

热门文章

  1. nodeJS和npm的环境配置
  2. vs2010的资源视图中,对话框显示数字的解决方法之一
  3. PHP21 MVC
  4. java根据freeMark模板生成内容
  5. intellij idea关闭重复代码提醒
  6. sublime中使用markdown并实时编辑
  7. js|jquery常用代码
  8. Oracle的五种约束
  9. MySQL教程之存储过程与函数
  10. MySQL语句之or和and多条件查询