SUMMARY: XView error

From: Claudia McIntyre (claudia@isis.c-cs.siu.edu)
Date: Fri Oct 02 1992 - 14:08:17 CDT


Original posting followed by a June summary {I must have been at the beach B*)}.

Thanks to Geoff and all who replied!!!
Claudia

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

Hi All,

XView error: Cannot open connection to window server: :0.0 (Server package)
The only way that we've found to "fix" the problem is to exit windows and
restart openwin.

Then all is well for awhile (days or hours).

This is the clue.

Claudia McIntyre
Computer Science Dept.
Southern Illinois University
Carbondale, Il.
claudia@isis.c-cs.siu.edu

Answer from a previous summary of this problem is below.

I have also appended my current shell script to clean out /tmp more
intelligently.

Hope this helps,

Geoff.
===============================================================================
   _--_|\ Geoff Halprin email: geoff@fulcrum.oz.au
  / \ Technology Director Phone: +61-3-481-6188
  \_.--._/ The Fulcrum Consulting Group Fax: +61-3-482-4161
        ^here 611 Brunswick Street,
        v North Fitzroy, VIC 3068, AUSTRALIA
===============================================================================
Panic: Can't find /

----- >8 ----- Cut Here ----- >8 ----- Cut Here ----- >8 ----- Cut Here -----
#!/bin/sh
# PURGETMP.SH - Purge temporary files from the system.
#
# DESCRIPTION
# Purge old files from the system according to the following rules:
#
#
# /tmp Delete files older than 7 days, or
# Delete files older than 1 day if empty.
# Delete OW clipboard files older than 2 days.
# Do NOT delete sockets.
# Do NOT delete directories starting with "."
# Do NOT delete directories called "lost+found"
# /var/tmp Delete files older than 7 days.
# /var/spool/pcnfs Delete plain files older than 3 days.
# /var/preserve Delete editor save files older than 7 days.
# / All files named 'core' or 'a.out' older than 7 days.
# / All files named '.nfs*' older than 7 days.
#
# HISTORY
# Written by Geoff Halprin, based on many suggestions from the
# net over the last few years.
#
PATH=/usr/bin:/usr/ucb
export PATH

#
# Purge old files from /tmp directory.
# Do not purge directories starting with "." (X11 stuff).
# Do not purge directories called "lost+found"
# Do not purge sockets.
#
cd /tmp;

find . \( -type d -a \( -name .\* -o -name "lost+found" \) \) -prune \
  -o ! -type s \
  \( -mtime +7 -o \( -mtime +1 -size 0 \) \) \
  -exec rm -f {} \;

find . \( -name 'tty.txt*' -o -name 'Text*' \) -mtime +2 -exec rm -f {} \;

cd /var/tmp;
find . -mtime +7 -exec rm -f {} \;

#
# Purge core files older than 7 days.
#
find / \( -name "core" -o -name "a.out" \) -mtime +7 -exec rm -f {} \;
find / -fstype nfs -prune -o -name .nfs\* -mtime +7 -exec rm -f {} \;

#
# Purge old saved editor files.
#
find /var/preserve -name "Ex*" -mtime +7 -exec rm -f {} \;

#
# Purge old PC-NFS Spool files.
#
cd /var/spool/pcnfs
find . -type f -mtime +3 -exec rm -f {} \;

#
#eof
----- >8 ----- Cut Here ----- >8 ----- Cut Here ----- >8 ----- Cut Here -----

----- Begin Included Message -----
Date: Wed, 17 Jun 92 13:10:15 EDT
From: Terry Rosenbaum <tlr@toy.rad.msu.edu>
Subject: SUMMARY: Cannot connect to default window server

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
_____________________________________________________________________

----- End Included Message -----



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