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

Can't get example on homepage working? #19

Closed jweissman closed 11 years ago

jweissman commented 11 years ago

Sorry if this is noisy/overlaps with the other issue I've filed but I just wanted to be clear about my core issue, which isn't with CORS in particular; it's that I can't even get the basic curl subscription behavior from the firehose server example on the homepage.

On the curl side, when I try to curl "http://localhost:7474/hello", I get acurl: (52) Empty reply from server` error, and curl exits. On the firehose side, I am seeing the following in the logs:

[2013-04-08 16:07:05.748 #55236] INFO : Starting 1.1.0 'Rockin' Reconnect', in development
[2013-04-08 16:07:05.832 #55236] INFO : listening on addr=0.0.0.0:7474 fd=7
[2013-04-08 16:07:05.832 #55236] INFO : worker=0 spawning...
[2013-04-08 16:07:05.834 #55236] INFO : master process ready
[2013-04-08 16:07:05.873 #55289] INFO : Rainbows! EventMachine worker_connections=400
[2013-04-08 16:07:05.873 #55289] INFO : EventMachine: epoll=false kqueue=true
[2013-04-08 16:07:08.656 #55289] DEBUG : HTTP GET with last_sequence 0 for path /hello with query "" and params {}
[2013-04-08 16:07:08.663 #55289] INFO : [em-hiredis 127.0.0.1:6379] Reconnect failed
[2013-04-08 16:07:08.663 #55289] INFO : [em-hiredis 127.0.0.1:6379] Reconnect failed
[2013-04-08 16:07:08.664 #55289] ERROR : Use pubsub client
[2013-04-08 16:07:08.668 #55236] ERROR : reaped #<Process::Status: pid 55289 exit 1> worker=0
[2013-04-08 16:07:08.669 #55236] INFO : worker=0 spawning...
[2013-04-08 16:07:08.705 #56329] INFO : Rainbows! EventMachine worker_connections=400
[2013-04-08 16:07:08.705 #56329] INFO : EventMachine: epoll=false kqueue=true
jweissman commented 11 years ago

Okay, so this seems to be about some recent changes to em-hiredis -- rolling back to the previous version (before 0.2.0) seems to have changed it. Looks like this was changed in the last few days. Anyway, closing my issues for the time being.

bradgessler commented 11 years ago

Interesting, do you have a link to the changes in em-redis that caused the problem?

jweissman commented 11 years ago

I filed this issue report with them, which was closed (and they outlined the changes that would need to be made, more or less) -- https://github.com/mloughran/em-hiredis/issues/24

It looks like most of the changes are in em-hiredis' client.rb; my sense is that the API really just changed a little bit, but enough to break older clients.

jweissman commented 11 years ago

To be clear I only really caught up to what was going on because the new release was really recent -- like three days ago! -- and because the delta on em-redis' client.rb between 0.1.1 and 0.2.0 clearly indicated the error that I was seeing.

jweissman commented 11 years ago

Pretty sure this is the culprit but haven't dug incredibly deeply here:

https://github.com/mloughran/em-hiredis/commit/e44078c1e0c47bfef1095066b98136bfc596c5d4

bradgessler commented 11 years ago

Did you end up patching this to deal with the 2.0 changes or pegging em-hiredis to 1.x?

jweissman commented 11 years ago

Pegged em-hiredis to 1.x for the time being (just to permit local development to move forward).