f



X server refuses to communicate with new connections

I've installed 2.9 on a SunBlade 100.   I'm running twm and
seem to have hit a snag.  I keep getting this error message:

   : xhost +
   Xlib: connection to ":0.0" refused by server
   Xlib: Client is not authorized to connect to Server
   xhost:  unable to open display ":0.0"

after a while.  I can't open new windows after this.  It doesn't
seem to be related to the number of windows.  It seems to be  
more time related.

Sometimes this occurs within a few minutes but, it might take a 
day?  I'm hoping someone knows of a patch, or a setting, that 
will cure this problem.

I start X up with:

  xinit -bpp 32 -clients 1024

TIA,
Paul

0
rockhead
1/29/2004 2:53:56 PM
comp.unix.solaris 25993 articles. 1 followers. Post Follow

10 Replies
1820 Views

Similar Articles

[PageSpeed] 21

In article <889Sb.140480$nt4.624973@attbi_s51>, rockhead.com@pimin.rockhead.com (Paul Newhouse) writes:
> I've installed 2.9 on a SunBlade 100.   I'm running twm and
> seem to have hit a snag.  I keep getting this error message:
> 
>    : xhost +
>    Xlib: connection to ":0.0" refused by server
>    Xlib: Client is not authorized to connect to Server
>    xhost:  unable to open display ":0.0"
> 
> after a while.  I can't open new windows after this.  It doesn't
> seem to be related to the number of windows.  It seems to be  
> more time related.
> 
> Sometimes this occurs within a few minutes but, it might take a 
> day?  I'm hoping someone knows of a patch, or a setting, that 
> will cure this problem.
> 
> I start X up with:
> 
>   xinit -bpp 32 -clients 1024
> 

Maybe the file
..Xauthority
in the user's home directory is missing or corrupted?

Corruption can happen due to diskspace problem.

The same thing happens when you have switched to a new user.

-- 
Michael Tosch
IT Specialist
HP Managed Services Germany
Phone +49 2407 575 313


0
eedmit
1/29/2004 3:32:48 PM
In article <bvb930$p7l$2@aken.eed.ericsson.se>,
	eedmit@NO.eed.SPAM.ericsson.PLS.se (Michael Tosch) writes:
> In article <889Sb.140480$nt4.624973@attbi_s51>, rockhead.com@pimin.rockhead.com (Paul Newhouse) writes:
>> I've installed 2.9 on a SunBlade 100.   I'm running twm and
>> seem to have hit a snag.  I keep getting this error message:
>> 
>>    : xhost +
>>    Xlib: connection to ":0.0" refused by server
>>    Xlib: Client is not authorized to connect to Server
>>    xhost:  unable to open display ":0.0"
>> 
>> after a while.  I can't open new windows after this.  It doesn't
>> seem to be related to the number of windows.  It seems to be  
>> more time related.
>> 
>> Sometimes this occurs within a few minutes but, it might take a 
>> day?  I'm hoping someone knows of a patch, or a setting, that 
>> will cure this problem.
>> 
>> I start X up with:
>> 
>>   xinit -bpp 32 -clients 1024
>> 
> 
> Maybe the file
> .Xauthority
> in the user's home directory is missing or corrupted?
> 
> Corruption can happen due to diskspace problem.

My local disk is only 15% utilized (the max in any filesystem).
 
> The same thing happens when you have switched to a new user.

The .Xauthority file had no entries.  I added one.  Just have to
wait now, it it doesn't recur in a week or so I'll consider it fixed.
I didn't consider such things since it would always work for a while.
A bad .Xauthority file should have started out bad from the get go
.... no??  I'm wondering if exmh is doing something bad.  It likes
to remove entries shown by xhost??

Thanks,
Paul

0
rockhead
1/29/2004 5:41:14 PM
newhouse at rockhead dot com writes in comp.unix.solaris:
|I've installed 2.9 on a SunBlade 100.   I'm running twm and
|seem to have hit a snag.  I keep getting this error message:
|
|   : xhost +
|   Xlib: connection to ":0.0" refused by server
|   Xlib: Client is not authorized to connect to Server
|   xhost:  unable to open display ":0.0"
|
|after a while.  I can't open new windows after this.  It doesn't
|seem to be related to the number of windows.  It seems to be  
|more time related.

Do you have a cron job removing files in /tmp?  If so, make sure it
doesn't touch anything in /tmp/.X11-* or you will see exactly this
problem.

-- 
________________________________________________________________________
Alan Coopersmith                              alanc@alum.calberkeley.org
http://www.CSUA.Berkeley.EDU/~alanc/       aka: Alan.Coopersmith@Sun.COM
  Working for, but definitely not speaking for, Sun Microsystems, Inc.
0
Alan
1/29/2004 6:51:27 PM
In article <bvbknf$18di$1@agate.berkeley.edu>,
	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
> newhouse at rockhead dot com writes in comp.unix.solaris:
>|I've installed 2.9 on a SunBlade 100.   I'm running twm and
>|seem to have hit a snag.  I keep getting this error message:
>|
>|   : xhost +
>|   Xlib: connection to ":0.0" refused by server
>|   Xlib: Client is not authorized to connect to Server
>|   xhost:  unable to open display ":0.0"
>|
>|after a while.  I can't open new windows after this.  It doesn't
>|seem to be related to the number of windows.  It seems to be  
>|more time related.
> 
> Do you have a cron job removing files in /tmp?  If so, make sure it
> doesn't touch anything in /tmp/.X11-* or you will see exactly this
> problem.

Doesn't look like there is anything cleaning up like that.
 
Paul
-- 
Working the Rockie Road of the G&PX
0
rockhead
1/29/2004 9:43:55 PM
[Posted and mailed]

In article <_AbSb.138501$sv6.750763@attbi_s52>,
	rockhead.com@pimin.rockhead.com (Paul Newhouse) writes:
> In article <bvb930$p7l$2@aken.eed.ericsson.se>,
> 	eedmit@NO.eed.SPAM.ericsson.PLS.se (Michael Tosch) writes:
>> In article <889Sb.140480$nt4.624973@attbi_s51>, rockhead.com@pimin.rockhead.com (Paul Newhouse) writes:
>>> I've installed 2.9 on a SunBlade 100.   I'm running twm and
>>> seem to have hit a snag.  I keep getting this error message:
>>> 
>>>    : xhost +
>>>    Xlib: connection to ":0.0" refused by server
>>>    Xlib: Client is not authorized to connect to Server
>>>    xhost:  unable to open display ":0.0"
>>> 
>>> after a while.  I can't open new windows after this.  It doesn't
>>> seem to be related to the number of windows.  It seems to be  
>>> more time related.
>>> 
>>> Sometimes this occurs within a few minutes but, it might take a 
>>> day?  I'm hoping someone knows of a patch, or a setting, that 
>>> will cure this problem.
>>> 
>>> I start X up with:
>>> 
>>>   xinit -bpp 32 -clients 1024
>>> 
>> 
>> Maybe the file
>> .Xauthority
>> in the user's home directory is missing or corrupted?
>> 
>> Corruption can happen due to diskspace problem.
> 
> My local disk is only 15% utilized (the max in any filesystem).
>  
>> The same thing happens when you have switched to a new user.
> 
> The .Xauthority file had no entries.  I added one.  Just have to
> wait now, it it doesn't recur in a week or so I'll consider it fixed.
> I didn't consider such things since it would always work for a while.
> A bad .Xauthority file should have started out bad from the get go
> ... no??  I'm wondering if exmh is doing something bad.  It likes
> to remove entries shown by xhost??
> 
> Thanks,
> Paul

Now I'm getting this:

   : xhost
   Xlib: connection to ":0.0" refused by server
   Xlib: Invalid MIT-MAGIC-COOKIE-1 key
   xhost:  unable to open display ":0.0"

Fixing .Xauthority file changes the error message alittle bit.

I'm baffled,
Paul
0
rockhead
1/29/2004 9:50:56 PM
Paul Newhouse wrote:
> I've installed 2.9 on a SunBlade 100.   I'm running twm and
> seem to have hit a snag.  I keep getting this error message:
> 
>    : xhost +
>    Xlib: connection to ":0.0" refused by server
>    Xlib: Client is not authorized to connect to Server
>    xhost:  unable to open display ":0.0"
> 
> after a while.  I can't open new windows after this.  It doesn't
> seem to be related to the number of windows.  It seems to be  
> more time related.
> 
> Sometimes this occurs within a few minutes but, it might take a 
> day?  I'm hoping someone knows of a patch, or a setting, that 
> will cure this problem.
> 
> I start X up with:
> 
>   xinit -bpp 32 -clients 1024
> 
> TIA,
> Paul
> 

Paul, I suspect that this will not help in the slightest, but why run 
Tom's (Antique) Window Manager? Do you have similar troubles if you run 
dtwm or the Bloated Gnome?

0
Beardy
1/30/2004 3:13:10 PM
In article <hyuSb.78$7j4.8894@wards.force9.net>,
	Beardy <beardy@beardy.net> writes:
> Paul Newhouse wrote:
>> I've installed 2.9 on a SunBlade 100.   I'm running twm and
>> seem to have hit a snag.  I keep getting this error message:
>> 
>>    : xhost +
>>    Xlib: connection to ":0.0" refused by server
>>    Xlib: Client is not authorized to connect to Server
>>    xhost:  unable to open display ":0.0"
>> 
>> after a while.  I can't open new windows after this.  It doesn't
>> seem to be related to the number of windows.  It seems to be  
>> more time related.
>> 
>> Sometimes this occurs within a few minutes but, it might take a 
>> day?  I'm hoping someone knows of a patch, or a setting, that 
>> will cure this problem.
>> 
>> I start X up with:
>> 
>>   xinit -bpp 32 -clients 1024
>> 
>> TIA,
>> Paul
>> 
> 
> Paul, I suspect that this will not help in the slightest, 

You are right, it hasn't helped at all.

> but why run Tom's (Antique) Window Manager? 

I like twm and run it on all my *ix boxes.  It's simple, lightweight 
and I don't have to keep translating my .twmrc file into other formats 
so I can have the same, or similar environments, as I hop between OSes
- i.e. habit.  I don't like the appearance of CDE/dtwm and it always 
seems quite sluggish to me.  That's probably a side effect of these
low end desktops, rather than CDE/dtwm.

> Do you have similar troubles if you run dtwm or the Bloated Gnome?

No idea.  I disabled both immediately on this 2.9 box.  I did not
have these problems on 2.7.  If I can't get a resolution to this 
soon I'm going to install Linux or NetBSD on this thing and move along.
I've never seen this problem before on any platform.

I do appreciate the suggestions so far, but they don't seem to be
the problem.

Still baffled,
Paul
0
rockhead
1/30/2004 4:23:08 PM
newhouse at rockhead dot com writes in comp.unix.solaris:
|In article <bvbknf$18di$1@agate.berkeley.edu>,
|	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
|> newhouse at rockhead dot com writes in comp.unix.solaris:
|>|I've installed 2.9 on a SunBlade 100.   I'm running twm and
|>|seem to have hit a snag.  I keep getting this error message:
|>|
|>|   : xhost +
|>|   Xlib: connection to ":0.0" refused by server
|>|   Xlib: Client is not authorized to connect to Server
|>|   xhost:  unable to open display ":0.0"
|>|
|>|after a while.  I can't open new windows after this.  It doesn't
|>|seem to be related to the number of windows.  It seems to be  
|>|more time related.
|> 
|> Do you have a cron job removing files in /tmp?  If so, make sure it
|> doesn't touch anything in /tmp/.X11-* or you will see exactly this
|> problem.
|
|Doesn't look like there is anything cleaning up like that.

When this happens, do the files /tmp/.X11-unix/X0 and /tmp/.X11-pipe/X0
still exist and are they world writable?  Are there any errors in 
/var/dt/Xerrors ?

-- 
________________________________________________________________________
Alan Coopersmith                              alanc@alum.calberkeley.org
http://www.CSUA.Berkeley.EDU/~alanc/       aka: Alan.Coopersmith@Sun.COM
  Working for, but definitely not speaking for, Sun Microsystems, Inc.
0
Alan
1/30/2004 5:12:53 PM
In article <bve3al$1vaa$1@agate.berkeley.edu>,
	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
> newhouse at rockhead dot com writes in comp.unix.solaris:
>|In article <bvbknf$18di$1@agate.berkeley.edu>,
>|	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
>|> newhouse at rockhead dot com writes in comp.unix.solaris:
>|>|I've installed 2.9 on a SunBlade 100.   I'm running twm and
>|>|seem to have hit a snag.  I keep getting this error message:
>|>|
>|>|   : xhost +
>|>|   Xlib: connection to ":0.0" refused by server
>|>|   Xlib: Client is not authorized to connect to Server
>|>|   xhost:  unable to open display ":0.0"
>|>|
>|>|after a while.  I can't open new windows after this.  It doesn't
>|>|seem to be related to the number of windows.  It seems to be  
>|>|more time related.
>|> 
>|> Do you have a cron job removing files in /tmp?  If so, make sure it
>|> doesn't touch anything in /tmp/.X11-* or you will see exactly this
>|> problem.
>|
>|Doesn't look like there is anything cleaning up like that.
> 
> When this happens, do the files /tmp/.X11-unix/X0 and /tmp/.X11-pipe/X0
> still exist and are they world writable?  

Yes:


: xhost
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xhost:  unable to open display ":0.0"

: ps -eal|more
 F S   UID   PID  PPID  C PRI NI     ADDR     SZ    WCHAN TTY      TIME CMD
: ps -eal|grep twm
 8 S  3195   584   583  0  40 20        ?    458        ? console  0:01 twm
: ps -eal|grep twm
 8 S  3195   584   583  0  40 20        ?    458        ? console  0:01 twm

before: ls -ld /tmp/.X* /tmp/.X*/*
drwxrwxr-x   2 pimin    root         176 Jan 30 09:14 /tmp/.X11-pipe
prw-rw-rw-   1 pimin    root           0 Jan 30 09:14 /tmp/.X11-pipe/X0
drwxrwxr-x   2 pimin    root         176 Jan 30 09:14 /tmp/.X11-unix
srwxrwxrwx   1 pimin    root           0 Jan 30 09:14 /tmp/.X11-unix/X0

after: ls -ld /tmp/.X* /tmp/.X*/*
drwxrwxr-x   2 pimin    root         176 Jan 30 09:14 /tmp/.X11-pipe
prw-rw-rw-   1 pimin    root           0 Jan 30 09:14 /tmp/.X11-pipe/X0
drwxrwxr-x   2 pimin    root         176 Jan 30 09:14 /tmp/.X11-unix
srwxrwxrwx   1 pimin    root           0 Jan 30 09:14 /tmp/.X11-unix/X0

> Are there any errors in  /var/dt/Xerrors ?

No, but I'm running twm not dtwm so would twm write to that file?

I'm trapping the twm stderr & stdout, I see a lot of this:

BgRegister X server insecure (must use xauth-style authorization); command ignored
BgRegister X server insecure (must use xauth-style authorization); command ignored
BgRegister X server insecure (must use xauth-style authorization); command ignored
BgRegister X server insecure (must use xauth-style authorization); command ignored
BgRegister X server insecure (must use xauth-style authorization); command ignored
exmh-bg cannot rendez-vous with UI - exiting.
  Usually this is because Tk send is not working.
  Check the notes under Frequently Asked Questions #4a and #4b.
  You can find this under the Help menu.

this is exmh.  I saw lots of this on 2.7 as well.  I'm connected to a
mail machine over a ppp connection tunneled through ssh.  Exmh is 
executing on the other end and displaying on the 2.9 machine (just like
it did on the 2.7 machine).

Still baffled,
Paul
0
rockhead
1/30/2004 8:18:47 PM
In article <bve3al$1vaa$1@agate.berkeley.edu>,
	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
> newhouse at rockhead dot com writes in comp.unix.solaris:
>|In article <bvbknf$18di$1@agate.berkeley.edu>,
>|	Alan Coopersmith <alanc@alum.calberkeley.org> writes:
>|> newhouse at rockhead dot com writes in comp.unix.solaris:
>|>|I've installed 2.9 on a SunBlade 100.   I'm running twm and
>|>|seem to have hit a snag.  I keep getting this error message:
>|>|
>|>|   : xhost +
>|>|   Xlib: connection to ":0.0" refused by server
>|>|   Xlib: Client is not authorized to connect to Server
>|>|   xhost:  unable to open display ":0.0"
>|>|
>|>|after a while.  I can't open new windows after this.  It doesn't
>|>|seem to be related to the number of windows.  It seems to be  
>|>|more time related.
>|> 
>|> Do you have a cron job removing files in /tmp?  If so, make sure it
>|> doesn't touch anything in /tmp/.X11-* or you will see exactly this
>|> problem.
>|
>|Doesn't look like there is anything cleaning up like that.
> 
> When this happens, do the files /tmp/.X11-unix/X0 and /tmp/.X11-pipe/X0
> still exist and are they world writable?  Are there any errors in 
> /var/dt/Xerrors ?

Ok, for those who are interested.  It appears that in Sol 2.9 once the
local display is removed from the xhost/access list it cannot be added 
back and you cannot change the xhost list at all (probably not saying 
that quite right).

I noticed that my local copy of exmh (not the one displaying from a 
remote system) likes to go through and remove entries.  This is a 
"security feature".  This feature has been doing the same thing on
2.7 as well as NetBSD 1.5, and forward, BUT 2.9 apparently reacts
a little differently and locks out changes to the access list once
the LOCAL host is removed ... which exmh does eventually, when in the
insecure mode.

I am now starting xdm and this changes the behavior.  Exmh doesn't
do the removals anymore since it thinks the system is now secure
(apparently??).  And the problem doesn't seem to occur anymore.

Unfortunately, a new oddity has appeared.  Now, post will not post 
mail for exmh, declaring "Polite people say HELO first".  I have no 
idea how, or why, these two things are coupled but, they apparently
are?  2.9 is giving me a headache like I haven't had in quite some 
time.

Paul
0
rockhead
2/5/2004 4:49:06 PM
Reply: