Operating System - HP-UX
1820787 Members
3788 Online
109627 Solutions
New Discussion юеВ

Re: Cannot telnet or rlogin, remsh works

 
SOLVED
Go to solution
Kevin Liquori_1
Regular Advisor

Cannot telnet or rlogin, remsh works

I have a problem on one of my production servers that occurs once every few months. The symptom is that I cannot rlogin or telnet to the server nor can I get a login prompt on the console. Remsh, however, works. The only solution I've found is a reboot. We haven't changed anything on the server or network lately. Has anyone seen anything like this before?

Thanks...Kevin
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Cannot telnet or rlogin, remsh works

On the console:

tail -f /var/adm/syslog/syslog.log


Then from somewhere else:

log in.

You may see very important information.

Shot in the dark:

inetd -c

See if that clears it up.

How many psuedo terminals do you have set up? The default is 60. Thats was too low for us.

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
Massimo Bianchi
Honored Contributor

Re: Cannot telnet or rlogin, remsh works

Thinking:they use different kind of pty/tty.

What are the values for these parameters in the kernel ? Are they the default? Maybe some users leave many session open and you get out of pty/tty.

Increasing them should do no harm.

Massimo



Massimo Bianchi
Honored Contributor

Re: Cannot telnet or rlogin, remsh works

Look at this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x04206619542c3a44b7f4c73d530f629f,00.html

I usually create an abundance of all of them. nstrtel, npty & nstrpty parameters set at 1024. Here's how to create the devices. pts are created from the last command.
# cd /dev
# insf ???d pty ???s 1024 ???e ???v
# insf ???d ptm ???s 1024 ???e ???v
# insf -d telm ???s 1024 ???e ???v
# insf -d tels ???s 1024 ???e -v


There are actually three different types of pty device on 11.00 and beyond.

classic pty - man pty
used by hpterm, script, and ied
limited by npty kernel tunable

stream pty - man ptm, man pts
used by dtterm, rlogin, and gnome-terminal
limited by nstrpty kernel tunable

telnet pty - man telm, man tels
used by telnet
limited by nstrtel kernel tunable

Massimo
Chris Wilshaw
Honored Contributor

Re: Cannot telnet or rlogin, remsh works

Do you get any errors when you try telnet/rlogin?

As Steven said, inetd -c can re-read the config file for inetd processes (telnetd, rlogind remshd etc), although this wouldn't affect the console, which normally uses getty to generate a login. An inetd problem would also probably prevent your remsh command from connecting.

Now when you say that remsh works, do you mean that you are using remsh to open up a session that you can interact with,

remsh machine

or executing a single command on the remote server,

remsh machine command

If the latter, it points more towards a problem with your tty's, as that form of the remsh command doesn't use one.
Kevin Liquori_1
Regular Advisor

Re: Cannot telnet or rlogin, remsh works

Our relevant kernel parameters on that server are:
nstrpty: 120
nstrtel: 60
nstrpty: 120

I cat'd syslog while the problem was occurring with a remsh and didn't see any errors. I didn't try inetd -c at the time, but that's a very good idea. telnet and rlogin attempts produced no errors, the commands just hung indefinitely. In the past when we've run out of tty's (I once had a Xerox print daemon eat them all) I thought I saw an error either in syslog or on the console. I can't remember.

I was running:
remsh machine command
which worked fine. I didn't think of running:
remsh machine


Also, can anyone think of a way to produce a monitoring script that would test for such behavior? I already have one that runs a
"remsh machine command" - which obviously didn't produce any errors in this instance. Since a telnet or rlogin is normally interactive I can't see how to do this with a ksh script.

Thanks
Seth Parker
Trusted Contributor

Re: Cannot telnet or rlogin, remsh works

Kevin,

I'm just throwing this out there, but do you have the -TCP_DELAY option set in your inetd.conf? We had a slowness issue here sometimes and adding that option cleared it up.

telnet stream tcp nowait root /usr/lbin/telnetd telnetd -TCP_DELAY

The only other thing I can thing of is a stale NFS mount, but that doesn't come into play until after you log in.

Good luck!
Seth
Jeff Schussele
Honored Contributor
Solution

Re: Cannot telnet or rlogin, remsh works

Hi Kevin,

Your problem is the nstrtel parm. Telnet & rlogin sessions are streams based now, so that parm is limiting you to 60. Bump it to 120 like the others & then you'll have the headroom you need. Convention is to keep all 3 of those the same.

HTH,
Jeff

P.S. Any relation to Marty Liquori the legendary distance runner?
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Steven E. Protter
Exalted Contributor

Re: Cannot telnet or rlogin, remsh works

nstrpty: 120
nstrtel: 60
nstrpty: 120

They should all be the same number. Bump up nstrtel to 120 and put the new kernel in production.

You can use sam and their are procedurs aplenty on itrc for doing it on the command line.

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
Kevin Liquori_1
Regular Advisor

Re: Cannot telnet or rlogin, remsh works

I do not have TCP_DELAY set in inetd.conf and will consider it. I've seen that suggestion on the forums before. Most likely I'll bump up nstrtel to 120 - can't hurt.

Jeff, I've always told people I'm not related to Marty Liquori because that's what my parents said . I just looked him up (thanks to the magic of the internet) and I see he was born in New Jersey - I was born in New York - so there's a geographic similarity...hmmm...