Bug 216802 - Client crashes when attempting connection of "Enable multimedia support" checked
Client crashes when attempting connection of "Enable multimedia support" che...
Product: Fedora
Classification: Fedora
Component: freenx-server (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Axel Thimm
Fedora Extras Quality Assurance
: 219064 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-11-21 20:08 EST by Need Real Name
Modified: 2008-08-16 09:42 EDT (History)
1 user (show)

See Also:
Fixed In Version: 0.7.1-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-08-16 09:42:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Diffs to get file sharing, printer sharing, and multimedia to work (10.48 KB, patch)
2007-12-30 16:37 EST, Need Real Name
no flags Details | Diff

  None (edit)
Description Need Real Name 2006-11-21 20:08:35 EST
Description of problem:
I have been able to configure successfully nx-2.1.0/freenx-0.5.0 under
FC6/Linux 2.6.18 using the Nomachine Windows and Linux

However, if I check the client configuration option (under Services)
"Enable multimedia support", then the connection authenticates
completes, negotiates link parameters but then returns "Session
'Remote' failed" and the error message:
         The connection with the remote server was shut down.
         Please check the state of your network connection."

The session log file under ~/.nx/XXXXXX/session shows the following:
Info: Agent running with pid '4374'.
Session: Starting session at 'Tue Nov 21 18:49:06 2006'.
Info: Proxy running in server mode with pid '4374'.
Info: Waiting for connection from '' on port '5000'.
Info: Accepted connection from '' with port '36093'.
Info: Connection with remote proxy established.
Info: Synchronizing local and remote caches.
Info: Handshaking with remote proxy completed.
Error: Call to bind failed for media TCP port 8000. Error is 98 'Address already
in use'.

Fatal server error:
Error: Unable to open display

gnome-session: Fatal IO error 104 (Connection reset by peer) on X server

Version-Release number of selected component (if applicable):

The problem is that nxagent wants to bind to TCP port 8000 for the
media streaming while this port is already in use by nasd (Network
Audio System server). This conflict causes the crash

(note: strangely nxagent tries to bind to $display + 7000  independent of the l\
ine ESPEAKER=$display+7000 in /usr/bin/nxnode -- i.e. the binding is still
attempted even if this line is commented out)

The solution is to set up a /etc/nxserver/node.conf file with the
(actually many other values can of course be used for DISPLAY_BASE)

I would suggest that instead of putting the config in
/etc/nxserver/node.conf.sample, that the rpm set up an actual
/etc/nxserver/node.conf config file with DISPLAY_BASE set as above.

Also, as an aside, interestingly somehow, nxnode know to use 'esd'
even if you explicitly set ENABLE_ESD_PRELOAD="0" in the node.conf
config file.

How reproducible:

Steps to Reproduce:
1. Install nx/freenx rpms on FC6
2. Install nomachine client on windoze or linux
3. Enable multimedia support
Actual results:
Crash as above

Expected results:

Additional info:
Comment 1 Axel Thimm 2007-05-19 10:24:02 EDT
This is a collective bugzilla comment for nx/freenx bugs.

New versions of nx and freenx have entered the repos. Please check if the bug
report is still valid with the new versions (freenx-0.6.0-12 and nx-2.1.0-19).
Comment 2 Axel Thimm 2007-12-28 18:37:41 EST
This is a collective bugzilla comment for nx/freenx bugs.

Some time ago these bugs were probably dealt with by new versions as mentioned
in the previous comment. If these updates fixed the bug, please close as fixed,
otherwise please comment on the open issues. Thanks!

(if no comments are made for another week I will assume that the bug is "fixed")
Comment 3 Need Real Name 2007-12-29 17:37:33 EST
Well some have been fixed and others haven't. In fact, I have submitted several
patches directly to Fabian which he has already incorporated in the latest
versions and others are awaiting his review.

In summary, the problems with multimedia and printing fall into several buckets.
1. Bugs that have been fixed in the latest release either due to patches I
submitted or to fixes by Fabian and his team. These by definition are resolved
and merit no further discussion.

2. Issues that are due to problems outside of freenx and that therefore have no
clean solution. There is really only one item here and it has to do with the
fact that cups/samba doesn't play nicely when smb port is set to 445 rather than
139. The result is that with Fedora (which uses mount.cifs and port 445), it is
impossible to get both printing and file share mounting working simultaneously.
I have developed a manual "kluge" that works by setting up a parallel ssh-tunnel
over another port. Fabian is aware of this problem and is working with the
smb/cups folks for a long-term fix and also will likely implement his own kluge
(using a LD_PRELOAD wrapper) in the next release.

3. Items that are still broken in the latest freenx release and should be fixed
upstream. I have submitted bug reports and patches to Fabian and hopefully they
will be addressed.

4. Items that are broken only in the Fedora implementation due to both invalid
executable path names and port conflicts. I have submitted bug reports and
patches to Fedora bugzilla on this.

So, in summary, 
- The fedora freenx rpm does not work properly out-of-the-box for printer/file
sharing or probably even for multimedia (due to sound port conflict with NAS).
- Since few if any others have been reporting these bugs, I can only think that
few people are even trying to use this functionality
- I have a fully patched that gets all of the above working properly (plus some
additional enhancements to the CUPS configuration) with the caveat that
out-of-the-box you can only have *either* printer or file sharing working at
once unless you use the kluge of manually setting up a parallel ssh-tunnel for
file sharing.
- If you want, I can share my diffs with you for inclusion in a patched Fedora rpm.
Comment 4 Need Real Name 2007-12-29 17:38:31 EST
One more point, you might want to move this note to F8 since my summary of the
current situation applies to the latest F8 version.
Comment 5 Axel Thimm 2007-12-30 03:56:39 EST
Yes, I'd be interested in all your patching, thanks a lot!

Wrt to whether to enable printing or file sharing: AFAIU the current default is
to have neither, having at least one of them working out of the box would be
better than that. :)

I'm not sure which one would be the most used feature, as I use neither, just
use the one you consider better for the average user (although these are more
average power users). We could have a /usr/share/doc/freenx-*/README.RPM
explaining how to activate the other one with ssh tunneling.
Comment 6 Axel Thimm 2007-12-30 07:23:19 EST
BTW looks like this bug and bug #219064 are about the same thing, do you think
we should merge them into one and? If so should be continue on this one or the
other one?
Comment 7 Need Real Name 2007-12-30 10:23:31 EST
Feel free to merge... bug 219064 was back from FC6. This is more current from
FC8 but also doesn't include a list of other bugs that I have found (and fixed).
In any case I will post patches here.
Comment 8 Need Real Name 2007-12-30 16:37:12 EST
Created attachment 290559 [details]
Diffs to get file sharing, printer sharing, and multimedia to work
Comment 9 Need Real Name 2007-12-30 16:39:24 EST
I spent some time today cleaning up my patches and documenting the changes.
Rather  than writing a full README, I put some detailed comments in
nxloadconfig. Note that anything set in nxloadconfig can also be overwritten in
/etc/nxserver/node.conf (which is probably the best place for user changes).

The following include all the diffs from my patches that have not yet been
included by Fabian in his upstream source.

The way I set it up, cifs file sharing (i.e. mounting of remote client samba
shares using mount.cifs) will work by default. 
If you want to do printing *instead* of file-sharing, then you should change
If you want to do both cifs file sharing and printer sharing, then all you need
to do is set up a ssh tunnel on the client with the following port-forwarding
  -R <DISPLAY+SMBPORT_OFFSET>:<client name>:139

I have preset DISPLAY_BASE=2000 and SMBPORT_OFFSET=8000. So if you have just one
nx connection the tunnel will be -R 13001:<client name>:139

Note that in all cases you access the remote client cups printer itself from the
server using port DISPLAY+9000. In most simple cases, this will be port 11001
(-h localhost:11001 from the command line or http://localhost:11001 from the
CUPS web browser.

Also multimedia is now "fixed" by changing DISPLAY_BASE to avoid conflicts with


Note the patch above is applied from /usr/libexec
Comment 10 Axel Thimm 2007-12-31 05:40:31 EST
*** Bug 219064 has been marked as a duplicate of this bug. ***
Comment 11 Axel Thimm 2007-12-31 06:20:40 EST
This bug has been addressed in the latest freenx build in rawhide (0.7.1-4.fc9):

- Apply Jeffrey J. Kosowsky's patches to enable multimedia and
  file/print sharing support (Fedora bug #216802).
- Silence %%post output, when openssh's server has never been started
  before (Fedora bug #235592).
- Add dependency on which (Fedora bug #250343).

Please test whether the reported bug is fixed, so it can be backpackaged to F8
and F7, thank you!

 (the build will soon show up in rawhide, or use
  http://koji.fedoraproject.org/koji/buildinfo?buildID=29532, if you want to get
  there earlier)
Comment 12 Axel Thimm 2008-04-24 04:37:51 EDT
freenx has been split into freenx-server and freenx-client. Most open bugs for
freenx addressed parts of the current freenx-server package. See also bug #438660.

freenx-server is currently in testing repos. Please give it a try as it will
soon replace the freenx package.

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