Closed dictvm closed 7 years ago
Maybe hubot-redis-brain is misusing the redis module and causing it to always attempt a TCP connection?
Looks like this is the relevant code bit: https://github.com/NodeRedis/node_redis/blob/master/index.js#L1233-L1255
The problem is that this script parses the REDIS_URL to construct options to pass into Redis.createClient
: https://github.com/hubot-scripts/hubot-redis-brain/blob/master/src/redis-brain.coffee#L38
I think it needs to check for a unix
scheme, and pass in something different. Looking at https://github.com/NodeRedis/node_redis/blob/7922d4eb8552b287b30a18a744c9ab27674c12e5/index.js#L1140 I think the path to the socket is passed in as a string to 'port' (not sure how that makes sense).
It looks like that aw worked on this. I created a pull request: https://github.com/hubot-scripts/hubot-redis-brain/pull/12 - But I suggest #14 for more options
This should also fix it: https://github.com/hubot-scripts/hubot-redis-brain/pull/14
I am also having these issues, would love to see #14 merged if it fixes the problem.
@technicalpickles let's give hubot-redis-brain some love! I'd like to see #14 merged as well. Willing to help, if needed.
The #12 was merged (well, code was merged, PR was not, my fault). I tested locally and it works fine.
:heart: :heart: :heart:
My environment requires I run redis via a unix socket, which is fully supported by the redis developers. However, I have so far failed to find a working REDIS_URL-string for this setup.
I have tried the following REDIS_URLs:
According to various Google searches,
export REDIS_URL=unix:/home/hubot/.redis/sock
should be the correct option.Unfortunately, my hubot fails to connect to redis with any of these configurations, while redis itself is running perfectly fine :
During startup, hubot discovers the REDIS_URL (without performing any verification, I assume), but then does not nothing:
when in fact I should be able to see something like this during first startup:
At first I thought, I might simply lack the option to add the required prefix to a unix socket when using REDIS_URL. However, said prefix is meant to be optional and should default to "hubot", so I cannot imagine that this is the problem.
Any help is really appreciated. Thank you!