-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Janus + RabbitMQ #455
Comments
janus does not fork unless you use the |
If the problem is that daemonizing the application returns before checking if everything started, PR #443 should help fix that. As a side note, why reboot the RabbitMQ server? We use it in some deployments and always just restart Janus there. |
No problems. Just disaster recovery checklist. If the server itself must be restarted for whatever reason, then the Janus instance isn't reconnecting to RabbitMQ when it comes back up due to the differences between RabbitMQ startup (sysvinit) and Janus startup (upstart). I rewrote the upstart script you have on your FAQs to support waiting for RabbitMQ to start. RabbitMQ emits "rabbitmq-server-running" and "rabbitmq-server-stopped". Just thought it would be helpful for others who experienced the same. And to make sure I didn't introduce any other side effects. |
Thanks for the clarification! Anyway, I don't think we need to add that to the example as many Janus deployments do not use RabbitMQ. I can add these considerations to the docs, though, e.g., as an example of how you can wait for an event before moving to starting Janus. |
Just updated the docs to reflect that: https://janus.conf.meetecho.com/docs/service |
PS: I haven't mentioned the |
I think it's enough. Plenty of help on Google regarding upstart. Took a bit of digging to find that RabbitMQ already emits the required events to hook into. Will save someone an hour of trying less elegant solutions. ;) @ploxiln In my janus.cfg I have "daemonize = true" and have the log file set. Wouldn't that allow janus to fork? |
Cool, closing then! The documentation links to this issue here so any interested user can add. |
When using Janus in an Upstart script on Ubuntu 14.04 LTS, Janus always starts before RabbitMQ on reboot. This will produce a socket error in the Janus log. Here's a proposed update to the Janus Upstart script for those having the same issue. I also added 'expect fork'. Seemed appropriate as per the documentation for Upstart. Any issues?
The text was updated successfully, but these errors were encountered: