Closed benz0li closed 7 years ago
Thanks @benz0li. I'll see if this solution also works in our environment.
rcloud.shiny runs perfectly for us in two "enterprise RCloud" environments, but there is still much to troubleshoot.
Known problems:
Note that the implementation in 0.4 is almost completely different from 0.3. The idea is to allow the Shiny server to tunnel through RCloud, to allow all the auxiliary HTTP requests which Shiny expects. Previously we just relied on tunneling the Shiny websocket and rewriting URLs for assets, but that only got us about 90% of the way.
rcloud.shiny 0.4 requires RCloud 1.7 mostly because 1.7 uses Rserve 1.8-5, which has an idle callback hook. I'm assuming you got past that part.
If you have the patience to help us troubleshoot, we could surely use the help!
TBH I think RCloud is too flexible in a lot of ways - there are many, many valid configurations...
@gordonwoodhull you are welcome. I am happy to help troubleshooting rcloud.shiny-0.4. First I have to set up a proper test environment as well as study the changes from 0.3 to 0.4. I'll get back to you next week.
@gordonwoodhull, I use nginx on the frontend server to serve static files (js, css) and pass all other requests on port 443 to backend servers running RCloud proxified on port 8080.
You mention "opening up the ports" in you post. Which ports - apart from 443 (frontend) and 8080 (backend) - need to be open to get rcloud.shiny-0.4.x running?
@benz0li the change won't work in general, because the nodename may not be related to interface that proxy will be connecting shiny on. Also if the Host
setting in your RCloud configuration doesn't work, you have other issues since session forwarding will not work, either. The error will show up only if you didn't configure Host
correctly in rcloud.conf
- it should refer to the external interface of the machine - so precisely what's needed here. Note that in load-balanced setting you'd set cookie.domain
to the external name and host
to the internal one of each individual VM. Does that make sense?
@s-u This makes perfectly sense. Thanks for the explanations. Why is rcloud.social not configured accordingly?
rcloud.get.conf.value('host')
returns "rcloud.social"
rcloud.get.conf.value('cookie.domain')
returns NULL
-> rcloud.social is a load-balanced setting, right?
Despite the changes in rcloud.conf
, Shiny (still) does not work on my RCloud 1.7. Before reporting again, I will have a look at the settings of firewalls.
Because the admin had no clue ;) But seriously, we didn't use the session info on rcloud.social and the config is from the master VM that was originally not load-balanced. Yes, I need to fix that :).
Update: @s-u updated the configuration on rcloud.social and now rcloud.shiny 0.4.1 is fully working.
So I think this is not the right approach and you probably need to configure differently instead. Let's definitely figure it out, but I'm going to close this and #13
Instead of using the host from rcloud.conf, rcloud.ShinyApp should use the nodename of the host it's running on. This resolves the error "Failed to create server". But there are more problems to solve in order to get shiny apps running on RCloud 1.7...