In my ondemand installation i keep getting this error. I tried sourcing the ~/.bashrc in the script wrapper under batch_connect and no go. Where else is the HOME environment set in the setup that i could be missing?
Setting VNC password…
Error: no HOME environment variable
Starting VNC server…
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
vncserver: The HOME environment variable is not set.
Cleaning up…
vncserver: The HOME environment variable is not set.
I wonder if you can just force HOME to be set? Does your ~/.bashrc load /etc/profile? I think maybe you need to source the global files that then source your own. Maybe HOME is being set in those global etc files.
Have a separate issue now that’s making is hard for me to test. Every time i change my config in clusters.d it doesn’t seem to change on the app even after restarting the service. Is there a way to tell it to explicitly reload the config I updated in clusters.d?
Ok gotcha. Seems I have another separate issue and can’t see where this environment is being set. It’s not in /etc/ood/config/hook.env but getting this when i reboot the pun for my username:
environment name contains a equal : {:OOD_JOB_NAME_ILLEGAL_CHARS=>"/"}
Is there a system cache for it i need to delete? I deleted all the tmp files for the pun.
Can you send a screen shot? My suspicion is that your scheduler is complaining about environment variables when we submit
/etc/ood/config/hook.env only applies to the environment of the hook itself. A PUN itself on the OnDemand instance is started with very little in the way of an environment, but that’s beside the point anyhow. Your issue seems to be on the compute node during the jobs execution. This has nothing to do with the environment in the PUN, your scheduler is responsible for setting up the job’s execution environment.
Very early when i was setting this up, i put OOD_JOB_NAME_ILLEGAL_CHARS="/" in the /etc/ood/config/hook.env file but removed when i realized it didn’t need to be there. Now the only place that value is set is in /etc/ood/config/nginx_stage.yml. So can’t see where it’s coming from. When it generates the config for the pun /var/lib/ondemand-nginx/config/puns/user.conf
It reappears in the file every time i bounce the pun, not sure how it keeps getting there:
Well progress. Turned out $HOME wasn’t in the regular /etc/profile and since we did a lot of custom modifications for our environment i had to make a second file /etc/profile-portal that gets sourced for batch_connect in the script wrapper: