Operating System - HP-UX
1833770 Members
2571 Online
110063 Solutions
New Discussion

11.23 telnet fails - pty issue?

 
SOLVED
Go to solution
Steven Buschman_3
Frequent Advisor

11.23 telnet fails - pty issue?

11.23 Sep2004 release on a zx2000 system.
Fresh OS load, telnet fails
# uname -a
HP-UX spare B.11.23 U ia64 3892347766 unlimited-user license
# telnet spare
Trying...
Connected to spare.min.veritas.com.
Escape character is '^]'.
Local flow control off
Connection closed by foreign host.
# telnet localhost

I can ftp, flowchart from HP-UX guide says it is a pty issue and to contact HP. Confirmed in Remote Access Administrators guide B2355-90778. ITRC search also turned up Sep04 patch 31500, which I confirmed is installed.

I did 3 other fresh 11.23 installs this week on different hardware models and all those went OK, installed from same DVD. ITRC posting in the past had womeone tracing this to a nsswitch.conf issue but I confirmed it is the same file as on the 3 that I loaded and work. Likewise inetd.conf file is identical, but I tried copying it from a working system and recompiling, without success
Here is the syslog error:

May 9 09:26:24 spare telnetd[18873]: telnet pty allocation failed
May 9 09:27:44 spare inetd[1238]: Rereading configuration
May 9 09:27:44 spare inetd[1238]: Configuration complete
May 9 09:27:49 spare telnetd[18883]: telnet pty allocation failed

About the only thing I *may* have done differently is chosen the technical configuration on either/or of the systems when loading, otherwise I'm confident the same OS bundles.

Is there some kernel module/parameter that is set different on this model system?
I have also verified that the telnet modules are loaded.
# kcmodule telm
Module State Cause
telm static best
# kcmodule tels
Module State Cause
tels static best

I'm baffled.......Thoughts from the masses?
TIA,
Steven

12 REPLIES 12
Patrick Wallek
Honored Contributor
Solution

Re: 11.23 telnet fails - pty issue?

Check the kernel parms: npty, nstrpty and nstrtel. If need be, increase these.

I can't remember if these are dynamic on 11.23 or not. If they are, you'd need to do an 'insf -e' after the increase to create the additional pty files.

If they are not dynamic and a reboot is required then the pty files should get created automatically.
Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

Sounded good, but that's not likely the issue unless the zx2000 requires more pty's.
I checked on a system that works and the problem system.
Both systems have npty, nstrpty, and nstrtel set the same, all =60 (not dynamic).
npty 60 60 no
nstrpty 60 60 no
nstrtel 60 60 no
Patrick Wallek
Honored Contributor

Re: 11.23 telnet fails - pty issue?

Check /dev and make sure all the appropriate files and directories exist.

There probably should be /dev/pty directory and some /dev/pty* files. Also verify the permissions against one of the machines that works.
RAC_1
Honored Contributor

Re: 11.23 telnet fails - pty issue?

Do you have those many device files??

wc -l /dev/pty/*
You may need to push the setting up for npty. Once you set it, do as follows.

insf -d pty -n "setting_no"
insf -d ptym -n "setting_no"

Anil
There is no substitute to HARDWORK
Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

Another good thought Patrick, but I failed to mention I had checked those previously.
I also piped to wc -l, and the same # of files exist between systems. While the permissions for /dev/pty/ttyp1 are different than other pty files, they are the same between working and non-working systems.
Next idea?
Thanks, again!

# ls -al /dev/pty
total 32
drwxr-xr-x 2 bin bin 8192 May 5 10:40 .
dr-xr-xr-x 15 bin bin 8192 May 6 08:51 ..
crw-rw-rw- 2 bin tty 17 0x000000 May 5 10:40 ttyp0
crw-rw-rw- 2 root root 17 0x000001 May 9 08:53 ttyp1


Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

I'll try increasing npty and doing the insf, but I will need to reboot so I will likely do so tomorrow.
Ermin Borovac
Honored Contributor

Re: 11.23 telnet fails - pty issue?

telnetd uses the following device files:

/dev/telnetm /* master */
/dev/pts/t /* slave */

Corresponding kernel parameter is nstrtel.

You should verify that these device files exist and 'ls /dev/pts/t* | wc -l' matches up with nstrtel.

You can recreate them with

# insf -d telm -e -v /* /dev/telnetm */
# insf -d tels -e -v /* /dev/pts/t */

Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

Ermin,
Well the kernel parameters must be the issue then, since nstrtrl, npty, and others are set to 60 when ls -al /dev/pty/*|wc -l returns 63.
I'll try this tomorrow when I can reboot (static, not dynamic) to verify and cnfirm this is the issue and assign points then. Until then, consider this answered.
I'll be back....I won't forget.
Thanks!
Steven
Ermin Borovac
Honored Contributor

Re: 11.23 telnet fails - pty issue?

Sorry, device files are /dev/pts/t* NOT /dev/pty/* (as indicated in my previous post).

So before you reboot I'd recommend that you check

/dev/telnetm
/dev/pts/t*

and recreate if necessary.
Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

Bingo!
While I had trouble with syntax errors on the insf commands above, after I increased the 3 kernel parameters from 60 to 90 (63 pty files existed) the system still did not telnet, but then I:
Tarred up /dev/telnetm and /dev/pts/8 (in case)
removed /dev/ttelnetm and /dev/pts/*
insf -e
reboot
And all is now well.
Thanks SO much!
Steven
Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

One last note - every reply was helpful.
Comparing this system to previous ones didn't matter, because for some reason the zx2000 needed/generates more pty files, and everyone had the variables and process pegged, I just actually needed to stop comparing it to the other working systems.
Thanks again!
Steven
Steven Buschman_3
Frequent Advisor

Re: 11.23 telnet fails - pty issue?

closing thread