A message A Jupyter Server is running typically means that the spawner started just a jupyter_server. To give a bit of background, jupyter_server is the backend server that is used for jupyterlab and notebook interfaces. So, what I assume is that your single user environments do not have jupyterlab/notebook or your single user environments are not properly configured and hence, JupyterHub is starting just the backend jupyter_server. That is why you do not see anything except the message A Jupyter Server is running.
So check if your single user environment is properly configured.
Instead of using pre_spawn_hook use Spawner.environment to setup the user env variables. I dont think env variables setup in pre_spawn_hook will be propagated to single user servers. You can use a custom spawner based on SimpleLocalProcessSpawner in config
from jupyterhub.spawner import SimpleLocalProcessSpawner
import os
class MyCustomSpawner(SimpleLocalProcessSpawner):
def get_env(self):
super().get_env()
users_base_path = '/home/jupyteruser/jupyter/users'
username = self.user.name
env['PATH'] = f'{users_base_path}/{username}/bin:{os.environ["PATH"]}'
env['LD_LIBRARY_PATH'] = f'/home/jupyteruser/jupyter/instantclient_19_5'
return env
c.JupyterHub.spawner_class = 'MyCustomSpawner'
Try this approach and let us know.