Git Product home page Git Product logo

jupyter-rsession-proxy's Introduction

jupyter-rsession-proxy

TravisCI build status

jupyter-rsession-proxy provides Jupyter server and notebook extensions to proxy RStudio.

Screenshot

If you have a JupyterHub deployment, jupyter-rsession-proxy can take advantage of JupyterHub's existing authenticator and spawner to launch RStudio in users' Jupyter environments. You can also run this from within Jupyter. Note that RStudio Server Pro has more featureful authentication and spawning than the standard version, in the event that you do not want to use Jupyter's.

This extension used to proxy Shiny server as well, however that functionality has been separated.

Installation

Pre-reqs

Install rstudio

Use conda conda install rstudio or download the corresponding package for your platform

Note that rstudio server is needed to work with this extension.

Install jupyter-rsession-proxy

Install the library via pip:

pip install jupyter-rsession-proxy

Or via conda:

conda install -c conda-forge jupyter-rsession-proxy

Example

rocker/binder contains an example installation which you can run on binder.

Launch binder

Multiuser Considerations

This extension launches an rstudio server process from the jupyter notebook server. This is fine in JupyterHub deployments where user servers are containerized since other users cannot connect to the rstudio server port. In non-containerized JupyterHub deployments, for example on multiuser systems running LocalSpawner or BatchSpawner, this not secure. Any user may connect to rstudio server and run arbitrary code.

Configuration with Environment Variables

The following behavior can be configured with environment variables

| Environment Variable | Effect | Default Value | Notes | JUPYTER_RSESSION_PROXY_WWW_FRAME_ORIGIN | The value of the www-frame-origin flag to rserver | same | | | RSERVER_TIMEOUT | Idle timeout flag to rserver in minutes | 15 | must be numeric and positive | | RSESSION_TIMEOUT | Idle timeout flag to rsession in minutes | 15 | must be numeric and positive | | NB_USER | Fallback name of the Notebook user, if password database lookup fails | getuser.getpass() ||

jupyter-rsession-proxy's People

Contributors

anton-khodak avatar betatim avatar ccoulombe avatar consideratio avatar danielfrg avatar danilopeixoto avatar derekheldtwerle avatar fm75 avatar iagomez avatar josephofiowa avatar kalugny avatar lsetiawan avatar matuskosut avatar rickmcgeer avatar rickyjin avatar ryanlovett avatar vivian-rook avatar willingc avatar xhochy avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyter-rsession-proxy's Issues

R Studio Initialization Error

I've installed Jupyterhub, R server, and jupyter-rsession-proxy locally. I am able to select a RStudio kernel, however when I select It I get a "R Studio Initialization Error" as seen below.

Screen Shot 2020-02-17 at 4 08 03 PM

I've look through all the issues and have been unable to find a similar issue. I'm unsure on how to proceed. Does anyone have any insight on where I should investigate this issue?

Error in README

The doc says:

pip install -e /opt/nbserverproxy
jupyter serverextension enable --py nbrsessionproxy
jupyter labextension link /opt/nbrsessionproxy/jupyterlab-rsessionproxy

I'm sure you meant nbrsessionproxy and not nbserverproxy, right?

Option to set "reconnect false;" for shiny apps

shiny-server has a configuration option called reconnect (see https://community.rstudio.com/t/app-feature-works-on-shinyapps-io-but-not-with-shiny-server-pro/36285/3). Is there an option to set this to false for Shiny apps launched using the Shiny icon via jupyter-rsession-proxy?

Related question: Does jupyter have a similar reconnect option to shiny-server I could turn off as shiny apps launched from Rstudio through jupyterlab seem to mess up the same feature mentioned in the post above.

RStudio Will not open

Hi,
When I try to click on RStudio Session, I get an error containing the following message:

[I 2018-08-06 04:03:55.988 SingleUserNotebookApp handlers:438] No existing rsession found
[I 2018-08-06 04:03:55.988 SingleUserNotebookApp handlers:390] Starting process...

What port will this run on?

I am trying to install this on AWS, on top of a working Jupyterhub installation. Does this require opening access through another port? I noticed that port 46645 is mentioned in the Jupyterhub logs. Should I create a security group with that port open, in addition to ports I have open for Jupyterhub? I am getting a 404 when I run this without that port open.

user-identity=jovyan hardcoded?

Hello,

I've been looking at this today and it's awesome :). Thank you for creating this!

I noticed that R Studio shows jovyan as the user regardless of the actual user logging in through JupyterHub. Would it be possible to pass in the real username?

The following pids show 2 users (vagrant and demouser), but --user-identity=jovyan stays constant all the way across

vagrant  25417     1  0 16:20 ?        00:00:17 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=39670
vagrant  27733     1  0 21:08 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=41793
vagrant  27891     1  0 21:13 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=38717
demouser 28225 28209  1 21:20 ?        00:00:00 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=38268
vagrant  28269 28252  3 21:21 ?        00:00:01 rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=45930

Direct users to jupyter-shiny-proxy

I was surprised by the removal of the shiny proxy from this package (cf #70, #81). It makes sense to me, but perhaps we can add a link to jupyter-shiny-proxy in the readme?

proxy error when rsession startup is slow

If the user has some content loaded in their rsession and it doesn't fully start up before the browser connects to it, the user will see a proxy error.

Refreshing the window will connect to the working session.

We need to wait until the session is available before switching to it.

Configuration variable precedence

Where should configuration changes for the RSessionContext configurables path, cmd and env go? I tried c.RSessionContext.env in jupyter_notebook_config.py but that seemed to be ignored.

Creating a Rmarkdown File resulting in 500 Status error

Hi Team,

When ever I am clicking on the Rmarkdown from the file's menu, it is throwing the 500 status error code. Rmarkdown package is installed. Has anyone faced any issues with it? Appreciate if someone can provide inputs?

Rstudio integration to Jupyterhub (z2jh)

I have installed jupyterhub on linux box using z2jh guide. i have configured multiple profile lists and i am able to work with the profiles given on z2jh document. (https://zero-to-jupyterhub.readthedocs.io/en/latest/user-environment.html#using-multiple-profiles-to-let-users-select-their-environment).
I have followed #990 and #69 to set it up.
However, when i tried the issue threads to add one more image for Rstudio in jupyter hub; it did not work for me and i keep getting 404 as follows:
404_rstudio

Steps which i followed:
1.) install and run z2jh

sudo install minikube /usr/local/bin
minikube start
sudo install ~/Downloads/VirtualBox-6.0-6.0.10_132072_el7-1.x86_64.rpm 
sudo rpm -i ~/Downloads/VirtualBox-6.0-6.0.10_132072_el7-1.x86_64.rpm 
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
kubectl --namespace kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --wait
kubectl patch deployment tiller-deploy --namespace=kube-system --type=json --patch='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["/tiller", "--listen=localhost:44134"]}]'
kubectl config  get-context
helm version
#helm init --service-account tiller --wait
openssl rand -hex 32
mkdir z2jh
cd z2jh/
sl config.yaml
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
helm repo list
RELEASE=jhub
NAMESPACE=jhub
helm upgrade --install $RELEASE jupyterhub/jupyterhub   --namespace $NAMESPACE    --version=0.8.2   --values config.yaml
kubectl config set-context $(kubectl config current-context) --namespace ${NAMESPACE:-jhub}
kubectl --namespace=jhub get pod
kubectl --namespace=jhub get svc proxy-public 
kubectl config current-config # cross check kube config
kubectl describe service proxy-public --namespace jhub
kubectl config cluster-info # to know cluster public ip
#couple of above kubectl commands i used to know ip and port where the jupyterhub is running.

2.) sl config.yaml in step 1

singleuser:
  defaultUrl: "/rstudio"
  memory:
    limit: 100M
    guarantee: 100M
  cpu:
    limit: .2
    guarantee: .1
    # Defines the default image
  image:
    name: jupyter/minimal-notebook
    tag: 2343e33dec46
  profileList:
    - display_name: "Minimal environment"
      description: "To avoid too much bells and whistles: Python."
      default: true
    - display_name: "Datascience environment"
      description: "If you want the additional bells and whistles: Python, R, and Julia."
      kubespawner_override:
        image: jupyter/datascience-notebook:2343e33dec46
    - display_name: "Spark environment"
      description: "The Jupyter Stacks spark image!"
      kubespawner_override:
        image: jupyter/all-spark-notebook:2343e33dec46
    - display_name: "Rstudio environment"
      description: "The rstudio Stacks image!"
      kubespawner_override:
        image: my_docker_artifactory/rstudio:v0.0.1
proxy:
  secretToken: "2b31007cb9bdc1111ec4d470543eea3411221150f2d04e9b4661d77cf8c"

3.) login to jh, and i see the options from profile list
Screen Shot 2019-08-28 at 8 54 14 PM

4.) choosing rstudio and click on spawn
404_rstudio

**5.) rstudio dockerfile content **

FROM jupyter/r-notebook

RUN python3 -m pip install jupyter-rsession-proxy
RUN cd /tmp/ && \
    git clone --depth 1 https://github.com/jupyterhub/jupyter-server-proxy && \
    cd jupyter-server-proxy/jupyterlab-server-proxy && \
    npm install && npm run build && jupyter labextension link . && \
    npm run build && jupyter lab build
# install rstudio-server
USER root
RUN apt-get update && \
    curl --silent -L --fail https://download2.rstudio.org/rstudio-server-1.1.419-amd64.deb > /tmp/rstudio.deb && \
    echo '24cd11f0405d8372b4168fc9956e0386 /tmp/rstudio.deb' | md5sum -c - && \
    apt-get install -y /tmp/rstudio.deb && \
    rm /tmp/rstudio.deb && \
    apt-get clean && rm -rf /var/lib/apt/lists/*
ENV PATH=$PATH:/usr/lib/rstudio-server/bin
USER $NB_USER

@mathematicalmichael @trallard @ablekh can you please help me out here?

Thanks

[meta] Status of this project?

Hello,

Could the maintainers of this repository provide some clarity on the status of this project? It's a great jupyterhub component that many of us find useful, but I'm starting to get nervous that it has been abandoned.

For instance, I can only get it working when I use the version on PyPi, which is not available if I build from source from this repository.

There are a few of us who have been commenting in the issues to help each other get around broken bits that crop up from time to time, but I don't think we have the skill to actually implement fixes in the code.

@ryanlovett @yuvipanda could you please give us some comment?

can manually connect but not with the UI

I'm working my way through getting nbrsessionproxy installed installed on my JupyterHub stack that uses DockerSpawner and JupyterLab. I've inched forward and can now manually run R Studio Server from the command prompt like this:

/usr/lib/rstudio-server/bin/rserver --www-port=56789

and then I can connect to that R Studio Server by manually putting the link in my browser:http://localhost:8000/user/jal/proxy/56789/ (my uid is jal)

Note that from Jupyter Terminal I cannot type simply enter rserver as it needs the full path. Is this a clue?

I have struggled to get the PATH set in such a way that I was confident /usr/lib/rstudio-server/bin/ was guaranteed to be in the path. So for the sake of testing, I edited handlers.py to include the full path in the rserver command:

    def get_cmd(self):
        # rsession command. Augmented with user-identity and www-port.
        return [
            '/usr/lib/rstudio-server/bin/rserver',
            '--www-port=' + str(self.port)
        ]

This did not change the behavior when I click on RStudio -> Launch R Studio in the JupyterLab UI. That still opens http://localhost:8000/user/jal/rstudio with the following 404 message:

image

Any tips on what I might test next? I'm a bit hung as I can't figure out how to debug what's happening when I click the menu buttons. Is there a log file I should be checking? The code makes it seem like there's also a temp file that contains the port, etc. Is there an easy way of finding that temp file?

Many thanks,

J

Cannot export files from RStudio

Hello,

Environment

I am running:

  • RStudio server 1.2.1335
  • Zero to Jupyterhub on Kubernetes v 0.9-2ad0104
  • Jupyterhub is on a subpath (/workbench)behind a traefik reverse proxy.

Jupyter server proxy and jupyter rsession proxy are both installed straight from pypi.

My RStudio image Dockerfile is here.

Issue

I can upload files to RStudio, and it otherwise operates normally.

But when I try export a file, Jupyterhub returns a 500 error.

Expected behavior:

The file downloads to my laptop.

If multiple files are selected, a zip is downloaded to my laptop.

Unable to install packages via install.packages() in R

With the provided Dockerfile, internet routines cannot be loaded when running install.packages(), leading to a failure in the package installation.

> install.packages("sp", verbose = TRUE)
system (cmd0): /opt/conda/lib/R/bin/R CMD INSTALL
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (internet routines cannot be loaded); using local file '/opt/conda/lib/R/doc/CRAN_mirrors.csv'
Secure CRAN mirrors

 1: 0-Cloud [https]                 2: Australia (Canberra) [https]
 3: Australia (Melbourne) [https]   4: Australia (Perth) [https]
 5: Austria [https]                 6: Belgium (Ghent) [https]
 7: Brazil (RJ) [https]             8: Brazil (SP 1) [https]
 9: Bulgaria [https]               10: Chile 1 [https]
11: China (Lanzhou) [https]        12: Colombia (Cali) [https]
13: Czech Republic [https]         14: Denmark [https]
15: France (Lyon 1) [https]        16: France (Lyon 2) [https]
17: France (Marseille) [https]     18: France (Montpellier) [https]
19: France (Paris 2) [https]       20: Germany (Münster) [https]
21: Iceland [https]                22: Indonesia (Jakarta) [https]
23: Ireland [https]                24: Italy (Padua) [https]
25: Japan (Tokyo) [https]          26: Malaysia [https]
27: Mexico (Mexico City) [https]   28: Norway [https]
29: Philippines [https]            30: Russia (Moscow) [https]
31: Spain (A Coruña) [https]       32: Spain (Madrid) [https]
33: Sweden [https]                 34: Switzerland [https]
35: UK (Bristol) [https]           36: UK (Cambridge) [https]
37: UK (London 1) [https]          38: USA (CA 1) [https]
39: USA (KS) [https]               40: USA (MI 1) [https]
41: USA (TN) [https]               42: USA (TX 1) [https]
43: USA (TX 2) [https]             44: (other mirrors)


Selection: 1
Warning: unable to access index for repository https://cloud.r-project.org/src/contrib:
  internet routines cannot be loaded
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
  unable to load shared object '/opt/conda/lib/R/modules//internet.so':
  /opt/conda/lib/R/modules//../.././libk5crypto.so.3: symbol krb5int_utf8s_to_ucs2les version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
2: package ‘sp’ is not available (for R version 3.4.1)

As we don't have such an issue with jupyter/r-notebook which your Dockerfile is based on, I took a second look at your Dockerfile and realized that removing the last line for setting the LD_LIBRARY_PATH environment variable resolves the issue.

However, I don't quite understand the purpose of the setting the LD_LIBRARY_PATH environment variable. Thus i wanted to ask if it is safe to not set LD_LIBRARY_PATH? If not, what is a better resolution?

Proxy for shiny app doesn't seem to work

Overview

When trying to launch a new shiny app from RStudio Server, it opens a new browser window but fails with an error /p/3773/ not found

Notes

  1. Currently, when just running a simple Docker RStudio, there is a shiny server that runs, I am not sure how to check within R or docker whether this is running in the background.
[2018-01-19 20:34:18.132] [INFO] shiny-server - Shiny Server v1.5.4.847 (Node.js v6.10.3)
[2018-01-19 20:34:18.134] [INFO] shiny-server - Using config file "/etc/shiny-server/shiny-server.conf"
[2018-01-19 20:34:18.166] [WARN] shiny-server - Running as root unnecessarily is a security risk! You could be running more securely as non-root.
[2018-01-19 20:34:18.169] [INFO] shiny-server - Starting listener on 0.0.0.0:3838
  1. When the shiny-server above is running, the application works.

R cmd interface:

> shiny::runApp('testshine')
Loading required package: shiny

Listening on http://127.0.0.1:3971

screenshot from 2018-01-19 12-37-55

  1. When doing the samething within a jupyterhub server, it seems like there is no proxy to the appropriate port, which I think is causing the not found error.

R cmd interface on jupyterhub:

> shiny::runApp('testshiny')
Loading required package: shiny

Listening on http://127.0.0.1:3773

Run shiny app from Rstudio

In earlier versions of jupyter-rsession-proxy where Rstudio was accessible from a dropdown it was possible to launch a shiny app or gadget from Rstudio. In the latest version where Rstudio is accessible through launcher icons (very nice!) this no longer works however.

Below screenshots from two images on dockerhub using the "older" and "newer" jupyter-rsession-proxy settings.

Icon:

vnijs/rsm-jupyterhub:1.2.1

image

Dropdown:
vnijs/rsm-jupyterhub:1.1.0

image

"No user specified" error with Rstudio 1.2.1335

Hi,

I'm using jupyter-rsession-proxy inside zero-to-jupyterhub Kubernetes deployment. For Rstudio version == 1.2.1335 R code is executed in console, but launching any R code from the editor ends with an error:

[rsession-] ERROR system error 13 (Permission denied) [description=No user specified]; OCCURRED AT: rstudio::core::Error rstudio::server_core::sessions::signRequest(const string&, rstudio::core::http::Request&, bool) /var/lib/jenkins/workspace/IDE_open-source-pipeline_v1.2/src/cpp/server_core/sessions/SessionSignature.cpp:42; LOGGED FROM: void rstudio::session::modules::rmarkdown::notebook::{anonymous}::NotebookQueue::consoleThreadMain() /var/lib/jenkins/workspace/IDE_open-source-pipeline_v1.2/src/cpp/session/modules/rmarkdown/NotebookQueue.cpp:498

It works as expected with RStudio == 1.1.456. I suspect it has something to deal with how rsession-proxy specifies a user when starting Rstudio.

Disable Upload and Download functionality

Hi Everyone,

Really loving this. This really suits our use case to have rstudio running in container along with Jupyterhub, which has controls around. I need to ask one thing if it is possible to disable upload/download functionality from the Rstudio UI? Can't go with Enterprise version need to figure out any workaround for disabling those 2 functionality.

Thanks in Advance.

docker build fails with "No module named 'nbserverproxy'" for v0.8.0

building image from v0.8.0 tag fails

docker build -t jupyterhub/jupyter-rsession-proxy:0.8.0 .
 ---> Running in d0dbaa0883c8
Traceback (most recent call last):
  File "/opt/conda/bin/jupyter-serverextension", line 11, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/opt/conda/lib/python3.7/site-packages/notebook/serverextensions.py", line 294, in start
    super(ServerExtensionApp, self).start()
  File "/opt/conda/lib/python3.7/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/opt/conda/lib/python3.7/site-packages/notebook/serverextensions.py", line 211, in start
    self.toggle_server_extension_python(arg)
  File "/opt/conda/lib/python3.7/site-packages/notebook/serverextensions.py", line 200, in toggle_server_extension_python
    m, server_exts = _get_server_extension_metadata(package)
  File "/opt/conda/lib/python3.7/site-packages/notebook/serverextensions.py", line 328, in _get_server_extension_metadata
    m = import_item(module)
  File "/opt/conda/lib/python3.7/site-packages/traitlets/utils/importstring.py", line 42, in import_item
    return __import__(parts[0])
ModuleNotFoundError: No module named 'nbserverproxy'

GUI launcher won't show in jupyterlab

I have installed jupyter-rsession-proxy as set out in the documentation and the Dockerfile within a custom Dockerfile I created. (Basically, it combines R, Python, Julia and Octave and some extensions for the lab enviornment such as jupyterlab-latex and git. I am using the Dockerfile in a docker-deployed jupyterhub setting).

Since the major update and change of the package name a month ago, I am unable to get jupyter-rsession-proxy to work with jupyterlab (0.35). While in the classic notebook environment I get the RStudio entry in the menu and it works nicely, within jupyterlab there is no entry in the menu and there is no launcher...

When issuing jupyter labextensions list then I see that jupyterlab-server-proxy is installed.

I am not sure how to go about it. I would be happy to hear any advice

Daemonized rserver started

When running rstudio through this, I actually see two processes:

yuvipan+ 16079  0.1  0.0 164716 11012 pts/0    Sl+  13:47   0:00          |                       \_ rserver --www-port=58107
rstudio+  7595  0.0  0.0  99584  7484 ?        Ssl  13:10   0:00 /usr/lib/rstudio-server/bin/rserver

One is rserver --www-port=58107, which is a child of my notebook, running as me. Other is a daemonized process running as rstudio user.

The process that's actually serving the requests is the second, daemonized process:

sudo lsof -i | grep 58107
rserver   16079       yuvipanda    6u  IPv4 2569599      0t0  TCP *:58107 (LISTEN)

We should force rserver to not deamonize.

Terminal not working in RStudio

Hello! When I run jupyter-rsession-proxy with this Dockerfile and try opening a terminal in RStudio, I get the following error in console:

[I 09:15:51.316 NotebookApp] Trying to establish websocket connection to ws://localhost:46203/p/a345fca3/terminal/C3090FD3/
[E 09:15:51.471 NotebookApp] Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f35952d9b38>>, <Task finished coro=<ProxyHandler.proxy_open.<locals>.start_websocket_connection() done, defined at /opt/conda/lib/python3.7/site-packages/jupyter_server_proxy/handlers.py:258> exception=HTTP 404: Not Found>)
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.7/site-packages/tornado/ioloop.py", line 743, in _run_callback
        ret = callback()
      File "/opt/conda/lib/python3.7/site-packages/tornado/ioloop.py", line 767, in _discard_future_result
        future.result()
      File "/opt/conda/lib/python3.7/site-packages/jupyter_server_proxy/handlers.py", line 263, in start_websocket_connection
        on_message_callback=message_cb, on_ping_callback=ping_cb)
    tornado.httpclient.HTTPClientError: HTTP 404: Not Found

and the terminal displays nothing
image

Support jupyterlab 0.30

Unfortunately, did not manage to install this package since it doesn't support the latest jupyterlab version.

Example Dockerfile doesn't correctly configure/launch RStudio

Expected behaviour:

RStudio launches and runs normally

Actual behaviour:

RStudio fails to launch and keeps spitting out ERROR R SUICIDE: unable to initialize the JIT until it turns into a 500 error could not start rstudio in time

Steps to reproduce:

Using the example Dockerfile and running
docker build . --tag=foo
docker run -p 8888:8888 -it foo:latest

Haven't tested from other machines but I don't think that's the issue here. If anyone else has run into this/knows how to fix it please share! Thanks for your efforts!

open rstudio session for multi-user in jupyterhub

Whether it is possible to open multi rstudio sessions in a multi-user jupyterhub environment with the Jupyter-rsession-proxy extension?
I have already installed the Jupyter-rsession-proxy and could open rstudio session for one user. But when I switch to another user, the rstudio session didn't work. It showed 500 : Internal Server Error, the error was could not start rstudio in time.
Could anyone help me with that?

Changing RStudio workign directory

Hi,

Currently Rstudio uses /home/jovyan as the working directory. How would the work directory be changed from the launch of the container to have it be a different directory.

Path to an Ubuntu version of R and RStudio

Hello,

I have issues installing R and RStudio using conda so I installed manually using the sudo apt-get and the downloading RStudio. Can I specify this paths to be used with this?

Edit/config category for icons?

Proposed change

I would like to configure which category rstudio goes in. For example for us it makes sense to put it in the "Other" category rather than "Notebook" because it is not really a notebook.

Alternative options

Sure.

Who would use this feature?

Everyone?

(Optional): Suggest a solution

I have manually set the category: 'Other' in the src and the icon does move but the rstudio logo does not show in the icon. (possible css issue?)

Shiny applications wont load from rstudio

I have recently upgraded from nbrsessionproxy to jupyter-rsession-proxy.
From inside a docker container, I am trying to launch a shiny example from rstudio. It used to work in the previous version.
I am getting the error /p/5339/ not found now. Rstudio works fine.
I think this has something to do with the proxy from rstudio to shiny application.
Any help will be appreciated in resolving this issue

Dockerfile missing something?

I'm really interested in setting up nbrsessionproxy on my JupyterHub/JupyterLab install. I had some troubles getting things going so I dropped back and tried the associated Docker file that is in the repo.

I built the Docker image using: docker build . which seemed to build without error. So I then fired it up with
docker run -p 8888:8888 jupyter/r-notebook

And then I connected to the localhost using the token provided in the terminal message and I was able to connect to the localhost at port 8888, as expected. However I don't see any way to launch R Studio server:

image

I'm a bit unsure of what I should be doing differently or if I'm just overlooking something obvious.

Many thanks.

Kill rsessions when single-user notebook server stops

Hello,

Is there a way to cleanup rsessions when the single-user servers stop running?

It seems like unless I explicitly quit the R session through R Studio, they are left untouched which could result in a large number of orphan sessions.

Let me know if I'm just doing something wrong.

Thanks!

Open multiple Rstudio sessions for a single user from Jupyter

When I'm running Rstudio from a docker container it is straightforward to link a 2nd, 3rd, etc. session for a single user to a different port. If you click the Rstudio icon/launcher a 2nd time now, it disconnects the "old" Rstudio session. Is it possible to automatically assign Rstudio to another port/proxy when starting multiple session for a single user?

Open certain files in RStudio

Hello,

Thanks for all of the work integrating R and RStudio, it is much appreciated. After a gentle prodding by Yuvi, I would like to put in a feature request to allow a "launch binder" button to open rstudio-server and also have 1 or more files (R notebooks or source files especially) open by default within rstudio.

This would be a better user experience so that people don't have to manually open 1 or more specific R notebooks, but instead would have at least the main notebook already open (and ideally allow for 2+ files to be open). Maybe this is already possible?

It seems like this could be implemented as URL arguments and/or as an option specified in a configuration file.

Thanks,
Chris

ERROR R SUICIDE: unable to initialize the JIT

When launching the example container in a Jupyterhub environment we get the following error:

jupyter-adf30e4d811a54255caebaf68d0e1861.1.j71m99qdfki7 | 18 Feb 2019 16:39:53 [rsession-] ERROR R SUICIDE: unable to initialize the JIT
jupyter-adf30e4d811a54255caebaf68d0e1861.1.j71m99qdfki7 | ; LOGGED FROM: void {anonymous}::rSuicide(const string&) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:2488

And a 500 error in the UI saying "could not start rstudio in time".

Any idea what is happening here?

I am using the bleeding-edge jupyter-rsession-proxy. I tried 0.8.0 but then I no longer had the option for rstudio or rshiny.

Exec'ing into the container and running manually yields:
$ rsession --standalone=1 --program-mode=server --log-stderr=1 --session-timeout-minutes=0 --user-identity=jovyan --www-port=41109

18 Feb 2019 17:19:32 [rsession-] ERROR system error 2 (No such file or directory) [path=]; OCCURRED AT: rstudio::core::Error rstudio::r::session::discoverR(rstudio::r::session::RLocations*) /home/ubuntu/rstudio/src/cpp/r/session/RDiscovery.cpp:62; LOGGED FROM: int main(int, char* const*) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:3423

Internal Server Error: `rsession did not start in time`

Hello All,

This package looks like exactly what I need! However, I am having an issue where I get a 500 Internal Server Error when hitting /user/{user}/rstudio that says rsession did not start in time. I have the rstudio-server service running and followed the installation instructions. Unfortunately, I don't know where to go from here. Any help is appreciated.

Thanks.

Adding license (with new language)

Updating (creating) the appropriate license to reflect correct copyright year and attribution to Jupyter community. (Submitting a subsequent PR)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.