Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nohm Error #137

Open
kahunacohen opened this issue Mar 15, 2015 · 1 comment
Open

Nohm Error #137

kahunacohen opened this issue Mar 15, 2015 · 1 comment

Comments

@kahunacohen
Copy link

Not sure if I'm missing something, but if I clone the project and try to run the server using node for the video tutorial, I get:

node server.js 
{ name: 'Nohm Error',
  message: 'Warning: setClient() received a redis client that is not connected yet. Consider waiting for an established connection before setting it.' }

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
    at RedisClient.on_error (/net/iwebdev2/export/home/web/public/htdocs/staff/cohenaa/projects/video-backbone-beginner-server/node_modules/redis/index.js:189:24)
    at Socket.<anonymous> (/net/iwebdev2/export/home/web/public/htdocs/staff/cohenaa/projects/video-backbone-beginner-server/node_modules/redis/index.js:95:14)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:415:13)

I'd love to follow the tutorial without mocking up the responses. Any help is much appreciated! I did google this error and saw something on SO about calling setClient(redis), but it looks like that's already being done.

@ghost
Copy link

ghost commented Sep 6, 2015

Hey not sure if you still want an answer to this but thought I'd leave a comment anyway.
The 'Nohm Error' you're getting is actually just a warning, to resolve it you just need to wait until the redis client is connected before setting the client. This can be done by replacing 'nohm.setClient(redis);' with this:
redis.on("connect", function() {
nohm.setClient(redis);
//Anything you do afterwards that relies on the nohm client
});
This means that the client won't get set until after the redis client is connected.

As for your actual redis connection error, the issue there is that you're probably not actually running an instance of the redis server on your machine, or it's on a different port other than the default 6379. Make sure you have redis installed and a server running before running your server.js file.

Hope this helps. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant