ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
200 stars 38 forks source link

Keep getting HTTP 500 Internal Server Error #99

Closed cmosguy closed 2 years ago

cmosguy commented 2 years ago

I keep getting an internal server error:

Build failed: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for kleinada:dash-test may contain details.)

Event log Builder requested Starting builder Starting up final server for Dashboard, after build Spawner progress: Server requested Spawner progress: Spawning server... Build failed: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for username:dash-test may contain details.)

Can someone please advise how to debug this? I followed the documentation and configured /etc/jupyterhub/jupyterhub_config.py:

c.JupyterHub.spawner_class = 'cdsdashboards.hubextension.spawners.VariableLocalProcessSpawner'
c.JupyterHub.allow_named_servers = True

c.CDSDashboardsConfig.builder_class = 'cdsdashboards.builder.processbuilder.ProcessBuilder'

from cdsdashboards.app import CDS_TEMPLATE_PATHS
from cdsdashboards.hubextension import cds_extra_handlers

c.JupyterHub.template_paths = CDS_TEMPLATE_PATHS
c.JupyterHub.extra_handlers = cds_extra_handlers
cmosguy commented 2 years ago

@danlester i was able to resolve my issue by doing :

pip install jhsingle-native-proxy

Why is this not a dependency that is installed with this pacakage?

danlester commented 2 years ago

Thanks for letting us know how you solved this.

The dependency is in the package here.

But it would only be installed through pip install cdsdashboards[user] which is the recommended line to use for the user environment. The hub environment only needs pip install cdsdashboards.

cmosguy commented 2 years ago

@danlester Thanks for the explanation. I think I do not understand what the difference between a user environment is and the hub environment is in this case. If I am configuring and installing the cdsdashboards is this not by default a hub environment? I guess I am still learning here what the differences are 😀

danlester commented 2 years ago

JupyterHub itself (i.e. the website you see when you first login, and the auth and spawner components) happens to run mostly in Python, and that is within the hub environment.

When you click 'Start Server' as a user in JupyterHub, the spawners will start a JupyterLab session. JupyterLab also happens to be written in Python (in part). Communication between JupyterHub and JupyterLab uses HTTP, and these two items are completely separate processes. The JupyterLab component is running in the 'user' Python environment.

Of course, the JupyterHub and JupyerLab components may have different dependencies, so you don't need everything in both environments.