Operating System - HP-UX
1819803 Members
2957 Online
109607 Solutions
New Discussion юеВ

Re: ls command hangs during telnet only

 
Gerald Taylor
Frequent Advisor

ls command hangs during telnet only

I have an interesting problem. I have telnet and ssh running on the system when I telnet to the system I can log in successfully but the first time I run 'ls' the command hangs. If I use ssh to the system the same directory comes back perfectly. I don't see any errors in syslog and I have bounced telnetd and inetd services. Any suggestions?

Gerald
18 REPLIES 18
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

I apoligize I have discovered that it is not limited to the ls command 'bdf' and 'who' also hang. I am suspecting a problem with the telnet daemon.
Olivier Drouin
Trusted Contributor

Re: ls command hangs during telnet only

or your terminal, what are you using ?
Elena Leontieva
Esteemed Contributor

Re: ls command hangs during telnet only

Elmar P. Kolkman
Honored Contributor

Re: ls command hangs during telnet only

Also check how ls is called. Perhaps the ssh session or the telnet session uses aliases for ls... Or different paths. You can find out by running:
which ls
You could also force both sessions to run the same command, by typing:
/bin/ls
in both sessions.

Are you using pipes or things like that, or are you just running ls straight to your session?

Have you tried to redirect the output of the commands to a file?

Every problem has at least one solution. Only some solutions are harder to find.
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

I am able to ssh (secure shell) into the system and the commands return successfully. A bdf shows no file systems are full. TERM is set to vt220 using CRT or secure CRT.

Gerald
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

ls > temp.out

is successful. Both sessions use /usr/bin/ls. I am unsure why 'ls > temp.out' works but just using 'ls' hangs. Does this mean my terminal settings are off?

Gerald
Elmar P. Kolkman
Honored Contributor

Re: ls command hangs during telnet only

Have you looked in the directory?
You could try:
ls | cat -tv | more
Look for things like ^Q, ^S or other escaped control characters.

Sometimes special characters might hang your system, for instance -Q and -S are stop and start handshake characters. In output they might halt your output, untill the other side of the connection sends the start byte again.
Every problem has at least one solution. Only some solutions are harder to find.
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

ls | cat -tv | more

works fine but I do not see any special characters in the directories. I am able to cd into different directories but the hang occurs on all directories.

Gerald
Bill Hassell
Honored Contributor

Re: ls command hangs during telnet only

Since bdf a well as ls hangs, I would strongly suspect NFS problems. Are you using NFS and if so, are any of them dead?


Bill Hassell, sysadmin
T G Manikandan
Honored Contributor

Re: ls command hangs during telnet only

Check two things

1.check for NFS mounts
2.move out the initialization files respective to your shell .profile .login .cshrc files and then try again.It could have some terminal settings.

Is that specific to only one user or all users


Steven E. Protter
Exalted Contributor

Re: ls command hangs during telnet only

NFS hang is likely the cause here, though it should show up on ssh as well.

Another possible cause is some kind of issue with a missing disk. If course this should show up in syslog, but if it went dead fast say right before you cleared syslog you might miss it.

Something to look in, possibl missing disk.

NFS or network is more likely.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Elmar P. Kolkman
Honored Contributor

Re: ls command hangs during telnet only

You might try the default windows telnet client and set your TERM variable to vt100. That helps to rule out it's a client/terminal emulator issue.
Every problem has at least one solution. Only some solutions are harder to find.
Balakumar M
Frequent Advisor

Re: ls command hangs during telnet only

Hi,
The most possible cause which makes "ls" to hang are,
1) /tmp or /var file system full
2) NFS mount point problem
3) linked file problem in the respective directory..

Best regards,
Bala
Life is a continues learning process
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

Thanks for the responses I have tried all of the above and the problem still exist. Still open to suggestions. I should not that the bdf hangs but it is not limited to bdf command. Also all the commands work if we redirect them to a file. example:
bdf > bdf.out

will work but
bdf

will hang, also if I ftp to another system and try 'ls' this will hang also. Makes me think this is a communication issue I just don't know the fix.

Gerald
Sanjay Kumar Suri
Honored Contributor

Re: ls command hangs during telnet only

Dear Gerald

As I understand output to terminal is failing whereas output to a file is working.

Check if terminal device files are correctly defined.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

We are still having the problem but we have found the commands work from the "lan" and fail when used over the "wan" Currently we have a strong suspicion that the frame relay is causing problems. Perhaps there is a network guru that has seen something like this before?

Gerald
Chris Hulihan
Advisor

Re: ls command hangs during telnet only

Did you check your terminal's "enter" key setting (depending on which terminal program you're using)? Or did you try a different terminal program to see if it does the same thing? The problem may not be on the system that you're running commands are, it could just be the telnet program itself.
Gerald Taylor
Frequent Advisor

Re: ls command hangs during telnet only

We have fixed the problem, it was the WAN connection between the sites that caused the problem. Thanks everyone for all your help.

Gerald