Hi,
I am trying to deploy sshspawner in my jupyter hub installation.
I have two servers where one acts as juputerhub and the other is where when the users login, the notebook servers are spanned up.
For authorisation and authentication, we use OAuth and it working fine without any issues.
The problem is:
When a user logs in, he is authenticated and authorised correctly. And a notebook server is spanned up in the remote machine. but the hub seems to be killing it (or tries to kill it). And eventually the user is shown with an error page (in edge it is: the page is not working at the moment).
By the way, I give the spawner command which is a shell script that is a custom one( c.Spawner.cmd = ‘/folder1/folder2/abc.sh‘ ).
I store this script in the remote machine under the given directories as well →folder1/folder2.
Inside this script, I initialize and export the necessary environment variables like: JYPYTERHUB_API_URL, JYPYTERHUB_ACTIVITY_URL, JUPYTERHUB_SERVICE_URL).
I have a python virtual environment in the remote machine. The virtual environment has jupyterhub installed. Post exporting the variables, I activate the virtual environment and the finally invoke the command ‘jupyterhub-singleuser‘.
The skeleton is:
#!bin/bash
export JYPYTERHUB_API_URL=’somevalue’
export JYPYTERHUB_ACTIVITY_URL=’’somevalue’
export JUPYTERHUB_SERVICE_URL=’somevalue’
source bin/activate command goes here…
jupyterhub-singleuser –port 4564 –ip 0.0.0.0
When I examined the log (of the hub server), It has the message of user logging in; his OAuth tokens are generated and the same is recorded.
And then it invokes the command kill -s 0 < /dev/null returned — — 0
Polling returned True ←- this a message logged in the hub log as well)
The remote host has two processes running. One belongs to the shell script ‘'abc.sh’’ and the other for jupyterhub-singleuser command.
What the hub tries to kill is of ‘abc.sh‘ process.
I make sure that the hub server is reachable from the host by invoking curl command (curl http://:8081/hub/api (the same ip what I give in the ENV variable) and it is working
So, I am not sure what is happening here. The command that give (under c.spawner.cmd), should it not have any other logic ? That shell script should always be ‘jupyterhub-singleuser‘ ?
Could someone please help / let me know if additional information is needed.
Thanks in advance.