Unable to start the server in a chroot environment

Forum / NoMachine for Linux / Unable to start the server in a chroot environment

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #25655
    lewinator56
    Participant

    I am unable to start the nxserver in a chroot environment running alongside an Android system

    Arm64
    Ubuntu 18.04 (chroot)
    Kernel version 4.9.112

    the output when running nxserver –restart is:

    NX> 162 Service: nxserver already disabled
    NX> 162 Service: nxnode already disabled
    NX> 162 Service: nxd already disabled

    NX> 162 Disabled: service nxserver
    NX> 162 Disabled: service nxnode
    NX> 162 Disabled: service nxd

     

    So I went and looked at the logs, it seems that it can’t open the listening port for the server, this is the nxserver.log first few lines (those after are repeats):

    2020-02-15 21:01:58 756.704 10980 NXSERVER WARNING! Cannot open port ‘30000’ to listen: 13, Permission denied
    2020-02-15 21:01:58 756.704 10980 NXSERVER WARNING! Cannot start listening on server daemon socket
    2020-02-15 21:01:58 756.704 10980 NXSERVER WARNING! libnxh::NXConnectLocal cannot connect to localhost:30000: connection refused from NXClientSystemDaemons::openConnection
    2020-02-15 21:01:58 756.704 10980 NXSERVER Previous message repeated 19 times

    2020-02-15 21:01:58 756.704 10980 NXSERVER ERROR! Cannot connect to server on port 30000
    2020-02-15 21:01:58 756.704 10980 NXSERVER ERROR! cannot connect to nxserver –daemon
    2020-02-15 21:01:58 756.704 10980 NXSERVER WARNING! Cannot establish communication with nxserver –daemon
    2020-02-15 21:01:58 756.704 10980 NXSERVER Shutting down NoMachine server and services

     

    #25853
    Mth
    Contributor

    Hello

    The problem indeed is that the nxserver cannot open any socket to listen on. It should not be the fault on the NoMachine side,
    at least not in normal circumstances. You should be able to find more clues in nxerror.log file – if the system reports a reason,
    or in the operating system logs.

    Please check if there is any clue to this within the Ubuntu logs, or the parent system logs – most probably it is because of how the chrooted system is set up, the parent OS is blocking any attempts to open a socket.

    If there is nothing wrong in the system logs, please elaborate more about the system setup and how did you exactly set up the chroot environment.

    We may need to reproduce the problem to handle it.

    /Mth

    #25859
    lewinator56
    Participant

    so, i checked nxerror.log and its effectively the same as nxserver.log:

     

    20292 20292 10:56:21 870.199 Socket: WARNING! Can’t create the IPv4 socket.

    20292 20292 10:56:21 878.682 Socket: WARNING! Error is 13 ‘Permission denied’.

    20292 20292 10:56:21 878.737 Socket: WARNING! Can’t create the IPv6 socket.

    20292 20292 10:56:21 878.745 Socket: WARNING! Error is 13 ‘Permission denied’.

    20292 20292 10:56:21 878.767 Socket: WARNING! Can’t create any local socket.

    20292 20292 10:56:21 932.012 OpenSocketToListen: WARNING! Socket creation failed with error 13, ‘Permission denied’.

    mesg: ttyname failed: Inappropriate ioctl for device

     

    so, the chroot has access to the network as standard vnc and ssh work fine, as do normal network connections, its running on android 9 on a snapdragon 845 (ARM64).

    the environmet was set up using linux deploy (i know you obviously wont provide any support for that, iv’e already contacted the dev and its just a standard chroot environment so should have no differences).

    its set up as a separate linux image on the drive, rather than as a directory.

     

    i may well need to mount certain partitions to access the network hardware, but im suprised if this is the case as, like i’ve said, vnc and ssh work fine.

    #26223
    fisherman
    Moderator

    Can you try to add user nx to the following groups aid_sdcard_rw,aid_inet and then restart nxserver

    usermod -a -G aid_sdcard_rw,aid_inet nx

    /etc/NX/nxserver --restart

    #26442
    lewinator56
    Participant

    I’ll give it a go and report back,

    sorry for the late reply, the notification went into spam

    #26443
    lewinator56
    Participant

    yep, thanks! that worked!

    #26444
    lewinator56
    Participant

    The only problem now is  I login to a white screen, I’ve tried the fix changing /usr/NX/etc/node.cfg, and it hasn’t worked,
    The desktop manager appears to be lightdm

    #28035
    Britgirl
    Keymaster

    Can you try the latest version and tell us if you are still getting the white screen?

    #28807
    tinboyko
    Participant

    Got same problem. But using LinuxDeploy. Running on clean ubuntu 18 rootfs with xfce4 and latest NM arm version (6.11.2_1). Tried many types of config. Strange thing, when I disable PhysicalDesktopSharing option it gives me error that’s no display available. Or when I disable physical-desktop session type it says that no sessions available.

    #28968
    graywolf
    Participant

    Hello.

    Processes confined in the chroot environment still employ the Android kernel that does not provide support for the kind of shared memory needed by NoMachine server.

    #29006
    lewinator56
    Participant

    Not replied on this in a while, ill try the latest version, seeing as only the issue now is the white screen, i cant see how its a shared memory issue in the android kernel, unless its something to do with GPU memory.

     

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

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