firehoseio / firehose

Build realtime Ruby web applications. Created by the fine folks at Poll Everywhere.
http://firehose.io/
MIT License
727 stars 72 forks source link

Issues talking to redis over a unix domain socket? #24

Closed jweissman closed 11 years ago

jweissman commented 11 years ago

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.]

jweissman commented 11 years ago

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.

jweissman commented 11 years ago

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?)

bradgessler commented 11 years ago

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.

bradgessler commented 11 years ago

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.

jweissman commented 11 years ago

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!

jweissman commented 11 years ago

Planning to give this a shot with the unix domain sockets this evening, by the way.

bradgessler commented 11 years ago

@jweissman I assume you got this working. Closing this ticket.

If you get a chance let me know how it worked!