att / rcloud.shiny

Shiny support for RCloud
Other
4 stars 12 forks source link

rcloud.shinyApp gets wrong ip address from ip lookup #13

Closed benz0li closed 7 years ago

benz0li commented 7 years ago

If the RCloud server is behind a proxy, nsl(host) in rcloud.shiny.R – with "host" from rcloud.conf – resolves to the ip address of the proxy. Result "Error in startServer(host, port, handlerManager$createHttpuvApp()) : Failed to create server"

gordonwoodhull commented 7 years ago

Hi @benz0li! Good to hear from you and best wishes with b-data!

Thanks for the detailed report - I guess we use load balancers but not proxies (or maybe a different kind of proxy). I'm honestly a little bit confused by all the options and I'll probably have to check with @s-u about this.

Do you have a recommended fix that works in your environment? Would you be willing to submit a PR?

benz0li commented 7 years ago

Hi @gordonwoodhull Thanks for your prompt reply. I will submit a PR instantly.

gordonwoodhull commented 7 years ago

As noted in #14, the reason rcloud.shiny was not working on rcloud.social was because of a configuration error (or complete lack of configuration :wink:). So I think this code is correct, and RCloud can be configured so that rcloud.shiny works behind a proxy.

But if there is another option that you need, either in RCloud or rcloud.shiny, please let us know!

benz0li commented 7 years ago

Now, I only have to figure out what's wrong with my configuration...

benz0li commented 7 years ago

It runs perfectly on CentOS 7.3, but not on Debian 9.0.

on Debian

Are there any known compatibility issues with Debian 9.0? I'm going to test on Debian 8.6 soon.

gordonwoodhull commented 7 years ago

Cool, I'm glad you found a configuration where it works!

I don't think we have tested beyond centos and macos. I haven't seen some of the latest features work on macos because they require "proxification" but it sounds like you are running into problems much earlier.

I'd first make sure that you have the latest shiny/htmltools/httpuv - I don't think the version dependencies are explicit, but rcloud.shiny is replacing a good chunk of shiny in order to run shiny server as a "child http server" in the idle moments.

s-u commented 7 years ago

@benz0li I don't see any reason why the Linux flavor should matter. Make sure you use the latest Rserve version with the callbacks enabled in the configuration - i.e., make sure you don't have parallel trees with packages where it may be picking up an older version from someplace. This is just a guess, so I'd need more details to provide more targeted input.

benz0li commented 7 years ago

@gordonwoodhull and @s-u: Thanks again for your input! After reinstalling all packages not in "base" or "recommended", which need compilation, everything works fine now. The Linux flavour doesn't matter: I confirm rcloud.shiny-0.4.1 working on CentOS 7.3 and Debian 9.0.