LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   nfs-krb mounted home folder - Client hangs at login (http://www.linuxquestions.org/questions/linux-server-73/nfs-krb-mounted-home-folder-client-hangs-at-login-903165/)

unehed 09-15-2011 09:42 AM

nfs-krb mounted home folder - Client hangs at login
 
I'm sysadmin at a school which is running Ubuntu 10.04 on all of our clients and our server. We're using Kerberos for authentication and NFS to mount our users home directories.

My problem is that sometimes the login just stops, showing only the default wallpaper. Checking with top I found that rpc.gssd is constantly using around 20% of the CPU and gdm-session-worker about 15% when this error occurs. If I restart the computer everything works fine for a while and then the problem comes back again.

While troubleshooting the issue I have gathered the following information:

Logging in from a virtual console also hangs. After a while the message "gdm-session-worker blocked for more than 120 seconds" appears.

Logging in as root (which works) and then typing login username hangs. su username also hangs.

su username -s /bin/sh on the other hand does not hang. It gives me a prompt. I can ls the files in my home directory but the login hangs if i try to cat a file och touch a file. Or if i cat something random that doesn't exist, then it also hangs.

The problem is hard to troubleshoot since I haven't found any way to reproduce it. I just keep getting reports that people can't login. I've just been "lucky" a few times to stumble upon the issue myself.

At first I thought the problem was Kerberos related but Kerberos seems to be working fine. The clients get their tickets and they do renew as they're supposed to.

So I'm just throwing this out here hoping someone has an idea of where to go next. :)

T3RM1NVT0R 09-16-2011 05:56 PM

@ Reply
 
Hi there,

Two suggestions that I can think of are:

1. You can use autofs with existing environment so that connection resets if client system's are not using the share (home directory) for a particular period of time.

2. Share home directories Samba+LDAP.

unehed 09-20-2011 02:30 AM

Quote:

Originally Posted by T3RM1NVT0R (Post 4473959)
Hi there,

Two suggestions that I can think of are:

1. You can use autofs with existing environment so that connection resets if client system's are not using the share (home directory) for a particular period of time.

2. Share home directories Samba+LDAP.

Thanks!

I'm trying the autofs approach now. So far it's working. I'll have too wait a bit to be sure though.

T3RM1NVT0R 09-20-2011 03:17 PM

@ Reply
 
Great!!!

Let us know the results for sure :-)

unehed 10-07-2011 07:16 AM

Okay guys, sorry for the delay.

These are my findings so far:

Using autofs reduced the frequency of lockups, however the problem still occured. I have since found a little dirty hack workaround that seems to work.

What I've done is add these lines to the file /etc/gdm/PostLogin/Default

Code:

su $USER -c "while [ ! -f $HOME/.bashrc ];
        do sleep 1;
        echo $USER: `date` >> /var/log/loginloop.log;
done"

So basically gdm now waits for the home folder to become available before it tries to login. It also logs whenever the problem occurs so I can keep track of its frequency. Anyway this workaround "fixes" the problem for me at the time being. It'll be interesting though to see if the problem still occurs when we start testing the next LTS.


All times are GMT -5. The time now is 03:14 PM.