HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

root commands hangs

 
subhuti
Occasional Visitor

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

Re: root commands hangs

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

How do you become root? su or su -?
subhuti
Occasional Visitor

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.

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
Occasional Visitor

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
Occasional Visitor

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
Occasional Visitor

Re: root commands hangs

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

Viktor Balogh
Honored Contributor

Re: root commands hangs

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

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

it explains your problems with hanging commands: according to the old PATH variable, /opt/lib/cobol/bin was searched first at every command...
****
Unix operates with beer.