Quantcast

Port Assignment

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Port Assignment

John H
Hey all.  Having issues with TCP port binding on the server from client.  Some quick specs:

Client:  Mac 10.9.5 running NoMachine v4.3.30
Server:  FreeNX version 0.7.3-6.el5.centos
NX Agent 3.4.0

When attempting to connect to one of our FreeNX servers, we're seeing the following output:

-----Begin Paste-----
Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Agent running with pid '2596'.
Session: Starting session at 'Wed Mar 11 17:21:38 2015'.
Info: Proxy running in server mode with pid '2596'.
Error: Call to bind failed for TCP port 35022. Error is 98 'Address already in use'.
Error: Aborting session with 'Unable to open display 'nx/nx,options=/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60/options:31022''.
Session: Aborting session at 'Wed Mar 11 17:21:38 2015'.
Session: Session aborted at 'Wed Mar 11 17:21:38 2015'.
NX> 1006 Session status: closed
NX> 596 Session startup failed.
rm: cannot remove `/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60//.nfs00000000f0ccece1000002a3': Device or resource busy
NX> 1001 Bye.
Info: Closing connection to slave with pid 1979.
Info: Closing connection to slave with pid 1979.
-- NX SERVER START: -c /usr/bin/nxserver - ORIG_COMMAND=
-- NX SERVER START:  - ORIG_COMMAND=
Info: Using fds #4 and #3 for communication with nxnode.
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 105 hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: testuser
NX> 102 Password:
NX> 103 Welcome to: blade015 user: testuser
NX> 105 listsession --status="suspended,running" --type="shadow"
NX> 127 Sessions list of user 'testuser' for reconnect:

Display Type             Session ID                       Options  Depth Screen         Status      Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


NX> 148 Server capacity: not reached for user: testuser
NX> 105 startsession --link="adsl" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" --composite="1" --media="0" --render="1" --session="blade015" --type="unix-gnome" --geometry="830x525" --keyboard="pc105/us" --client="macosx" --screeninfo="830x525x24+render"

NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 700 Session id: blade015-31022-652636BB5741BBDE55624B8D12FF22DF
NX> 705 Session display: 31022
NX> 703 Session type: unix-gnome
NX> 701 Proxy cookie: 24c502ef2ec1281600e73fae76372332
NX> 702 Proxy IP: 192.168.1.115
NX> 706 Agent cookie: 24c502ef2ec1281600e73fae76372332
NX> 704 Session cache: unix-gnome
NX> 707 SSL tunneling: 1
NX> 1009 Session status: starting
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/users/jkholmes/.nx/F-C-blade015-31022-652636BB5741BBDE55624B8D12FF22DF/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
NX> 105
NXAGENT - Version 3.4.0
-----End Paste-----


I've seen this discussed in previous threads here:
http://marc.info/?l=freenx-knx&m=138442658819979&w=2

Checking port 35022 reveals that it's in use by LDAP, bound to a different user on that NX server.  So, we're trying to figure out the best way to change the port, either from the client or the server, that would result in a successful login.  Currently, the symptoms are, double-click connection name from NoMachine app, it requests password, password success, requests session type (Gnome, KDE, etc) and once that session type is selected, it hangs at "Creating session".  I've tried going into the testuser's ~/.nx/config/blade015.nxs and changing the NoMachine daemon port from 4000 to 4001, but that doesn't seem to have the intended effect as, after having saved the change, then closing and re-opening the NoMachine client to reconnect changes that value back to 4000.  I can't change the server variable "DISPLAY_BASE=" because others are connected to it, but I feel pretty confident that if/when their connection is dropped, they'll be faced with the same issues as our testuser.  BTW, testuser was simply to recreate the problem another user is having which is exactly the same output from the /var/log/nx/nxserver.log file for testuser.

Regards,
lmind

________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/

________________________________________________________________
       FreeNX-kNX mailing list --- [hidden email]
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Port Assignment

ChrisB-6



John H <[hidden email]>
Sent by: "FreeNX-kNX" <[hidden email]>

11/03/2015 22:33

Please respond to
User Support for FreeNX Server and kNX Client <[hidden email]>

To
[hidden email]
cc
Subject
[FreeNX-kNX] Port Assignment





Hey all.  Having issues with TCP port binding on the server from client.  Some quick specs:

Client:  Mac 10.9.5 running NoMachine v4.3.30
Server:  FreeNX version 0.7.3-6.el5.centos

NX Agent 3.4.0

When attempting to connect to one of our FreeNX servers, we're seeing the following output:

-----Begin Paste-----
Copyright (C) 2001, 2010 NoMachine.
See
http://www.nomachine.com/ for more information.

Info: Agent running with pid '2596'.
Session: Starting session at 'Wed Mar 11 17:21:38 2015'.
Info: Proxy running in server mode with pid '2596'.
Error: Call to bind failed for TCP port 35022. Error is 98 'Address already in use'.
Error: Aborting session with 'Unable to open display 'nx/nx,options=/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60/options:31022''.
Session: Aborting session at 'Wed Mar 11 17:21:38 2015'.
Session: Session aborted at 'Wed Mar 11 17:21:38 2015'.
NX> 1006 Session status: closed
NX> 596 Session startup failed.
rm: cannot remove `/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60//.nfs00000000f0ccece1000002a3': Device or resource busy
NX> 1001 Bye.
Info: Closing connection to slave with pid 1979.
Info: Closing connection to slave with pid 1979.
-- NX SERVER START: -c /usr/bin/nxserver - ORIG_COMMAND=
-- NX SERVER START:  - ORIG_COMMAND=
Info: Using fds #4 and #3 for communication with nxnode.
HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 105 hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: testuser
NX> 102 Password:
NX> 103 Welcome to: blade015 user: testuser
NX> 105 listsession --status="suspended,running" --type="shadow"
NX> 127 Sessions list of user 'testuser' for reconnect:

Display Type             Session ID                       Options  Depth Screen         Status      Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


NX> 148 Server capacity: not reached for user: testuser
NX> 105 startsession --link="adsl" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" --composite="1" --media="0" --render="1" --session="blade015" --type="unix-gnome" --geometry="830x525" --keyboard="pc105/us" --client="macosx" --screeninfo="830x525x24+render"

NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: not detected)
NX> 700 Session id: blade015-31022-652636BB5741BBDE55624B8D12FF22DF
NX> 705 Session display: 31022
NX> 703 Session type: unix-gnome
NX> 701 Proxy cookie: 24c502ef2ec1281600e73fae76372332
NX> 702 Proxy IP: 192.168.1.115
NX> 706 Agent cookie: 24c502ef2ec1281600e73fae76372332
NX> 704 Session cache: unix-gnome
NX> 707 SSL tunneling: 1
NX> 1009 Session status: starting
NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/users/jkholmes/.nx/F-C-blade015-31022-652636BB5741BBDE55624B8D12FF22DF/session". You might also want to try: ssh -X myserver; /usr/bin/nxnode --agent to test the basic functionality. Session log follows:
NX> 105
NXAGENT - Version 3.4.0

-----End Paste-----


I've seen this discussed in previous threads here:

http://marc.info/?l=freenx-knx&m=138442658819979&w=2

Checking port 35022 reveals that it's in use by LDAP, bound to a different user on that NX server.  So, we're trying to figure out the best way to change the port, either from the client or the server, that would result in a successful login.  Currently, the symptoms are, double-click connection name from NoMachine app, it requests password, password success, requests session type (Gnome, KDE, etc) and once that session type is selected, it hangs at "Creating session".  I've tried going into the testuser's ~/.nx/config/blade015.nxs and changing the NoMachine daemon port from 4000 to 4001, but that doesn't seem to have the intended effect as, after having saved the change, then closing and re-opening the NoMachine client to reconnect changes that value back to 4000.  I can't change the server variable "DISPLAY_BASE=" because others are connected to it, but I feel pretty confident that if/when their connection is dropped, they'll be faced with the same issues as our testuser.  BTW, testuser was simply to recreate the problem another user is having which is exactly the same output from the /var/log/nx/nxserver.log file for testuser.

Regards,
lmind________________________________________________________________
    Were you helped on this list with your FreeNX problem?
   Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

        Don't forget to check the NX Knowledge Base:
               
http://www.nomachine.com/kb/

________________________________________________________________
      FreeNX-kNX mailing list --- [hidden email]
     
https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________


________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/

________________________________________________________________
       FreeNX-kNX mailing list --- [hidden email]
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Port Assignment

ChrisB-6
In reply to this post by John H

John H <[hidden email]> Sent by: "FreeNX-kNX" <[hidden email]> 11/03/2015 22:33 Please respond to User Support for FreeNX Server and kNX Client <[hidden email]>


Hey all.  Having issues with TCP port binding on the server from client. 

<SNIP>

Error: Call to bind failed for TCP port 35022. Error is 98 'Address already in use'.
Error: Aborting session with 'Unable to open display 'nx/nx,options=/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60/options:31022''.

I've seen this discussed in previous threads here:

http://marc.info/?l=freenx-knx&m=138442658819979&w=2

YUP

Checking port 35022 reveals that it's in use by LDAP, bound to a different user on that NX server.

YUP - and of course something has to give somewhere


So, we're trying to figure out the best way to change the port, either from the client or the server, that would result in a successful login.
Currently, the symptoms are, double-click connection name from NoMachine app, it requests password, password success, requests session type (Gnome, KDE, etc) and once that session type is selected, it hangs at "Creating session". 
I've tried going into the testuser's ~/.nx/config/blade015.nxs and changing the NoMachine daemon port from 4000 to 4001, but that doesn't seem to have the intended effect as, after having saved the change, then closing and re-opening the NoMachine client to reconnect changes that value back to 4000. 
I can't change the server variable "DISPLAY_BASE=" because others are connected to it, but I feel pretty confident that if/when their connection is dropped, they'll be faced with the same issues as our testuser. 

Sounds like you have the 6000 4000 bug in nxserver.

 Can you see:-

                        # Check if there is already an agent running on that display on that host
                        let AGENT_DISPLAY=$SESS_DISPLAY+6000
somewhere near line No. 1450 in

                 /usr/bin/nxserver

If you do, try setting

                let AGENT_DISPLAY=$SESS_DISPLAY+4000

and see if that fixes it ( by skipping over any used ports)

 Please let us know if it works before/after
so
Akemi can update it ( if he's still around and can be bothered )


NOTA BENE  this ** WONT**  stop the reverse problem occuring if someone has decided to grab 35022 all the time and finds it's used by FreeNX   !!!!


Mostly no one's sessions run into anything else because the default is 1000 or 2000 3000 etc if you have several FreeNX servers not 35000 or so which you seem to have set.



NOTES
------------

The
        DISPLAY_BASE=

 FreeNX server parameter sets the base number or starting value for that FreeNX server, from which the connecting users are allocated in turn, one at a time a

         "session display base"

from which various display/port values are calculated by adding a value hard wired into the code

eg in original nxserver


SESS_DISPLAY=$DISPLAY_BASE                # used for apps ie the  session env $DISPLAY
let PROXY_DISPLAY=$SESS_DISPLAY+4000        # the one you're (probably) having problems with

let AGENT_DISPLAY=$SESS_DISPLAY+6000        # bug should be 4000
let SAMBA_DISPLAY=$SESS_DISPLAY+3000
let MEDIA_DISPLAY=$SESS_DISPLAY+7000
let CUPS_DISPLAY=$SESS_DISPLAY+9000        # bug should be 9090 see below

The four above are part of session set-up test code, only used to see if the ports are free - if not then a new SESS_DISPLAY++ is tried

see in nxnode where it all actually happens

let ESPEAKER=$display+7000
let NXSAMBA_PORT=$display+3000
let NODE_CUPSD_PORT=$display+9090        # should be same as above



In this instance your server's DISPLAY_BASE  is set to something near the 31022 - maybe 31000 with 21 users already connected from which 4000 is added to give the 35022

You might be safer going back to 2000 to keep away from anything else in user-land

 NOTE you CAN change the display base because it won't affect any RUNNING sessions. You are probably best advised not to restart the "service" tho




"Strangely", this "session display base" number is handed over to the nx client  which then uses this same number for its X server ( or client in normal speak)
and then builds its connection parameter string to send to the server, requesting the value the server just passed over . . . . hence you can't change anything via the client . . .

This of course meant if you were connecting to several FreeNX servers at the same time, you might find that you got the same number from more that one of them, which the client can't accept,
which was the subject of the 2013 forum message you mention, referring to the work-around advisory from back in 2008, applicable to simultaneous multiple FreeNX sever connections


Good luck anyway

cb



________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/

________________________________________________________________
       FreeNX-kNX mailing list --- [hidden email]
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Port Assignment

Akemi Yagi
On Thu, Mar 12, 2015 at 7:15 AM,  <[hidden email]> wrote:

>                 let AGENT_DISPLAY=$SESS_DISPLAY+4000
>
> and see if that fixes it ( by skipping over any used ports)
>
>  Please let us know if it works before/after
> so
> Akemi can update it ( if he's still around and can be bothered )

I'm around, just less active. :)

Akemi
________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/

________________________________________________________________
       FreeNX-kNX mailing list --- [hidden email]
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Port Assignment

ChrisB-6

"FreeNX-kNX" <[hidden email]> wrote on 12/03/2015 14:25:50:

> On Thu, Mar 12, 2015 at 7:15 AM,  <[hidden email]> wrote:
>
> >                 let AGENT_DISPLAY=$SESS_DISPLAY+4000
> >
> > and see if that fixes it ( by skipping over any used ports)
> >
> >  Please let us know if it works before/after
> > so
> > Akemi can update it ( if he's still around and can be bothered )
>
> I'm around, just less active. :)
>
> Akemi


Hi Akemi, nice to hear you're still with us  . . .

Just had another look through wth relevant code . . .

This OP's potential for running into problem will be a bit worse when he has his FreeNX machine configured for ports in user-land because:-

The code just looks for an open LISTENER on each port
         - so gets tripped up by source ports which are in use (but not listening)
because
it is used by the load balancer;
         so in that senario it will be checking for free ports on other machines,
         which it can only do by attempting a connection

So in both local and load balance senarios the server needs to keep away from source ports which I guess is his fix.

Above is still a bug tho I think.

Well see what the OP says when he's had time to look at it . . . .

chris

________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ

         Don't forget to check the NX Knowledge Base:
                 http://www.nomachine.com/kb/

________________________________________________________________
       FreeNX-kNX mailing list --- [hidden email]
      https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________
Loading...