chameleonbr / node-red-contrib-redis

Node RED client for Redis with pub/sub, list, lua scripting and other commands support.
MIT License
46 stars 42 forks source link

MaxRetriesPerRequestError - when testing the test flow #19

Closed tony-shannon closed 4 years ago

tony-shannon commented 5 years ago

Hi We are grateful for this useful module for both NodeRed and Redis It seems as if since we recently used this module that something may have changed. We have started to see this error when testing flows using this module "MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details. at Socket. (/usr/src/node-red/node_modules/ioredis/built/redis/event_handler.js:108:37) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at TCP._handle.close [as _onclose] (net.js:561:12)"

See evidence here when using the test flow you provide image you can see the redis nodes seem to be connected ok, but setting the key value pair triggers this error

Ideas welcome on how to test further please, we will continue to investigate here

pesutak commented 5 years ago

i have the same issue, any suggestion?

strautins commented 4 years ago

Feels like its ignoring connection address and connects only to localhost or I don't know how to change server address.

[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
9 Mar 07:12:38 - [error] [redis-command:testing REDIS] MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.
    at Socket.<anonymous> (/data/node_modules/ioredis/built/redis/event_handler.js:108:37)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at TCP._handle.close [as _onclose] (net.js:561:12)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
tony-shannon commented 4 years ago

not sure if we did ever resolve this but think it was due to Redis IP/port setting config issue, as far as I recall

millisande commented 4 years ago

I seem to be having the same issue. No matter what I change the configuration I get that same error message in the initial description.

I've tried setting the Name of the server to "local" , to 127.0.0.1:6379, to localhost:6379 and to an external cloud constructed url. I have also tried setting the options to variably:

{"host":"127.0.0.1", "port":"6379"}

{"host":"127.0.0.1:6379"}

tried host being my rediss url for my cloud service as well in the options

and {}

I can't see what I am doing wrong. I can open the local redis instance in TablePlus and if I go direct to the URL I get -ERR wrong number of arguments for 'get' command so I know that the Redis instance is live, besides which I'd expected ECONNREFUSED or similar if the Redis client isn't available.

Any ideas what I am doing wrong?

Also I've seen varying information about how to use the redis-configuration. Is the Name a non-functional string/label? Do you need to enter the host in the options object? Can we have more documentation in the ReadMe as to what should be entered into the redis-configuration please?

drjofu commented 4 years ago

With the syntax mentioned by millisande I filled in the local ip-address of the redis server instead of localhost: {"host":"192.168.0.190", "port":"6379"}

This worked for me. Unfortunately there ist no documentation on how to set this object.

In my case both redis and node-red are running in containers on Docker for Windows, so "localhost" does not work.

Jo