[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: polling consoles

Corey Hirschman corey@rentec.com
Tue, 22 Oct 2002 08:41:51 -0700 (PDT)


You seem to have a greater problem than I do. :)

Once the terminal server is back up, I can do console <node name>,
conserver then realizes the connection is really not up and does a reset
to bring it up.  After that I am good to go.  The problem is that I have
to do that to reestablish the connection, or restart conserver.  It
would be better (at least I think so) if conserver did this
automatically at a time specified in minutes on the command line when
conserver is launched or perhaps in the conserver.cf file.  This way,
any console messages will continue to be logged automatically after only
a short interruption.


On Tue, 2002-10-22 at 11:34, cfowler wrote:
> Here is a chnage I made to console.c form 7.2.3  It needs a tweak but it
> clears up the garbage on connection loss.
> 
> 
> Index: console.c
> ==================================================================
> RCS file: /u01/ENS/CVS/outpost/src/conserver/console/console.c,v
> retrieving revision 1.2
> diff -u -r1.2 console.c
> --- console.c   16 Oct 2002 18:00:55 -0000      1.2
> +++ console.c   22 Oct 2002 15:32:15 -0000
> @@ -1113,11 +1113,9 @@
>  
>         /* anything from socket? */
>         if (FD_ISSET(fileFDNum(pcf), &rmask)) {
> -           if ((nc = fileRead(pcf, acMesg, sizeof(acMesg))) == 0) {
> -               if (justProcessedUrg) {
> -                   printf("\n");
> -                   Error("lost connection");
> -               }
> +           if ((nc = fileRead(pcf, acMesg, sizeof(acMesg))) <= 0) {
> +               printf("\n");
> +               Error("lost connection");
>                 break;
>             }
>             if (fStrip) {
> @@ -1141,6 +1139,9 @@
>      c2cooked();
>      if (fVerbose)
>         printf("Console %s closed.\n", pcMach);
> +
> +    printf("\n");
> +
>      return 0;
>  }
>  
> 
> 
> On Tue, 2002-10-22 at 10:46, Corey Hirschman wrote:
> > I was wondering if there is any way for conserver to test the connection
> > between itself and the consoles it is aware of.
> > 
> > We run into a problem that if a terminal server goes down unexpectedly,
> > conserver will not realize that the TCP connections have been broken and
> > will keep them marked as up.  The terminal server, once back up, no
> > longer knows about the connections so none of the console messages are
> > put into the logs, until conserver is either restarted or an explicit
> > connection is made to each machine.
> > 
> > A similar problem occurs if one of the nodes in our cluster crashes. 
> > Once it is fixed and brought back up, conserver does not kill the bad
> > connection and reestablish a connection with the node until an explicit
> > connection is made to the node.
> > 
> > I know this popped up on the list about a year ago and at that time
> > there was nothing that could be done within conserver.  I was wondering
> > if there is now a way to monitor connection status and if not get
> > suggestions as to how to best implement it.
> > 
> > Corey
> > 
> > 
> > 
> > 
> > _______________________________________________
> > users mailing list
> > users@conserver.com
> > https://www.conserver.com/mailman/listinfo/users
> > 
> > 
> 
> 
>