City Jinx
City Jinx

Reputation: 43

Redis reconnect failed - Action Cable

I am trying out Action Cable on the rails 5 pre release version. Anytime I start the server, I get this error

[Action Cable] Redis reconnect failed

Restarting the server several times hasn't helped. Is there anything i am doing wrong?

I am working i Ubuntu 14.04

Upvotes: 4

Views: 1001

Answers (3)

faisal bhatti
faisal bhatti

Reputation: 325

Here are the steps to install redis.

  1. apt-get update
  2. apt-get upgrade -y
  3. apt-get install -y redis-server
  4. service redis-server restart

Upvotes: 0

codewizard
codewizard

Reputation: 406

Assuming that you have redis properly installed, you would then have to make sure that you have your redis server binded to your server, if you're using cloud (i.e. AWS, etc.), binding to localhost or 127.0.0.1 alone is tricky, and from my experience, it did not work as expected.

You would need to explicitly bind to the actual IP of the server, then restart redis.

If you're using Centos and/or RHEL It should be in:

/etc/redis.conf

Then search for the line:

bind 127.0.0.1

then simply add your server IP address to that line, such as:

bind 127.0.0.1 xxx.xx.xxxx

Obviously, substitute the x'es with your IP address.

Then restart:

systemctl restart redis

Worked like a charm for me.

Hope it helps out!

Upvotes: 0

Bubunyo Nyavor
Bubunyo Nyavor

Reputation: 2570

Action Cable works with redis and you will need to install it on your local machine run

sudo apt-get -y install redis-server

and then restart your server

Upvotes: 3

Related Questions