Issues talking to redis over a unix domain socket?
jweissman opened this issue · 7 comments
I'm having difficulty getting a firehose instance talking to redis over a unix domain socket.
I'm hoping this is possible as it would make my deployment strategy a bit simpler.
I've tried passing a few different things and get errors when I try to create a new subscriber, e.g., via curl [presumably the errors themselves are from em-hiredis?]: REDIS_URL=redis://tmp/redis.sock
(I get ERROR: no connection
); REDIS_URL=/tmp/redis.sock
, REDIS_URL=unix:///tmp/redis.sock
, REDIS_URL=redis:///tmp/redis.sock
(in this case I get an error about not being able to convert nil into String; I'm wondering if this is an em-hiredis exception bubbling up complaining about the URL being malformed).
[Em-redis apparently provides support for this, as per some recent Github issues; I'm wondering if I'm missing something basic here. I've got redis bound to /tmp/redis.sock as in the URLs above, and can talk to it over that domain socket via redis-cli without issues.]
It seems like the changes to em-redis that support unix domain sockets may have been added recently; but upgrading em-hiredis to 0.2.0 doesn't seem to change the above behavior.
Just got firehose.io running on Openshift by the way, using redis on an internal port rather than the unix socket (can give an example if it sounds useful for wiki/docs?)
Try updating the firehose gem to 1.1.1 and using a unix socket. I just got this working with em-hiredis 0.2.0 on a flight today.
Also, do you have a link to this working in Prod? I'd like to start a list of websites using Firehose.io in prod envs.
I should hopefully have a bit more of the app up in the cloud towards the end of the week... Will definitely let you know!
Planning to give this a shot with the unix domain sockets this evening, by the way.
@jweissman I assume you got this working. Closing this ticket.
If you get a chance let me know how it worked!