Closed mattpollock closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Thanks for the report! Are you able to test with the master branch? It contains a different strategy for parsing the upstream location.
I tried by adding
git+https://github.com/jupyterhub/jupyter-rsession-proxy
to my requirements.txt
file. My Dockerfile uses
RUN python3 -m pip install -r /tmp/requirements.txt
Unfortunately this did not resolve the issue. I'm using rocker/binder:4.3.0
as a base image. Please let me know if I'm installing the rsession-proxy correctly.
Thanks!
Okay, thanks for testing. I'll try to reproduce on a local hub with -
in the hostname.
@mattpollock I've tested this on a couple of different hubs, each with -
in the first element of the hostname, but unfortunately cannot reproduce. I've tried it on kubernetes (z2jh) and on HPC (batchspawner, configurable-http-proxy + nginx reverse proxy).
Do you happen to use a reverse proxy in front of your hub? Are you able to share its configuration?
Sorry for the delayed response. Thanks for digging into this. We're using a kubernettes spawner with the configurable-http-proxy. No nginx so far as I can tell.
Okay, interesting. We've got it deployed on several z2jh hubs and have not been able to reproduce. Our pattern is foo.domainname and foo-staging.domainname and we don't see this issue on any of our -staging hubs. On a couple of those hubs we're using rocker/geospatial:4.2.2
as the base image. I can try to see if it is reproducible with newer versions, and perhaps with binder.
I wasn't able to reproduce with an image based on rocker/geospatial:4.3.1
. We don't use rocker/binder
because it doesn't pin jupyter and friends. We basically try to re-use the same jupyter stack (packages and versions) on all the hubs on our k8s cluster. That being said, I'll see if I can deploy rocker/binder
on a development hub.
Are your container manifests (Dockerfile, repo2docker, etc.) viewable in a public repo somewhere?
I tried deploying rocker/binder:4.3.0
on mybinder.org, and it worked, but the hostname was notebooks.gesis.org. (no dashes)
Interesting. I was using binder because of the jupyter integration. My dockerfile is inside a private org, so I can't share those. However maybe I can solve the problem by moving my base image to rocker/geospatial
. Do you have any examples you can point me to for how you extend that to work with jupyter? All I'm doing right now is installing the following via pip
jupyterlab==3.3.2
jupyterhub==3.1.1
jupyterlab_widgets
ipywidgets
git+https://github.com/jupyterhub/jupyter-rsession-proxy
Here is one image that adds jupyter to geospatial, https://github.com/berkeley-dsep-infra/datahub/blob/staging/deployments/stat20/image/Dockerfile.
I would think that if you're using the binder image as the base and also installing your list of pinned packages, that should be sufficient. My concern was that binder doesn't pin j-r-p or jupyterhub.
If version shuffling doesn't address the issue, then you might have to install a forked version where you add debugging to rewrite_netloc
. That is the function that rewrites responses which is where I'd expect any accidental mangling to be happening.
Thanks Ryan, this is extremely helpful. I'll close this now and re-open if I it any other snags.
Bug description
See this discourse thread for context. The gist is that a url like
something.mycompany.com
will work fine. Butsomething-else.mycomany.com
will drop the-else
when redirecting to/rstudio/auth-sign-in
.In some cases (including mine) the dash is long standing and removing it would be difficult for users and other applications.