SUMMARY: Cannot connect to default window server

From: Terry Rosenbaum (
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

The solution was provided by: (Jim Davis) (Chip Christian)
russ@MATH.ORST.EDU (Russell Ruby) (Rafi Sadowsky) (Michael Gordon) (George D M Ross) (Dr Gareth J. Barker) (Patrick Gosling) (Mark Plotnick) (Jim Hendrickson x7348 M233)
dwb@carto.IMD.Sterling.COM (David Boyd) (Syd Weinstein) (Kurt)
mattson@cs.UCSD.EDU (Jim Mattson)

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

>Are you sure you read the 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.

Sorry, when I said I'd read FAQ, I meant to say I'd read sun-managers FAQ :). (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. (Brett Lymn - System Admin)

>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

No, that wasn't the cause in this case. (John Lees)
John was kind enough to pass my request along to his department's OW expert. (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"

Two people were interested enough in the solution to specifically request
a summary: (Jim Hendrickson x7348 M233)
Jim experienced the same problem, and also was interested in the solution. (Danielle Sanine)
Danielle also requested a summary.

Again, many thanks. Long live sun-managers!


  Terry Rosenbaum E-mail:
  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