ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
863 stars 226 forks source link

Setting a host 0.0.0.0 doesn't work #121

Open rustamgasanov opened 8 years ago

rustamgasanov commented 8 years ago

If you specify the host like this:

development:
  server: "http://0.0.0.0:9292/faye"
  secret_token: "secret"

Then start a server with either rackup or thin, both will start it incorrectly:

thin -C config/private_pub.yml -e development start
Using rack adapter
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop

rackup private_pub.ru -s thin -E development
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on localhost:9292, CTRL+C to stop

Of course I can override host/port for both, but seems like the issue described it's not a desired behaviour.

eduardobarbiero commented 8 years ago

I'm with the same problem +1

eduardobarbiero commented 8 years ago

@rustamagasanov test as follows

bundle exec thin start -R private_pub.ru -e production -a 0.0.0.0 -p 9292

Here works fine!

rustamgasanov commented 8 years ago

@eduardobarbiero I know, thats why I wrote, that I can override host/port for both manually, but it's not a desired behaviour. I described the ways for workaround if someone is interested: http://stackoverflow.com/questions/33582812/rails-app-cant-connect-to-private-pub-on-vagrant/33641361#33641361

teodor-pripoae commented 8 years ago

The server key in config is not for the address to listen, but used by Faye client to send messages to the server. (PrivatePub.publish)