database - Error connecting to Redis Server from Node.js on Amazon AWS EC2 server -


i trying run node.js server , redis server on amazon aws ec2 micro instance .

i have installed redis server , redis-server command runs fine .

i use 'forever' keep redis-server running . , works fine .

but when start node server , fails connect redis-server .

it gives following error -

error error: redis connection 127.0.0.1:6379 failed - connect econnrefused  

doing 'forever list' shows redis server running fine .

info:   forever processes running data:       uid  command script                         forever pid   logfile                        uptime           data:   [0] _pxw node    app.js                         26670   26671 /home/ubuntu/.forever/_pxw.log 0:0:0:13.463     data:   [1] ylt1 node    redis-server                   25013   26681  

i have verified when redis-server starts , starts @ 6379 port .

can me explain why error happening , how fix ?

i use following code connect redis . have client libraries installed redis .

var redis = require("redis"),         client = redis.createclient(); 

everything runs fine when run code on localhost .

have checked redis client-server connection on aws using ping-pong routine. next maybe should try running without forever, root.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -