Error is 11 ‘Resource temporarily unavailable’

Forum / NoMachine Terminal Server Products / Error is 11 ‘Resource temporarily unavailable’

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24369
    yulina
    Participant

    I tried NoMachine Terminal server evaluation product, and encountered an issue, when the session connection reached ~180 (check with “nxserver –list” command), no new connection can be created to the NX server , and the error shows in the nxd.log file:

    Warning: Handler process 5302 exited with code 1, ‘Operation not permitted’.

    Info: Connection from 10.114.203.36 port 49537 process 5302 closed on Thu Nov  7 14:52:38 2019.

    Info: Connection from 10.114.203.54 port 56145 accepted on Thu Nov  7 14:53:11 2019.

    Info: Connection from 10.114.203.54 port 56145 process 5317 started on Thu Nov  7 14:53:11 2019.

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    42322 42322 14:53:15 334.764 Thread: ERROR! Thread creation failed.

    42322 42322 14:53:15 334.850 Thread: ERROR! Error is 11 ‘Resource temporarily unavailable’.

    42322 42322 14:53:15 334.873 Scheduler/Scheduler: ERROR! Failed to create the slave thread.

    Error: Failed to create the slave thread.

    Info: Connection from 10.114.203.115 port 64491 accepted on Thu Nov  7 14:53:15 2019.

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: Resource temporarily unavailable

    Error: User nx not found.

    Warning: Handler process 5317 exited with code 1, ‘Operation not permitted’.

    Info: Connection from 10.114.203.54 port 56145 process 5317 closed on Thu Nov  7 14:53:27 2019.

    Info: Connection from 10.114.203.36 port 49557 accepted on Thu Nov  7 14:53:46 2019.

    Info: Connection from 10.114.203.36 port 49557 process 5335 started on Thu Nov  7 14:53:46 2019.

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    /etc/NX/nxserver: fork: retry: Resource temporarily unavailable

    42322 42322 14:54:01 025.649 Thread: ERROR! Thread creation failed.

    42322 42322 14:54:01 025.732 Thread: ERROR! Error is 11 ‘Resource temporarily unavailable’.

    42322 42322 14:54:01 025.757 Scheduler/Scheduler: ERROR! Failed to create the slave thread.

    Error: Failed to create the slave thread.

    Info: Connection from 10.114.203.115 port 64500 accepted on Thu Nov  7 14:54:01 2019.

    /etc/NX/nxserver: fork: Resource temporarily unavailable

    Error: User nx not found.

    Warning: Handler process 5335 exited with code 1, ‘Operation not permitted’.

    Info: Connection from 10.114.203.36 port 49557 process 5335 closed on Thu Nov  7 14:54:01 2019.

    And the server resource limit shows:

    root@icnx log]# ulimit -a

    core file size          (blocks, -c) 0

    data seg size           (kbytes, -d) unlimited

    scheduling priority             (-e) 0

    file size               (blocks, -f) unlimited

    pending signals                 (-i) 1032758

    max locked memory       (kbytes, -l) 64

    max memory size         (kbytes, -m) unlimited

    open files                      (-n) 1024

    pipe size            (512 bytes, -p) 8

    POSIX message queues     (bytes, -q) 819200

    real-time priority              (-r) 0

    stack size              (kbytes, -s) 10240

    cpu time               (seconds, -t) unlimited

    max user processes              (-u) 1032758

    virtual memory          (kbytes, -v) unlimited

    file locks                      (-x) unlimited

    I will really appreciate if anyone can help me about this issue,

    thanks

    #24398
    Gega
    Participant

    Hello,

    It looks like max user processes limit is reached for user nx, all nxserver processes are run with user “nx”. Your command shows limits for user root, so it doesn’t say much about limits for “nx” or any regular user.

    For the nx user it’s advisable to set ‘unlimited’:
    nx soft nproc unlimited
    nx hard nproc unlimited

    For more information please refer to: https://www.nomachine.com/AR04O00927

    #24412
    yulina
    Participant

    Hi Gega,

    Thanks for your reply.

    As common user, the system limit shows:

    ####################
    [yulina@icnx yp]$ limit
    cputime      unlimited
    filesize     unlimited
    datasize     unlimited
    stacksize    unlimited
    coredumpsize unlimited
    memoryuse    unlimited
    vmemoryuse   unlimited
    descriptors  4096
    memorylocked 64 kbytes
    maxproc      1032758

    ####################

    And the /etc/security/limits.conf as following shows:

    ####################
    [yulina@icnx yp]$ more /etc/security/limits.conf
    # /etc/security/limits.conf
    #
    #Each line describes a limit for a user in the form:
    #
    #<domain>        <type>  <item>  <value>
    #
    #Where:
    #<domain> can be:
    #        – a user name
    #        – a group name, with @group syntax
    #        – the wildcard *, for default entry
    #        – the wildcard %, can be also used with %group syntax,
    #                 for maxlogin limit
    #
    #<type> can have the two values:
    #        – “soft” for enforcing the soft limits
    #        – “hard” for enforcing hard limits
    #
    #<item> can be one of the following:
    #        – core – limits the core file size (KB)
    #        – data – max data size (KB)
    #        – fsize – maximum filesize (KB)
    #        – memlock – max locked-in-memory address space (KB)
    #        – nofile – max number of open file descriptors
    #        – rss – max resident set size (KB)
    #        – stack – max stack size (KB)
    #        – cpu – max CPU time (MIN)
    #        – nproc – max number of processes
    #        – as – address space limit (KB)
    #        – maxlogins – max number of logins for this user
    #        – maxsyslogins – max number of logins on the system
    #        – priority – the priority to run user process with
    #        – locks – max number of file locks the user can hold
    #        – sigpending – max number of pending signals
    #        – msgqueue – max memory used by POSIX message queues (bytes)
    #        – nice – max nice priority allowed to raise to values: [-20, 19]
    #        – rtprio – max realtime priority
    #
    #<domain>      <type>  <item>         <value>
    #

    #*               soft    core            0
    #*               hard    rss             10000
    #@student        hard    nproc           20
    #@faculty        soft    nproc           20
    #@faculty        hard    nproc           50
    #ftp             hard    nproc           0
    #@student        –       maxlogins       4

    # End of file

    ###################

    Also all the processes in the system totally 1444.

    [yulina@icnx yp]$ ps -ef|wc -l
    1444

    Why this error still came out, please help me,thanks.

     

     

    #24419
    Gega
    Participant

    Problem is caused by lack of resources, do you have enough RAM to run all that sessions? If yes please check also:
    cat /proc/sys/kernel/threads-max
    to see limit on the total number of processes on the system (threads)
    To list also threads you need to add L switch to your ps command. e.g:
    ps -efL | wc -l

    Usually this problem comes out because of limits, specifically “number of processes” limit or “virtual memory” limit. You’ve shown us limits for common user, but as we’ve said before we’re more interested in limits of user “nx”, since it looks like that might be causing this issues. Let’s check limits set for nxserver daemon, since this process is run as user “nx”, to do that firstly run:
    ps -ef | grep "nxserver.bin --daemon"
    Then copy pid of daemon and run:
    cat /proc/<pid>/limits

    If you see that nproc or virtual memory limit are set, than you should set new limits in limits.conf.
    nx soft nproc unlimited
    nx hard nproc unlimited
    nx hard as unlimited
    nx soft as unlimited

    #24444
    yulina
    Participant

    Hi Gega,

    I added the setting you mentioned about nx user in limits.conf,

    nx soft nproc unlimited
    nx hard nproc unlimited

    It works well now, thanks so much.

Viewing 5 posts - 1 through 5 (of 5 total)

This topic was marked as solved, you can't post.