-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using CHP-py with jupyterhb #16
Comments
Hi @SMHari can you provide the steps to reproduce this ?
I am currently using this project for a bunch of environments (Local, Dev, and Prod setups) |
Hey @AbdealiLoKo
|
Hmm, so I tried this, and it seems to work: $ ~/python310/bin/python -m venv venvtest
$ venvtest/bin/pip install jupyterhub configurable-http-proxy jupyter
Successfully installed ... configurable-http-proxy-0.3.0 ... jupyterhub-3.1.0 ... notebook-6.5.2
$ export PATH=venvtest/bin/:$PATH
$ cat jupyterhub_config.py
import os, sys
c.ConfigurableHTTPProxy.command = [os.path.join(sys.prefix, 'bin', 'configurable-http-proxy')]
c.Spawner.cmd = [os.path.join(sys.prefix, 'bin', 'jupyterhub-singleuser')]
$ venvtest/bin/jupyterhub opening localhost:8000 successfully opens and works fine Could you try the same steps ? |
@AbdealiLoKo you mean the notebook is loading fine and can execute the contents in the cell? also would like to understand, what's the purpose of this two configparams.
I'm using a custom implementation of Spawner, a wrapper over KubeSpawner. ConfigurableHTTPProxy.command - I don't see this option in the OSS doc. I just use the options mentioned in the wiki here running proxy separately from the hub |
Yes, I am able to login with my user account, create a folder, create a notebook, run python commands in that notebook Both of the configurations I mentioned are JupyterHub configurations:
The default values just take it from the existing c.ConfigurableHTTPProxy.command = 'configurable-http-proxy'
c.Spawner.cmd = 'jupyterhub-singleuser' I just gave them explicitly to ensure it is being taken from my virtualenv (I have a lot of jupyters and configurable-http-proxy installed locally with varying versions and prefer not to muck around with my PATH) I think it would be helpful to narrow down the problem. |
I tried to go towards your setup with: $ cat jupyterhub_config.py
import os, sys
c.ConfigurableHTTPProxy.should_start = False
c.ConfigurableHTTPProxy.auth_token = 'abc'
c.Spawner.cmd = [os.path.join(sys.prefix, 'bin', 'jupyterhub-singleuser')] And ran the following separately: $ CONFIGPROXY_AUTH_TOKEN=abc venvtest/bin/configurable-http-proxy And that seems to work fine (i.e. able to login, create a notebook, run python) too I am not very experienced with Kubernetes, and looked like it would be complex for me to setup quickly |
I have absolutly the same issue, but it's appear only when I trying to start VS Code via jupyterhub-vscode-proxy. configurable-http-proxy 0.2.3 jupyterhub published to on prem k8s cluster
CONFIGPROXY_AUTH_TOKEN env var passed to proxy container |
➕ Need to backtrack the stack trace to understand whether those scenarios are missing any required handling |
@VitaliyFedorov thanks for the feedback. I have not seen jupyter-vscode-proxy before - I can take a look at it tomorrow to understand what could be the issue. Meanwhile if you're able to provide a minimum reproducible example with jupyter-vscode-proxy which can reproduce your error - that would be very helpful |
So, @VitaliyFedorov I took a quick look at jupyter-vscode-proxy pypi link I have asked a question on the repo: betatim/vscode-binder#37 |
code-server has to be installed on jupyterlab and also following py packages: jupyter-server-proxy and jupyter-vscode-proxy. After that in jupyterlab should appear button with title "VS Code". When you press it a new tab will be open with web version of VS Code. |
I'm using this py CHP with my jupyterhub as an alternative to nodejs CHP
So, whenever, I try to open a notebook, I'm seeing the below exception in proxy logs, which is not the case for the other CHP. As a result, the notebook keeps loading
Originally posted by @SMHari in #11 (comment)
The text was updated successfully, but these errors were encountered: