Bug 648896 - "connect : Connection refused" messages when X forwarding but it still works
Summary: "connect : Connection refused" messages when X forwarding but it still works
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Jan F. Chadima
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 651413 651449 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-02 13:08 UTC by Paul Howarth
Modified: 2010-11-09 16:09 UTC (History)
8 users (show)

Fixed In Version: openssh-5.5p1-23.fc14.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-08 22:31:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Proposed fix (665 bytes, patch)
2010-11-05 15:56 UTC, Ian Collier
no flags Details | Diff

Description Paul Howarth 2010-11-02 13:08:52 UTC
Description of problem:
When using ssh -X/Y from a Fedora 14 box (to a Fedora 13 box in my case), I see error messages "connect : Connection refused" from time to time when running commands in the terminal. I noticed it when using mock but it does the same for simple applications like gnome-about too. The strange thing is, everything still works.

Version-Release number of selected component (if applicable):
openssh-5.5p1-22.fc14.2.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1. ssh -X or ssh -Y from a Fedora 14 box.
2. run gnome-about
  
Actual results:
$ gnome-about
connect : Connection refused
connect : Connection refused
connect : Connection refused
connect : Connection refused
(gnome-about window opens and functions as normal)
$ 

Expected results:
$ gnome-about
(gnome-about window opens and functions as normal)
$ 

Additional info:
Also noticed elsewhere:
http://compgroups.net/comp.os.linux.misc/Fedora-14-ssh-problem

Comment 1 Ian Collier 2010-11-05 15:27:56 UTC
An strace shows that in trying to set up an X11 connection, the ssh client does:

socket(PF_FILE, SOCK_STREAM, 0)         = 7
connect(7, {sa_family=AF_FILE, path=@"/tmp/.X11-unix/X0"}, 110) = -1 ECONNREFUSED
close(7)                                = 0
write(2, "connect : Connection refused\r\n", 30) = 30
socket(PF_FILE, SOCK_STREAM, 0)         = 7
connect(7, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 110) = 0

Google tells me that the at-sign in the first connection attempt means that the path is an abstract socket, signified by adding a NUL byte to the beginning of the name.  And the reason why it fails is because the length value in the third argument to connect must be just enough to cover the abstract socket name and no more - the socket name is not NUL-terminated as it is in the case of a non-abstract socket.

Comment 2 Ian Collier 2010-11-05 15:56:53 UTC
Created attachment 458132 [details]
Proposed fix

Looking at the source of openssh I notice that this is a Fedora patch (openssh-5.5p1-x11.patch) which wasn't quite implemented correctly.

The fix is fairly trivial.  The attached patch applied after x11.patch fixes the issue (but I guess in the release should be merged into x11.patch).

Comment 3 Fedora Update System 2010-11-05 17:23:39 UTC
openssh-5.5p1-23.fc14.2 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/openssh-5.5p1-23.fc14.2

Comment 4 Fedora Update System 2010-11-06 23:42:00 UTC
openssh-5.5p1-23.fc14.2 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update openssh'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/openssh-5.5p1-23.fc14.2

Comment 5 Fedora Update System 2010-11-08 22:31:54 UTC
openssh-5.5p1-23.fc14.2 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Tom Horsley 2010-11-09 15:05:33 UTC
*** Bug 651413 has been marked as a duplicate of this bug. ***

Comment 7 Tomas Mraz 2010-11-09 16:09:43 UTC
*** Bug 651449 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.