Open qTipTip opened 4 years ago
Hi @qTipTip, thank you for providing the detailed description. There are two issues:
The language servers usually support a debug mode, but we have no way to trigger it from the UI - certainly a thing to think about. I would be curious to know:
jupyter lab
from the command line, does it print out anything which could hint as to why is the server connection being lost?As to the error code 1006: https://stackoverflow.com/a/19305172/6646912
Would you be able to check if it also happens with a different browser (e.g. Chromium or Firefox)?
Hi @krassowski !
Thank you for looking into this! To answer some of your questions.
I am using jupyter-hub from a Kubernetes deploment (Zero to jupyterhub). Hence, the environment is built from a docker-image. I'll see if I can launch this docker image locally. The rest of the JupyterHub is responsive and functions as expected.
It happens usually within 10-15 seconds of the notebook starting. Up until then the functionality is as expected.
(See 1.) No, JupyterHub is deployed using Kubernetes, so not the same computer for both browser and jupyterhub. Maybe this has something to do with it?
I can confirm the issue happens with Brave, Chrome and Safari.
Let me know if there is anything else I can provide in terms of info.
Here is the packages installed in Docker.
FROM jupyter/tensorflow-notebook:04f7f60d34a6 # https://github.com/timkpaine/jupyterlab_templates RUN pip install jupyterlab_templates RUN jupyter labextension install jupyterlab_templates --no-build RUN jupyter serverextension enable --py jupyterlab_templates # https://github.com/krassowski/jupyterlab-lsp RUN pip install --pre jupyter-lsp RUN jupyter labextension install @krassowski/jupyterlab-lsp --no-build RUN pip install python-language-server[all] # https://github.com/jtpio/jupyterlab-python-file RUN jupyter labextension install jupyterlab-python-file --no-build # https://github.com/quigleyj97/jupyterlab-spreadsheet RUN jupyter labextension install jupyterlab-spreadsheet --no-build # https://github.com/jtpio/jupyterlab-system-monitor RUN pip install nbresuse==0.3.3 RUN jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor --no-build # https://github.com/matplotlib/ipympl RUN pip install ipympl RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib --no-build # https://github.com/jupyterhub/nbgitpuller RUN pip install nbgitpuller # https://github.com/plotly/jupyter-dash RUN pip install jupyter-dash # https://stackoverflow.com/questions/54936125/plotly-gives-an-empty-field-as-output-in-jupyter-lab RUN jupyter labextension install jupyterlab-plotly --no-build # https://github.com/jupyterhub/jupyter-server-proxy RUN pip install jupyter-server-proxy RUN jupyter labextension install @jupyterlab/server-proxy --no-build RUN jupyter lab build
Thank you for the update - this helps a lot. I guess that it might be related to another JupyterHub-specific issue, #353.
Cheers!
In which respect is it related to #353? It seems like that issue is related to users sharing a root-directory - in my case the users are each spawned into their own sandboxed environment, with the exception of a mounted shared folder.
Tell me if I can assist in any way :)
Same problem, too. @qTipTip , have you solved this problem? I also ran JupyterLab and jupyterlab-lsp in the docker environment similar to you.
@krassowski In my case, the Jupyter workspace is mounted on the server running JupyterLab via NFS to provide home to users. Could this be the cause?
My issue dispappeared with @krassowski/jupyterlab-lsp@2.1.2! Thanks!
It seems that this problem is not fully solved after updating to jupyterlab-lsp@2.1.2. I have exactly the same problem when using jupyterlab-lsp in jupyterhub. The connection was lost after about 30 seconds no typing and didn't reconnect automatically. Here is my information :
Same issue, jupyterhub spawing jupyter labs, each user with their own home folder.
Happens sporadically for multiple users; can see LSP trying to reconnect after error 1006, but appears to give up after 6 attempts. LSP continues to run, but no updates to detected errors.
Refreshing browser reconnects without issue.
In some cases, this happens for specific notebooks / files - usually for all. Newly opened files show LSP: Connect timed out for 5(python)
I believe that the issue behind this is now fixed. In jupyter-lsp 1.1 we enabled pings on websocket to maintain the connection (https://github.com/krassowski/jupyterlab-lsp/pull/459) and in jupyterlab-lsp 3.1 we increased the timeouts for connection to the total of 5 minutes and 30 seconds (https://github.com/krassowski/jupyterlab-lsp/pull/479). I am reluctant to close this without your feedback as I have never experienced this issue, but I would be very keen to understand if the mentioned changes helped you.
May I suggest that you try with the latest version (jupyterlab-lsp 3.3.1 and jupyter-lsp 1.1.3 at the moment)?
Hey @krassowski!
That is great news! I am currently working on migrating our JupyterHub deployment to 1.3 with JLab 3.0. Will let you know!
Hi!
First of all, thanks for an incredibly nice plugin. I am having some issues with the stability of the plugin, and was hoping you could help me debug it further. I'll try to describe my issues as detailed as possible.
Current Behaviour
Opening a new notebook
When initially opening a new notebook, with a new kernel, everything seems to initiialize properly. I observe the following messages in the developer console:
At this point in time, the autocomplete seems to be functioning properly, and any modifications to the cell yields things along these lines:
Losing Connection
Without forewarning, the LSP-plugin loses connection, with the following messages:
Failing to reconnect
Finally, the plugin gets stuck in this loop of the two following states:
Expected behavior
I expect the LSP-plugin to reconnect, and resume working.
Context
Required: installed server extensions
Required: installed lab extensions
Troubleshoot Output