1751975 Members
4428 Online
108784 Solutions
New Discussion юеВ

Re: root commands hangs

 
subhuti
New Member

root commands hangs

Hi there
I have an old HP-UX 11.11

and I got problem with it yesterday
my users said that they can't access server via ssh

I'm getting this
ssh_exchange_identification: Connection closed by remote host


but I able to login with telnet , and can issue any commands under my user and when I became root I can't run any command
all commands hangs

nothing interesting in the logs:(
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: root commands hangs

>when I became root I can't run any command

How do you become root? su or su -?
subhuti
New Member

Re: root commands hangs

Oh thanks for this reply
I've tried just "su -"

not I become root with "su"
and all good

probably something happens with ~/.profile

Elmar P. Kolkman
Honored Contributor

Re: root commands hangs

When the process table is filled-up or you are out of memory, something like this can happen.

Telnet is lightweight compared to ssh.

Can you run single commands with 'sudo' or 'su root -c'?
For instance:
$ sudo ls

or
$ su root -c "/usr/bin/ls"
Every problem has at least one solution. Only some solutions are harder to find.
Elmar P. Kolkman
Honored Contributor

Re: root commands hangs

Check out /var/spool/mail and your wtmp file.
In the default .profiles, a check is performed to see when you last logged in and if you have new E-mail.
Every problem has at least one solution. Only some solutions are harder to find.
Dennis Handly
Acclaimed Contributor

Re: root commands hangs

>probably something happens with ~/.profile

Yes. You can add "set -x" to trace your execution.
Kapil Jha
Honored Contributor

Re: root commands hangs

can you run top/glance/swapinfo or all the commands are hanging.
If nothing is working from other users as well they probably you may have to reboot.


BR,
Kapil+
I am in this small bowl, I wane see the real world......
subhuti
New Member

Re: root commands hangs

thanks guys
all good with system ( memory, CPU, process table)

root cause of ssh problem probably was in
MaxStartups option
ps -ef | grep ssh shows me 11 processes but
this option has just 10
I've increased it to 20 , send HUP signal to ssh daemon... and now I have not any problems

subhuti
New Member

Re: root commands hangs

found interesting thing

root had in profile this

export PATH=/opt/lib/cobol/bin:$PATH

with this string I can't issue commands

I've fixed this with:

export PATH=$PATH:/opt/lib/cobol/bin
....
but
I have another one string in ~/.profile:
export PATH=/tuxedo/tuxedo8.0/bmrs/lib:$PATH

and I have not any problems with it...

PS
don't know how it worked earlier






subhuti
New Member

Re: root commands hangs

heh
nice, /opt/ located on the external disk (Fiber Channel)
and this disk is unavailable ... (ls /opt/ hangs)