Operating System - HP-UX
1752519 Members
5254 Online
108788 Solutions
New Discussion юеВ

Re: Hp-Ux server is hanging after logging in as NIS user

 
lokanath
Occasional Advisor

Hp-Ux server is hanging after logging in as NIS user

HI , As i am new to system adminstration not able find the exact reason for following issue. 1.once login to hp-ux server using telnet as NIS user ,and server is getting hanged after giving any command.So can any one help me out . 2) we are using NIS and NFS servers Thanks in advance, Lokanath

 

P.S. This thread has been moved from Operating Systems >HP-UX >System Administration to HP-UX > networking-HP Forum Moderator

5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: HP-UX server is hanging after logging in as NIS user

What shell are you using?  Does your $HISTFILE point to a local or NFS filesystem?

(If NFS, are the locking demons running?)

 

Does it get to /etc/profile and ~/.profile?

Matti_Kurkela
Honored Contributor

Re: Hp-Ux server is hanging after logging in as NIS user

Can you connect as a local (= non-NIS) user? Can you access the system from the console?

 

This sounds like what happens when the user's PATH environment variable includes directories that are located on a NFS server that is unreachable at the moment.

 

First, you'll need to temporarily restrict PATH to local directories only, so that your session won't hang after each command.

 

These commands are built-in to the standard shell, so they should not cause hangs:

echo $PATH
echo $SHELL

 The first command should display your current PATH setting, the second will identify the command shell used for the account. If the shell is /usr/bin/csh or (some path)/tcsh, you have a C-style shell and you will have to use this command to modify your PATH:

setenv PATH /usr/bin:/usr/ccs/bin:/usr/contrib/bin

 If  your shell is anything else, this command should be used instead:

export PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin

 

The setenv/export command will change your current PATH to a very simple one, which should not include NFS-mounted directories. That should reduce the likelihood of the session hanging.

 

The next step would be to confirm that your NIS works. Run:

ypcat passwd &

 This should output a list of NIS users in /etc/passwd-like format. If the prompt does not appear after the output, just press Enter again. (The "&" suffix causes the command to be run in the background, so it if it hangs, the session will continue. This works with all commands.)

 

If NIS is OK, the problem is probably with NFS. Run "cat /etc/fstab" to identify any permanently-mounted NFS filesystems, then "cat /etc/auto_master" and "ypcat auto.master" to view the automounter master maps. The automouter maps can be used to determine which NFS filesystems to mount automatically when the user accesses them. "Access" includes searching for a command to run, if the filesystem is included in PATH. If one of the automountable filesystems is not accessible and it is referred to in PATH, it might be causing the sort of behavior you're experiencing.

MK
Dennis Handly
Acclaimed Contributor

Re: HP-UX server is hanging after logging in as NIS user

>includes directories that are located on a NFS server that is unreachable at the moment.

 

Don't you typically get messages about "NFS server not responding" too?

lokanath
Occasional Advisor

Re: Hp-Ux server is hanging after logging in as NIS user

Hi Matti_Kurkela , now i am able to login server as NIS user without any issues and also able to excute basic commands like ls,bdf ,clear . Now problem is when we are trying to give some GIT builds making use of another linux server(all GIT setup will be there in linux box)though this HP-ux server those commands are getting hanged.That coomand looks as follows . git; chsetup -c /local/chroot.HPUX -g /local/some-git-build_issue -h -s
Matti_Kurkela
Honored Contributor

Re: Hp-Ux server is hanging after logging in as NIS user

How about commands like "whoami" and "id"? Do they report the correct UID for the user?

 

Create a temporary file in /tmp, then view its ownership and permissions. For example:

touch /tmp/foo
ls -l /tmp/foo

 If that produces normal results, then NIS apparently returns valid data for that user.

The next step is identifying and checking your NFS mounts and automounter maps, if you have them.

If your automounter maps indicate the system will auto-mount some NFS filesystems, test them to make sure the auto-mounted filesystems are usable.

 

Your git commands are not standard HP-UX commands, so I have no idea about which files they might be accessing and what their requirements might be. There is no well-known "standard setup" of git on HP-UX yet. If they are locally-produced custom scripts, then you must read them yourself to find out what exactly they do, and then try and identify what particular command causes the hang. (Or if someone at your site knows more about the scripts, you should ask him/her.)

 

The exact method for debugging a script will depend on which scripting language is used. For POSIX-style shell scripts, it might be useful to add "set -x" near the beginning of the script, so that all subsequent commands will be displayed before they are executed.

 

MK