I am sure it is something simple I am missing but been racking my head around “Missing Home Directory” error we are getting. We are new to ondemand and I had a build working before I left for vacation last week. When I came back this week and tried to log in I am getting…
" Home directory not found. Your home directory appears to be missing. The home directory mount may be unavailable, or your home directory may need to still be created. Please contact support for help and attempt to restart your web server by clicking below when the problem has been fixed."
I verified the home directory is mounted and have restarted services. I don’t see any errors in the logs. What am I missing?
Sounds like maybe your $HOME isn’t bound to your account. Here are the locations we’re looking for it. More specifically we’re using the ruby etc module to do it.
Locally it’s here
[jeff@localhost misc]$ grep jeff /etc/passwd
jeff:x:1000:1000:Jeff Ohrstrom:/home/jeff:/bin/bash
In LDAP I can find it here.
[johrstrom@server ~]$ ldapsearch -x cn=johrstrom | grep home
homeDirectory: /users/PZS0714/johrstrom
Thanks John! We connect to Active Directory but we override it with sssd settings since the value in Active Directory does not match our system. We do this with “override_homedir = /users/%u” option. It is working fine on the command line for users just not through ondemand. Should that work?
Hacking the file is just fine for now. Thank you! I am not sure what changed as this did work two weeks in testing but we did reboot since then so probably some config was reloaded. We are using CAS too if that makes any difference but I do not think it does?
First I’m going to say I would no longer advise doing this. After spending a couple of hours on this I can get somethings to work and somethings not. The HOME environment variable does not seem to stick, I don’t know how to set it and keep it set forever. I can set it, but sure enough, it comes back to the original, so I’m not sure how to persist it.
I’d implore you instead to correct your LDAP. Indeed I don’t know how far we’ll get on the Github issue I’ve created given the pervasive nature of this variable.
Here are the changes you can make in these commits. I would first back up every file that you’re going to modify. Note this is on my fork, not the official repo.
I would copy the rb files from the Github branch source to the destinations above. Then manually add the config entry to the yml (you don’t need the comments).
Again, this is going to fail a whole bunch of areas where the home is just not set correctly. Sometimes it may just be a pain to navigate back to somewhere else or sometimes it may cause failure, but in either case your customers are not going to be very happy.
Thanks again for the help. Unfortunately, I cannot update Active Directory field with the home directory. We are mandated to use the Universities Central AD service for authentication and since numerous groups utilize AD, I can’t change the home directory location as it would affect other systems. I like the options mentioned in the support ticket you opened. Any chance those would be implemented?
Lastly, is there some debug mode I can turn on to see what home directory it actually thinks the user has set? I want to be sure it is trying to pull it from Active Directory.
Just to give you a quicker/easier change, I’ve found I can get the same results as that branch with this approach.
Just create an /etc/ood/profile file and override your HOME variable. No need to modify any source files. This will have the same affect and it is much simpler and easier to maintain.
@jeff.ohrstrom Thanks! However, this did not fix my issue. I almost wonder if there is some other problem I am hitting? As the command @efranz sent me shows all the possible home directory locations being returned correctly and the /etc/ood/profile update did not seem to fix the issue. Is there a way to trace what is going on with OOD when the page is loading?
I have an update for you that may work now. I’ve figured out it was Passenger that wasn’t passing $HOME down to it’s sub processes’ and found the option to pass it.
Copy all the files changed in these commits. to these locations (backing up the original files as you go!!!)
Sorry, that file path given was way off. It’s /opt/ood/nginx_stage/templates/pun.conf.erb is correct path. It should already exist.
It’s not ood_portal.yml you need to add it it it’s nginx_stage.yml.
Note that after you replace everything you’ll probably have to bounce httpd24 and your own PUN web server. That could be all you need though I’d double check the file list just to be sure.
Your ENV output there is good! But the first and initial hurdle seems to be this Etc business.
No problem. So that error is gone away not but unfortunately back to:
Home directory not found
Your home directory appears to be missing. The home directory mount may be unavailable, or your home directory may need to still be created. Please contact support for help and attempt to restart your web server by clicking below when the problem has been fixed.
Are you sure when you checked out that git repo you switched to that branch? As a sanity check you can do a quick diff on one of the files you swapped and backed up.
git clone https://github.com/johrstrom/ondemand.git
cd ondemand
git checkout override-home-dir
That is a bummer. I’m able to replicate the issue and the fix locally, so there must be something more to this. I cannot replicate LDAP locally so I must be missing something there.
Here’s where you can circumvent showing that page. That was put in as a sort of safety measure because who knows what sort of side affects a missing home directory may have.