Operating System - HP-UX
1777260 Members
2317 Online
109066 Solutions
New Discussion

Re: unable to get pty in hp - ux

 
SOLVED
Go to solution
Tushar_hiwase
Advisor

unable to get pty in hp - ux

Hi,

 

i am getting "unable  to get pty" error while logging to the hpux server using vnc. I get this error only for non root users during vnc session (with gui).

It has 11.31 OS version.

Do i need to change any kernel setting ?

 

 

thanks in advance

 

regards,

tushar

16 REPLIES 16
Dennis Handly
Acclaimed Contributor

Re: unable to get pty in HP-UX

Have you looked at npty(5)?  I'm not sure if kcusage will tell you how close you are?

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

Hi Dennis,

 

Please see below findings.

 

[3] % kctune |grep -i npty
npty                               1000  1000
[4] % kcusage |grep -i npty
npty                        0 / 1000
[5] %

 

 

leewilliam99
Occasional Advisor

Re: unable to get pty in HP-UX

There are actually 3 types of pty (pseudo terminal device files). Be sure to adjust nstrpty and nstrtel as well as npty. Rather than try to analyze which type of conection is being used, just make all 3 = 1000. You can use SAM so that the device files will be automatically created. Unfortunately, SMH dropped this very useful feature, so after adjusting the parameters to 1000, be sure to run insf to create the device files:

 

insf -e -n 1000 -p 1000 -s 1000

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

Hi leewilliam99,

 

As per you have suggested, i have set the entries of nspty,nstrpty and nstrtel to 1000. And while executing the command given by you for creating the device files,  i got below error.

 

[5] % insf -e -n 1000 -p 1000 -s 1000
insf: Invalid range for autochanger cartridges -- 1000
usage: insf [-d driver | -C class] [-H hw_path] [-I instance] [-D dir] [-q|-v]
            [-e] [-n npty] [-s nstrpty]
usage: insf [-v] -L
[6] %

 

 

leewilliam99
Occasional Advisor

Re: unable to get pty in HP-UX

Oops, drop the -p option.

 

insf -e -n 1000 -s 1000

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

still no luck...getting same error messages for non root user..

# kctune |grep -i npty
npty 1000 1000
# kctune |grep -i nstrpty
nstrpty 1000 1000
# kctune |grep -i nstrtel
nstrtel 1000 1000
# insf -e -n 1000 -s 1000
insf: Installing special files for pseudo driver ptym
insf: Installing special files for pseudo driver ptys
#

Dennis Handly
Acclaimed Contributor

Re: unable to get pty in HP-UX

>getting same error messages for non root user.

 

Did you check the kcusage of the nstrpty and nstrtel to see if you need more than 1000?

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

Hi Dennis,

 

 

Below are the kusage for npty, nstrpty and nstrtel.

 

[6] % kcusage |grep npty
npty                        0 / 1000
[7] % kcusage |grep nstrpty
nstrpty                     1 / 1000
[8] % kcusage |grep nstrtel
nstrtel                     0 / 1000
[9] %

 

Do i need to increase kcusage also using sam ?

 

Dennis Handly
Acclaimed Contributor

Re: unable to get pty in HP-UX

>Do I need to increase kcusage also using sam?

 

As leewilliam99 said, that would be easier if you were on 11.23.

But it does seem strange that you have "no" usage but you get that error.

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

Hi Denis,

 

So is there any workaround or setting other than this i have to do on my 11.31 machine ?

otherwise do i need to do reinstallation of hpux on my server ?

 

 

 

Dennis Handly
Acclaimed Contributor

Re: unable to get pty in HP-UX

>So is there any workaround or setting other than this I have to do on my 11.31 machine?

 

Try increasing all 3 to 2000?

>do I need to do reinstallation of HP-UX on my server?

 

I doubt it.  What you need is tusc output of VNC so you can see exactly what type of PTY error it was getting.

Also, I'm not sure why the root permissions matter.  Is there a weird pty with bogus permissions?

Tushar_hiwase
Advisor

Re: unable to get pty in HP-UX

denis,

 

Increased the all 3 kctune values to 2000.

 

still no luck.....

 

Below are the vnc session logs. Hope you will get something from here.


Tue Aug 21 13:16:58 2012
 Connections: closed: x.x.x.x::52549 (Clean disconnection)
 SMsgWriter:  framebuffer updates 29
 SMsgWriter:    copyRect rects 5, bytes 80
 SMsgWriter:    hextile rects 171, bytes 238260
 SMsgWriter:    ZRLE rects 2, bytes 12690
 SMsgWriter:    raw bytes equivalent 3452450, compression ratio 13.757521

Tue Aug 21 13:18:02 2012
 Connections: accepted: x.x.x.x::52552
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Tue Aug 21 13:18:06 2012
 VNCSConnST:  Server default pixel format depth 16 (16bpp) big-endian rgb565
 VNCSConnST:  Client pixel format depth 8 (8bpp) rgb max 3,3,3 shift 4,2,0
 VNCSConnST:  Client pixel format depth 16 (16bpp) little-endian rgb565

Tue Aug 21 13:19:35 2012
 XserverDesktop: Added unknown keysym 0xffeb to keycode 255


Note. : Where x.x.x.x is my ip address which is intentionaly removed.

 

Also attaching the vnc session screenshot of my normal user.

rariasn
Honored Contributor
Solution

Re: unable to get pty in hp - ux

Hi Tushar:

 

Verify owner and file permission:

 

# ll -d /dev/pty

 

user: bin Group


drwxr-xr-x   2 bin        bin           8192 Mar 25  2010 /dev/pty

 

# ll /dev/pty

 

User: bin Group: tty

 

crw-rw-rw-   2 bin        tty         17 0x000000 Mar 25  2010 ttyp0
crw--w----   2 ran        tty         17 0x000001 Aug 21 12:00 ttyp1 <-- user ran connected
crw-rw-rw-   2 root       root        17 0x000002 Sep  2  2011 ttyp2 <-- user root connected 
crw-rw-rw-   2 bin        tty         17 0x000003 Mar 25  2010 ttyp3
crw-rw-rw-   2 bin        tty         17 0x000004 Mar 25  2010 ttyp4

...

 

rgs

Tushar_hiwase
Advisor

Re: unable to get pty in hp - ux

thanks rariasn...

 

 

it worked for me...

 

 

Nivin
New Member

Re: unable to get pty in hp - ux

My system states.

 

# pwd
/
# kcusage |grep npty
npty                        2 / 60
 # kcusage |grep nstrpty
nstrpty                   120 / 120
# kcusage |grep nstrtel
nstrtel                     0 / 60

# ll -d /dev/pty
drwxr-xr-x   2 bin        bin           2048 Mar  6 10:38 /dev/pty

 

# ll  /dev/pty

total 0
crw-rw-rw-   2 bin        tty         17 0x000000 Nov 22  2006 ttyp0
crw--w----   2 scaldera   tty         17 0x000001 Jul  2 12:13 ttyp1
crw--w----   2 alcatel    tty         17 0x000002 Jul  3 10:14 ttyp2
crw-rw-rw-   2 bin        tty         17 0x000003 Mar  6 12:08 ttyp3

 

what do i need to do next to fix this issue?

 

Please advise

Robert_Jewell
Honored Contributor

Re: unable to get pty in hp - ux

nstrpty                   120 / 120

 

Looks like you need to increase this tunable as described by the posts above.

 

Use 'kcweb' to start the kernel configuration utility.   As described above, change each value and then use the 'insf' command to reset the device files.

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!