SUMMARY: Cannot connect to default window server

From: Terry Rosenbaum (tlr@toy.rad.msu.edu)
Date: Wed Jun 17 1992 - 16:31:09 CDT


Sun Managers,

Yesterday (Tue, 16 Jun 92 14:33:20 EDT) I wrote:

>...
>After a period of time (hours to days) has elapsed since starting the
>xnews server, connections can no longer be made to display ":0" or
>display ":0.0".
>...
>Typical symptom is an error message like:
>
>"XView error: Cannot open connection to window server: :0.0 (Server package)"
>
>Connections can still be made to display "<hostname>:0".
>...

Thanks for your assistance. The problem is now solved!

****************************************************************************

The overwhelming consensus was that a cron job was cleaning out the UNIX
domain sockets in /tmp used for connections to the server. The sockets
in my case are named /tmp/.NeWS-unix/N0 (News) and /tmp/.X11-unix/X0 (X11).

****************************************************************************

That was it! The offending crontab line on our systems was:

10 1 * * * find /tmp -mtime +2 -exec rm -f '{}' \;

The fix was to change that cron command to:

10 1 * * * find /tmp -mtime +2 ! -type s -exec rm -f '{}' \;

Thanks to those whose responses have arrived so far
(as of June 17, 1992 12:30 EDT) and to anyone else whose response arrives
later:

The solution was provided by:

jdavis@noao.edu (Jim Davis)
chip@allegra.att.com (Chip Christian)
russ@MATH.ORST.EDU (Russell Ruby)
rafi@tavor.openu.ac.il (Rafi Sadowsky)
M.F.Gordon@ee.edinburgh.ac.uk (Michael Gordon)
gdmr@dcs.ed.ac.uk (George D M Ross)
gbarker@mph.sm.ucl.ac.uk (Dr Gareth J. Barker)
jpmg@eng.cam.ac.uk (Patrick Gosling)
mp@allegra.att.com (Mark Plotnick)
jimh@nsd.fmc.com (Jim Hendrickson x7348 M233)
dwb@carto.IMD.Sterling.COM (David Boyd)
syd@dsinc.dsi.com (Syd Weinstein)
lidl@uunet.uu.net (Kurt)
mattson@cs.UCSD.EDU (Jim Mattson)

Heres a more detailed summary of solutions, other possible
answers to the problem, etc:

lidl@uunet.uu.net (Kurt)
Suggested:

>Are you sure you read the Comp.windows.x FAQ?
 
>From the FAQ:
 
>----------------------------------------------------------------------
>Subject: 45) Why am I suddenly unable to connect to my Sun X server?
>After a seemingly random amount of time after the X server has been started, no>other clients are able to connect to it.
>
> The default cron cleanup jobs supplied by Sun (for 4.0.3, at least)
>delete "old" (unreferenced) files from /tmp -- including /tmp/.X11-unix, which
>contains the socket descriptor used by X. The solution is to add "! -type s" to>the find exclusion in the cron job.
>[10/90]
>
>----------------------------------------------------------------------

Sorry, when I said I'd read FAQ, I meant to say I'd read sun-managers FAQ :).

M.F.Gordon@ee.edinburgh.ac.uk (Michael Gordon)
Best explained why using DISPLAY <hostname>:0 still works:

>Sound's like a cron job clearing out /tmp. Connections to a local
>server are made through the socket /tmp/.NeWS-unix/N0 for screen 0
>etc. Any local clients running when the socket disappears will keep
>going - the socket won't be reclaimed while anything has it open - but
>new connections to it will fail because there's no longer a directory
>entry for it in /tmp/.NeWS-unix. Connections to hostname:0 will use an
>internet socket and work happily.

blymn@baobab.awadi.com.AU (Brett Lymn - System Admin)
Suggested:

>Someone has not decided to be tidy and delete some . files have they?
>If the .Xauthority file is removed you will get the symptoms you
>described.

No, that wasn't the cause in this case.

lees@cps.msu.edu (John Lees)
John was kind enough to pass my request along to his department's OW expert.

courtney@cps.msu.edu (Jon Courtney)
Jon has also seen the problem, but attributed it to "operator error :-)":

>I believe that we have seen this error message as well, but as it has
>only occurred on machines that have been running the window system
>for weeks at a time (faculty workstations) we attributed it to
>an inconsistent environment due to "operator error". :-)
 
> This problem must not occur for us very often because most of our users
>set DISPLAY in their .login file to <hostname>:0 before firing the "openwin"
>script.

Two people were interested enough in the solution to specifically request
a summary:

jimh@nsd.fmc.com (Jim Hendrickson x7348 M233)
Jim experienced the same problem, and also was interested in the solution.

danielle@systems.caltech.edu (Danielle Sanine)
Danielle also requested a summary.

Again, many thanks. Long live sun-managers!
-Terry

_____________________________________________________________________

  Terry Rosenbaum E-mail: tlr@toy.rad.msu.edu
  Michigan State University Phone: 517/355-0120
  Radiology Department Fax: 517/336-2849
  B-220 Clinical Center
  138 Service Rd
  East Lansing MI 48824-1315
_____________________________________________________________________



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