-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fixes #122: add logging to inform user of Redis connection failure #553
Conversation
@yatsenko-julia I flagged you for review on this as well. Since you recently hit this issue yourself, could you try pulling @Silvyre's PR and testing it with your setup to see if you get the message? |
I also tested this locally, and here is what I see, with Redis disabled on my Mac:
@Silvyre, your message happens multiple times. Do you think it might be possible to get this to only happen once? If it scrolls off the screen, it loses some of its value. |
Looking into this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked this PR and the message only appears once as we wanted. I can give an approving review after you've made changes addressed by @humphd :)
[cindy@localhost telescope]$ npm start
> telescope@0.0.1 start /home/cindy/Documents/Projects/telescope
> node src/backend
[ 2020-01-20 18:09:15.686 ] INFO (2996 on localhost.localdomain): Telescope listening on port 3000
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14)
[ 2020-01-20 18:09:15.696 ] ERROR (2996 on localhost.localdomain):
💡 It appears that Redis is not running on your machine.
Please see our documentation for how to install and run Redis:
https://github.com/Seneca-CDOT/telescope/blob/master/docs/CONTRIBUTING.md
[ 2020-01-20 18:09:15.697 ] ERROR (2996 on localhost.localdomain): Queue feed-queue error
err: {
"type": "Error",
"message": "Error initializing Lua scripts",
"stack":
Error: Error initializing Lua scripts
at /home/cindy/Documents/Projects/telescope/node_modules/bull/lib/queue.js:155:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
}
[ 2020-01-20 18:09:15.699 ] INFO (2996 on localhost.localdomain): Received UNHANDLED REJECTION, starting shut down
[ 2020-01-20 18:09:15.699 ] ERROR (2996 on localhost.localdomain):
err: {
"type": "Error",
"message": "connect ECONNREFUSED 127.0.0.1:6379",
"stack":
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14)
"errno": "ECONNREFUSED",
"code": "ECONNREFUSED",
"syscall": "connect",
"address": "127.0.0.1",
"port": 6379
}
[ 2020-01-20 18:09:15.700 ] INFO (2996 on localhost.localdomain): Web server shut down.
[ 2020-01-20 18:09:15.701 ] INFO (2996 on localhost.localdomain): Feed queue shut down.
[ 2020-01-20 18:09:15.701 ] INFO (2996 on localhost.localdomain): Completing shut down.
I am not sure why but I've got a different message. Here it is:
|
@yatsenko-julia that likely means
|
@humphd Thank you! Now it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Issue This PR Addresses
Fixes #122
Type of Change
Description
As suggested in #48 (comment), added logic to handle 'ECONNREFUSED' errors within the Bull queue: 'ECONNREFUSED' are now logged an informative blurb instead of a stack trace.
https://github.com/Silvyre/telescope/blob/818ba4c9404f2cd5f2a70b7826a3650f1c215587/src/backend/lib/queue.js#L32-L43
Checklist