Mailing List Archive

Why Does conserverd grap a tty for each connection?
Howdy,

I am using conserver in this way:

Server is an Ultra5 running Solaris 2.6

conserver is latest rev, well last 6.blah rev

I have an Annex Terminal server which servers a telnet port for each of it's 64 serial connections. It actually listens on port 23 of a different IP per port, kinda wasteful, but...

Connecting to the telnet port will give you serial console on the machine plugged into the corresponding serial port on the Annex.

Ok.

conserver's built in 'network connection' setting wouldn't work, not sure why, but no problem, instead I used to the | option to execute an arbitray command, in this case telnet, so my conserver.cf lines look like this:

conanx2-port61:| /usr/bin/telnet conanx2-port61::conanx2-port61.log:

Works great.

Well now I need to open 832 of these...

For each connection I get a message like this:
conserver: 16072 is the pid on /dev/ttyp0

So each connection is getting it's own tty, well that's ok but I only have so many tty's, these are full fledged tty's too, not pty's so I can't increase the number!!

My processes start competing for tty's and the server never gets going just bounces around restarting the children all day...

Why is this happening??

Why does it not open a pty for each of these??

Anybody else using conserver on solaris for a large console farm like this??

Any response would be greatly appreciated.

Thanks,
Scott Matott sXe
--------
Scott Matott sXe
Systems Administration
The Hull Group
311 S. Wacker Drive Suite 1400
Chicago, Il 60606
Phone: 312-697-2717
RE: Why Does conserverd grap a tty for each connection? [ In reply to ]
ttyp0 is a pseudo tty. Basically, It needs to use a pseudo connection for
each command you use like you did below.

I would suggest that if each of the port on the Annex can use reverse-TCP,
you use that. Conserver will not use a pty for each connection.
I only allow 16pty connections into my system that uses conserver to manage
64*16 (1024) ports.

Chris



-----Original Message-----
From: Matott, Scott [mailto:Scott.Matott@htc.com]
Sent: Monday, April 23, 2001 6:10 PM
To: users@conserver.com
Subject: Why Does conserverd grap a tty for each connection?


Howdy,

I am using conserver in this way:

Server is an Ultra5 running Solaris 2.6

conserver is latest rev, well last 6.blah rev

I have an Annex Terminal server which servers a telnet port for each of it's
64 serial connections. It actually listens on port 23 of a different IP per
port, kinda wasteful, but...

Connecting to the telnet port will give you serial console on the machine
plugged into the corresponding serial port on the Annex.

Ok.

conserver's built in 'network connection' setting wouldn't work, not sure
why, but no problem, instead I used to the | option to execute an arbitray
command, in this case telnet, so my conserver.cf lines look like this:

conanx2-port61:| /usr/bin/telnet conanx2-port61::conanx2-port61.log:

Works great.

Well now I need to open 832 of these...

For each connection I get a message like this:
conserver: 16072 is the pid on /dev/ttyp0

So each connection is getting it's own tty, well that's ok but I only have
so many tty's, these are full fledged tty's too, not pty's so I can't
increase the number!!

My processes start competing for tty's and the server never gets going just
bounces around restarting the children all day...

Why is this happening??

Why does it not open a pty for each of these??

Anybody else using conserver on solaris for a large console farm like this??

Any response would be greatly appreciated.

Thanks,
Scott Matott sXe
--------
Scott Matott sXe
Systems Administration
The Hull Group
311 S. Wacker Drive Suite 1400
Chicago, Il 60606
Phone: 312-697-2717
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
>
>ttyp0 is a pseudo tty. Basically, It needs to use a pseudo connection
>for each command you use like you did below.
>
hmmm.... Looking closer it is a ptty...
I have set the system to have 1024 pty's, (it's kernel param under solaris...) and there are 1024 of them in /dev/pts, but there are only 48 /dev/tty..'s
The server ramps up to 48 connections and then falls back down to 32 and back up and back down again and again...

Not sure what is going on...

>I would suggest that if each of the port on the Annex can use
>reverse-TCP, you use that. Conserver will not use a pty for each
>connection.
What is reverse-TCP??

Thanks for the response, I do appreciate the help, sorry if I sound a bit frustrated...

Thanks,
Scott Matott sXe
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
Quoting "Matott, Scott" <Scott.Matott@htc.com>:
> Connecting to the telnet port will give you serial console on the
> machine plugged into the corresponding serial port on the Annex.

Good.

> conserver's built in 'network connection' setting wouldn't work, not
> sure why, but no problem, instead I used to the | option to execute an
> arbitray command, in this case telnet, so my conserver.cf lines look
> like this:
>
> conanx2-port61:| /usr/bin/telnet conanx2-port61::conanx2-port61.log:
>
> Works great.

That's good, but the network port stuff should work just as well...actually,
better 'cause it won't chew up the pseudo-ttys (telnet usually requires a
psuedo-tty for it to even function).

If you use:

conanx2-port61:!conanx2-port61:23:&.log:
conanx2-port62:!conanx2-port62:23:&.log:

etc, does it not work? I'm assuming I got the naming convention right...but
that should open port 23 connections to each of those hostnames with logfiles
of the form conanx2-port61.log, conanx2-port62.log, etc.

I'm going to ignore the whole pseudo-tty problem 'cause getting it to open it's
own TCP connections directly to port 23 will be a whole lot better in the long
run for you. Trust me...less processes, psuedo-ttys, memory, etc. Plus
the '!' syntax code is used by myself instead of the '|' syntax...so I know it
works (but the '|' syntax works as well...just not quite as well on all
platforms). Anyway, if you can let me know what happens with lines like above,
I'd love to hear about it. It really should "just work".

Bryan
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
>> conserver's built in 'network connection' setting wouldn't work, not
>
>That's good, but the network port stuff should work just as well...actually,
>better 'cause it won't chew up the pseudo-ttys (telnet usually requires a
>psuedo-tty for it to even function).
>

Yeah, i wish this worked for me, but it doesn't, I get error messages like this in my conserver.log (stdout from conserverd)

conserver: connect: conanx2-port39 (23@ 139.172.204.107): Connection refused: forcing down
conserver: connect: conanx7-port2 (23@ 139.172.205.146): Connection refused: forcing down

Any idea why this is happening, perhaps my TS speaks a wierd variant of telnet, is there a way to see a more verbose account of the transaction between conserver and mt TS??

Thanks,
Scott Matott sXe
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
Well, this is kinda interesting...there are spaces between the '@' and the IP
address. My guess is that there's something to that. Eeeek! I just had a
peek at the code. Do you have a space between the '!' and the hostname/IP
address in the .cf file? If so, remove the extra spaces and see if that works
(I'm assuming ALL consoles are forced down, not just the two you mentioned).
And, thrown in a '-v' flag to conserver....that will show us what it's doing
with the hostname/IP address when reading the configuration file (is it
stripping extra spaces, which I think it isn't, or is it adding spaces, etc).

Bryan

Quoting "Matott, Scott" <Scott.Matott@htc.com>:
> Yeah, i wish this worked for me, but it doesn't, I get error messages
> like this in my conserver.log (stdout from conserverd)
>
> conserver: connect: conanx2-port39 (23@ 139.172.204.107): Connection
> refused: forcing down
> conserver: connect: conanx7-port2 (23@ 139.172.205.146): Connection
> refused: forcing down
>
> Any idea why this is happening, perhaps my TS speaks a wierd variant of
> telnet, is there a way to see a more verbose account of the transaction
> between conserver and mt TS??
>
> Thanks,
> Scott Matott sXe
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
In message <988323430.3ae89e667d683@www.stansell.org> you write:
>Well, this is kinda interesting...there are spaces between the '@' and the IP
>address. My guess is that there's something to that. Eeeek! I just had a
>peek at the code. Do you have a space between the '!' and the hostname/IP
>address in the .cf file? If so, remove the extra spaces and see if that works
>
Unbelieveable!!!! There was a space, I got rid of it and it worked!!!

Wow! Oh this is great!! THis is the 'right' way to be doing it anyhow!Plus all those telnet sessions, plus a wrapper script (which I was hiding from you all, since the telnet client ran as root needed a wrapper script to give it restircted shell and no path (otheriwse malicious users could get root shell!)
PLus I had actually modified the source so that if you told it to send a break it would send the escape sequence for the telnet client plus the phrase "send brk\n"

Oh that's so nice!! Can't believe I did all that because of a syntax error!!

>(I'm assuming ALL consoles are forced down, not just the two you mentioned).
>And, thrown in a '-v' flag to conserver....that will show us what it's doing
>with the hostname/IP address when reading the configuration file (is it
>stripping extra spaces, which I think it isn't, or is it adding spaces, etc).
>
The output I get with the space is:
conserver: 0: conanx2-port39 is network on 139.172.204.107/23 logged to /unique/data/logs/console/conanx2-port39.log
conserver: 0: conanx7-port2 is network on 139.172.205.146/23 logged to /unique/data/logs/console/conanx7-port2.log
conserver: 0: conanx1-port11 is network on 139.172.204.13/23 logged to /unique/data/logs/console/conanx1-port11.log
conserver: group 0 on port 32866
conserver: access type 't' for "console"
conserver: access type 't' for "localhost"
conserver: connect: conanx2-port39 (23@ 139.172.204.107): Connection refused: forcing down
conserver: connect: conanx7-port2 (23@ 139.172.205.146): Connection refused: forcing down
conserver: connect: conanx1-port11 (23@ 139.172.204.13): Connection refused: forcing down

Hope that helps, and thank you all for you help!

Who says you can't get good support on freeware??

Thanks,
Scott Matott sXe
Re: Why Does conserverd grap a tty for each connection? [ In reply to ]
Quoting "Matott, Scott" <Scott.Matott@htc.com>:
> Unbelieveable!!!! There was a space, I got rid of it and it
> worked!!!

Excellent. Well, kinda. I now have a nasty (and horribly stupid) bug to fix.
Thanks for the patience. ;-)

Bryan