rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.46k stars 271 forks source link

addins not working? #261

Closed ignacio82 closed 7 years ago

ignacio82 commented 7 years ago

I installed rocker/rstudio but I cannot get "Addins" to work. I get a grayed out window. My guess is that it has to do with running RStudio with a proxy, but I'm not sure if that is the issue nor how to solve it. Can you point me in the right direction?

Thanks,

Ignacio

cboettig commented 7 years ago

Hmm, addins work fine for me. Please provide the information we request for new issues in contributing guidelines (yeah, I get that the name is confusing), including the command you are using to run RStudio.

Are you running your instance behind a proxy? (though addins work fine for me with or without a proxy in front of the rstudio instance).

I ran:

docker run --rm -p 8787:8787 rocker/rstudio

then after logging in I did:

install.packages("remotes")
remotes::install_github("rstudio/addinexamples")

Restart R from the session menu, and then I can add addins from the addin menu to an R script.

ignacio82 commented 7 years ago

This is what I run:

docker run -d -p 8787:8787 -e USER=<username> -e PASSWORD=<password> rocker/rstudio

I'm running the container on my synology nas

screenshot 2017-09-22 at 2 21 19 pm

cboettig commented 7 years ago

@ignacio82 Thanks for providing more information.

You are not having a problem with RStudio addins, your issue is just about Docker and port sharing. That's not the generic addin menu, that's specific to blogdown:::new_post_addin.

Judging by the screenshot, you see that this particular addin is listening on 127.0.0.1:3643. You'll need to change the host address to 0.0.0.0:3643, and then you need to bind the port 3643 when you run Docker, just like you are already binding the port 8787. To change to 0.0.0.0 you may have to investigate the blogdown documentation or contact the package maintainer.

ignacio82 commented 7 years ago

I also have this problem when i try to run a shiny app from rstudio

image

and other addins

image

ignacio82 commented 7 years ago

After some trial and error it looks I can say that this has nothing to do with your container. If I login to using my local IP address, then everything works as expected. Alas, if I login using my domain name, all the shiny stuff does not work. No clue how to fix that, it probably has something to do with how my synology redirects the traffic :(

ignacio82 commented 7 years ago

In case someone else is trying to use a synology, this solves the problem: https://github.com/orobardet/dsm-reverse-proxy-websocket