View previous topic :: View next topic |
Author |
Message |
hefe n00b
Joined: 18 Aug 2004 Posts: 58 Location: Germany
|
Posted: Sat Feb 11, 2006 10:31 am Post subject: /etc/init.d/nfs start delays ssh logout? |
|
|
Hi there!
I wonder if anyone else saw this happen. I see this for months over much kernel updates and nfs versions. To reproduce it, just:
* log into a gentoo box
* and su to root
* and run /etc/init.d/nfs start
* logout of su
* logout the normal user
-> watch that this ssh logout is seriously delayed
Hint: if you would skip one of the above steps, you could not reproduce this problem.
Here is like it shows up for me:
Code: | hefe@anfortas ~ $ ssh trevrizent
Last login: Sat Feb 11 10:20:26 2006 from trevrizent
hefe@trevrizent ~ $ su
Password:
trevrizent hefe # /etc/init.d/nfs start
* Starting portmap ... [ ok ]
* Mounting nfsd filesystem in /proc ... [ ok ]
* Starting NFS statd ... [ ok ]
* Exporting NFS directories ... [ ok ]
* Starting NFS daemon ... [ ok ]
* Starting NFS mountd ... [ ok ]
trevrizent hefe # exit
exit
hefe@trevrizent ~ $ exit
logout
|
At this point it hangs for about a few minutes...
Code: |
Connection to trevrizent closed.
hefe@anfortas ~ $
|
The questions are:
* Has anyone else the same problem?
* Is it ssh, is it the nfs script?
Hope someone can help with tips where to go from here... |
|
Back to top |
|
|
m8ryx n00b
Joined: 24 Nov 2004 Posts: 23 Location: Portland, OR, USA
|
Posted: Sat Feb 11, 2006 10:37 pm Post subject: |
|
|
a few questions:
1) does it recur on subsequent logins (with nfs already running)?
2) have you tried a a verbose ssh (ssh -v, or ssh -vv), and what does it say when you logout?
3) is the client gentoo also? Make sure that you're running relatively similar verisions of ssh/sshd on the boxes.
4) is UseDNS enables in your sshd_config?
5) are any relevant directories exported by NFS, including your CWD, /tmp, or your home directory? _________________ An image is worth 2.5*10^3 characters. |
|
Back to top |
|
|
hefe n00b
Joined: 18 Aug 2004 Posts: 58 Location: Germany
|
Posted: Sun Feb 12, 2006 10:15 pm Post subject: |
|
|
answers:
1) it occurs only if you start nfs
2) it happens if there is at least one entry in /etc/exports
3) the logout is delayed if i logout just after the startscript
4) UseDNS is commented out on the server
5) it happens if i export a normal directory. i dont export /home or / or /tmp
Code: |
hefe@anfortas ~ $ ssh -V
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
hefe@anfortas ~ $ ssh -v trevrizent
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /home/hefe/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to trevrizent [172.16.70.1] port 22.
debug1: Connection established.
debug1: identity file /home/hefe/.ssh/identity type -1
debug1: identity file /home/hefe/.ssh/id_rsa type 1
debug1: identity file /home/hefe/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'trevrizent' is known and matches the RSA host key.
debug1: Found key in /home/hefe/.ssh/known_hosts:8
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/hefe/.ssh/identity
debug1: Offering public key: /home/hefe/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering public key: /home/hefe/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
Last login: Sun Feb 12 22:56:54 2006 from anfortas
hefe@trevrizent ~ $ su
Password:
trevrizent hefe # /etc/init.d/nfs stop
* Stopping NFS mountd ... [ ok ]
* Stopping NFS daemon ... [ ok ]
* Stopping NFS statd ... [ ok ]
trevrizent hefe # cat /etc/exports
# /etc/exports: NFS file systems being exported. See exports(5).
#/mnt/mp3store 172.16.70.4(rw,async,mp,no_root_squash)
#/mnt/oldmp3s 172.16.70.4(rw,async,mp)
#/mnt/ftp 172.16.70.4(rw,async,mp)
/mnt/halde 172.16.70.4(rw,async,mp,no_root_squash)
#/mnt/backup 172.16.70.4(rw,async,mp,no_root_squash)
#/mnt/halde 172.16.70.10(rw,async,mp)
#/mnt/winD 172.16.70.4(rw,async,mp)
#/mnt/winC 172.16.70.4(rw,async,mp)
trevrizent hefe # cat /etc/ssh/sshd_config | grep DNS
#UseDNS yes
trevrizent hefe # ssh -V
OpenSSH_4.2p1, OpenSSL 0.9.7e 25 Oct 2004
trevrizent hefe # exit
hefe@trevrizent ~ $ debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logout
debug1: channel 0: free: client-session, nchannels 1
Connection to trevrizent closed.
debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 41.9 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.8
debug1: Exit status 0
hefe@anfortas ~ $
|
In the above example the logout is not delayed (because i did /etc/init.d/nfs stop)
Code: |
hefe@anfortas ~ $ ssh -v trevrizent
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /home/hefe/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to trevrizent [172.16.70.1] port 22.
debug1: Connection established.
debug1: identity file /home/hefe/.ssh/identity type -1
debug1: identity file /home/hefe/.ssh/id_rsa type 1
debug1: identity file /home/hefe/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'trevrizent' is known and matches the RSA host key.
debug1: Found key in /home/hefe/.ssh/known_hosts:8
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/hefe/.ssh/identity
debug1: Offering public key: /home/hefe/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering public key: /home/hefe/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
Last login: Sun Feb 12 23:00:11 2006 from anfortas
hefe@trevrizent ~ $ su
Password:
trevrizent hefe # /etc/init.d/nfs stop
* ERROR: "nfs" has not yet been started.
trevrizent hefe # /etc/init.d/nfs start
* Starting NFS statd ... [ ok ]
* Exporting NFS directories ... [ ok ]
* Starting NFS daemon ... [ ok ]
* Starting NFS mountd ... [ ok ]
trevrizent hefe # exit
hefe@trevrizent ~ $ debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logout
debug1: channel 0: free: client-session, nchannels 1
Connection to trevrizent closed.
debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 45.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.8
debug1: Exit status 0
hefe@anfortas ~ $
|
Here the logout hangs.
In the above examples i used ctrl+D to logout, but the delay occurs aswell if i use exit. If i wait or do something else before logout the delay does not occur. And it does not occur if i comment out all entries in /etc/exports.
Both boxes are gentoo and the thing occurs vice versa. |
|
Back to top |
|
|
m8ryx n00b
Joined: 24 Nov 2004 Posts: 23 Location: Portland, OR, USA
|
Posted: Sun Feb 26, 2006 2:51 am Post subject: |
|
|
well, I'm still not sure what's causing the hang (I can reproduce it starting or stopping the nfs server). However, you can workaround the problem somewhat using the ssh escape sequence '~.' (tilde then period). _________________ An image is worth 2.5*10^3 characters. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|