SUMMARY: "unable to open pty" - yet the problem is not fixed with the usual solutions

From: john.hilger@ac.com
Date: Mon Jun 28 1999 - 19:39:15 CDT


Thanks to all that responded ...

The original message is included below
> Sun Managers ...
>
> I have a problem which appears to be a familar problem, but isn't ...
> There are 25 ptys in use ( w | grep pts | wc -l = 25), ( w | wc -l =
31
> ) yet when anyone trys to login or when the user seated at the console
attempts
> to open another window they get the familar error "unable to open pty". If
> anyone closes an existing window then someone (anyone) can then open one more
> window.
>
> The machine in question is an Ultra 10 running Solaris 2.6 with all
> recommended patches.
>
> pt_cnt = 100 in /etc/system.
> I double checked the value of pt_cnt with adb and sure enough it's 100.
>
> The sun managers archives mentions a similar problem in 1997, but there was
> no answer/summary provided.
>
> Sun solve mentioned the need to double check the permissions on
> /usr/lib/pt_chmod and to make sure that it was owned by root:bin with
> permissions of 4111 - this checked out ok as well.
>
> There are 0-99 ptys ( /devices/pseudo/pts@[0-99] )
>
> Does anyone have any ideas ??
>
> Thanks,
>
> John Hilger
>
> john.hilger@ac.com

The responses I received mantioned several things

1) Increase the pt_cnt and reboot with "-r" for reconfigure.

     I had already done this, unfortunately I wasn't clear about it in my
original message. As a matter of fact I double checked it by printing out the
value of the variable in the resulting live kernel with adb. Sure enough it was
100.

2) Increase nptys

     nptys are for BSD style pts; therefore I was doubtful this was the solution

3) Increase maxusers

     In version of Solaris pre-2.3 it is necessary to make this change. I am
using Solaris 2.6; therefore this was not an issue. See page 188 of Adrian's
1st edition for details.

4) Check the permissions of /usr/lib/pt_chmod. It should be owned by root:bin
with permissions of 4111.

     I found this on the Sun solve website, and the permissions and ownership
checked out OK.

SO WHAT THE HECK WAS THE SOLUTION TO THE PROBLEM ???

  Thanks to several people who pointed out using the "fuser -u /dev/pts/*"
command. After using this command and cross referencing them with the output
the "who" command I saw that there were many old ksh processes which had
apparently not terminated/exited properly. So I issues a "kill -1 PID" for each
ksh which did not show up in the output of "who" and suddenly everyone can open
new windows again. So I guess the solution is to double check if there are
processes which have not been properly terminated in the process table.

Thanks again to all who responded

John Hilger



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:23 CDT