aws-samples / sagemaker-studio-lifecycle-config-examples

MIT No Attribution
78 stars 51 forks source link

Getting error "nohup: failed to run command 'supervisorctl': No such file or directory" #8

Closed mailjunze closed 2 years ago

mailjunze commented 2 years ago

nohup: failed to run command 'supervisorctl': No such file or directory while deploying install-autoshutdown-server-extension

Also, this failed "cd /home/sagemaker-user" as the script was running in root directory. No such sagemaker user !

Using the default data science image

https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples/blob/main/scripts/install-autoshutdown-server-extension/on-jupyter-server-start.sh

ZhangHan commented 2 years ago

This script is used for restarting JupyterServer as mentioned in the script name and comment. Kernel Gateway apps (data science image for example) are not launched through supervisorctl which is why you got that error.

mailjunze commented 2 years ago

Thanks for your input. How can we restart Kernel Gateway apps ?

mailjunze commented 2 years ago

sed -i -e 's/\r$//' scriptname.sh

durgasury commented 2 years ago

You can shut down and restart the kernel gateway apps as specified in the documentation.