sdsc-hpc-training-org / reverse-proxy

1 stars 5 forks source link

Doesn't exit when started remotely via ssh #11

Open dimm0 opened 3 years ago

dimm0 commented 3 years ago
[dmishin@portaldev ~]$ ssh login.expanse.sdsc.edu /cm/shared/apps/sdsc/reverse-proxy/start-jupyter -p debug -A sys200 -t 30 -s jupyterlab
Lmod Warning: The system MODULEPATH has changed: please rebuild your saved
collection.

Your notebook is here:
    https://stardust-preachy-subscript.expanse-user-content.sdsc.edu?token=...
If you encounter any issues, please email help@xsede.org and mention the Reverse Proxy Service.
Using ./slurm_expanse/jupyterlab.sh
Your job id is 1323390
You may occasionally run the command 'squeue -j 1323390' to check the status of your job

The script hangs here and doesn't return

(I added stuff from https://github.com/sdsc-hpc-training-org/reverse-proxy/pull/10 to make it runnable remotely)

dimm0 commented 3 years ago

It might be because the script is writing the job output to the current folder, which is now /cm/shared and is not writable for the user.

mkandes commented 3 years ago

Yeah, I thought this might be an issue. The launch scripts do generally assume the user is running them from a HOME directory. Some re-organization may be needed here.

JamesMcDougallJr commented 3 years ago

Perhaps the new "-q" quiet mode should also not write any output to file?

mkandes commented 3 years ago

@JamesMcDougallJr - Maybe. I haven't looked at the internals of how things are setup within the launch scripts for awhile. If you don't need to write to a file, then yes that's probably fine. But if you still need config output to be placed in a user's HOME directory, you can still do that. I think the main issue here is not assuming that the start-jupyter script is run from a user's HOME driectory.

JamesMcDougallJr commented 3 years ago

@mkandes I see. We still have the jupyter config file which is written to ~/.jupyter/rps. I would need access to some root writeable directory in every cluster. Not sure if that's possible.

dimm0 commented 3 years ago

The script is running under a user, and you always have access to user's home folder from it.

I made a "cd" to script folder, but it would be better to save the script folder as a variable and use it to access other files from the script (like loading additional files)

marypthomas commented 3 years ago

I created an issue for solving this. The scripts have the locations of the config and lib files hardcoded as local to the script. We just need to grab the location where the start-jupyter script is located. maybe set RPS_HOME var?

Thanks, Mary mpthomas@ucsd.edumailto:mpthomas@ucsd.edu Wear Masks. Stay Distanced. Stop the Spread. Save Lives.

On Feb 18, 2021, at 8:54 AM, Marty Kandes notifications@github.com<mailto:notifications@github.com> wrote:

Yeah, I thought this might be an issue. The launch scripts do generally assume the user is running them from a HOME directory. Some re-organization may be needed here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/sdsc-hpc-training-org/reverse-proxy/issues/11#issuecomment-781485698, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADMDVOBJ5QGHELLXZTTH2A3S7VA33ANCNFSM4XZNF43Q.

mkandes commented 3 years ago

@dimm0 - How do you plan to manage SSH login for users from portaldev? Will you generate passphraseless SSH keys to login remotely to login.expanse.sdsc.edu and run the start-jupyter command for them? Maybe this is a consideration for the other parts of the portal that do job submission already?

dimm0 commented 3 years ago

It's already using xsede provided certs to login

mkandes commented 3 years ago

@dimm0 - Ah. I see. Using gsissh.