Search Unity

Unity Accelerator Ubuntu 20.04 Server Headless Install

Discussion in 'Unity Accelerator' started by SideSwipe9th, Jan 18, 2021.

  1. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    46
    I'm trying to install Unity Accelerator on my home server, which is running Ubuntu Server 20.04 in headless mode. I have previously set up Unity Accelerator on my work server, running Ubuntu Server 18.04 with no issues, however this was with the older installer.

    Whenever I attempt to run the latest installer, even when querying it for command line parameters with --help I receive the following error:
    Code (CSharp):
    1. /tmp/.mount_unity-6UZrS6/unity-accelerator-app: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
    As this is a headless server, I do not have X11 beyond what is included in the default Ubuntu Server image. I've tried using the older .run installer copied from my work server, however it is of an older version that doesn't seem to want to auto-update properly, despite my work server's Accelerator being up to date. And unfortunately I cannot seem to find a download archive for the latest version with the old installer which also contains the autoupdate and dashboard.

    Is there a known issue with the new installer when trying to run it on text mode only Linux installs? Is there anything I can do to help debug this further?

    I've also tried running the latest installer on a Ubuntu Desktop. Any attempt to invoke it with the --help parameter launches the GUI installer.
     
  2. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    46
    Quick update, I was able to work around this do a degree by doing the following:
    • Install and configure an older version of Unity Accelerator that uses the .run installer
    • Stop the Unity Accelerator service
    • Mount the AppImage with the `--appimage-mount` parameter
    • Extract the `unityaccelerator` binary executable from the mounted installer, and replace the older version at its install path.
    • Restart the Unity Accelerator service

    While these steps resolve my immediate issue of trying to install the latest version of Unity Accelerator on a command line only install of Ubuntu Server, I'm still unable to figure out a way to get the .AppImage installer to install via the command line directly.
     
  3. gregoryh_unity

    gregoryh_unity

    Unity Technologies

    Joined:
    Oct 1, 2018
    Posts:
    50
    Hi!
    I'm sorry for the trouble you ran into -- the manual does not yet reflect the changes brought by the new installer. The new installer is based on Electron and Electron doesn't support headless servers, unfortunately, so we ended up writing a command line only installer, which the gui installer ends up calling.

    For headless installs, automated deploys, etc. you can use the unity-accelerator executable directly to access the command line installer. Instead of downloading the installer, you can download the executable directly:

    Linux: https://accelerator.cloud.unity3d.c...gent?target_os=linux&download_location=manual

    Mac: https://accelerator.cloud.unity3d.c...ent?target_os=darwin&download_location=manual

    Windows: https://accelerator.cloud.unity3d.c...nt?target_os=windows&download_location=manual

    By running `unity-installer install` you can get a quick rundown of the expectations:

    ./unity-accelerator install <install.json>

    Install the accelerator using built-in routines. Recommended steps:
    * Run ./unity-accelerator install --sample install.json to generate a sample install.json file with all the defaults.
    * Edit the install.json to reflect your preferences.
    * Run ./unity-accelerator install --dry-run install.json and evaluate the actions the installer would take.
    * When satisfied, run ./unity-accelerator install install.json to finalize the installation.

    Note that if the <install.json> filename is - then the install data will be read from stdin as a single JSON object.

    Options:
    -? -h --help Output this help text.
    --dry-run Pretend to run the installation, outputting detail on the actions that would be taken.
    --json Output progress details as JSON objects rather than plain text.
    --sample Generate a sample install.json file.
    --skip-admin-check Will skip the admin/root check and continue running as if it had such privileges.

    NOTE for Linux specifically: It is probably best to run the install as root, but set the AsUser item in the install.json file so that the resulting service will run as that regular user you've chosen.
     
    rdjadu, OrinocoE, mlgiardina3 and 4 others like this.
  4. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    46
    Perfect! That's definitely an easier way to set it up than extracting the agent from the AppImage installer. Thank you!

    Could your reply get pinned or added to the release notes, in advance of the documentation being updated? Just so it's easier to find the information :)
     
  5. mlgiardina3

    mlgiardina3

    Joined:
    May 21, 2021
    Posts:
    1
    Can we get an update on this? The documentation is still incorrect and it took me a while to find this and get it figured out.
     
  6. BBlake3

    BBlake3

    Joined:
    Aug 3, 2020
    Posts:
    2
    This does not seem to work for headless Windows installs. It just launches the GUI installer. Tried the above with both Powershell and cmd with no success. Are the command line args different for windows?
     
  7. gregoryh_unity

    gregoryh_unity

    Unity Technologies

    Joined:
    Oct 1, 2018
    Posts:
    50
    It should work fine on Windows. I just gave it a quick try here.

    First I downloaded the exe from the link above https://accelerator.cloud.unity3d.c...nt?target_os=windows&download_location=manual

    That downloaded a unity-accelerator-v1.0.925+g55e634a-windows.exe file -- which you could rename to just unity-accelerator.exe if you want, but I just left it named as is, and then on a cmd:

    Code (CSharp):
    1. C:\Users\User>cd Downloads
    2.  
    3. C:\Users\User\Downloads>"unity-accelerator-v1.0.925+g55e634a-windows.exe"
    4. Unity Accelerator v1.0.925+g55e634a
    5.  
    6. Run on a local network to speed up transactions with Unity Services.
    7. ....
    8. Blah blah help text. ;-)
    9. ...
    10.  
    11. C:\Users\User\Downloads>"unity-accelerator-v1.0.925+g55e634a-windows.exe" install --sample install.json
    12.  
    13. C:\Users\User\Downloads>type install.json
    14. {
    15. ...
    16. Blah blah JSON config file.
    17. ...
    18. }
     
  8. madKoding

    madKoding

    Joined:
    Oct 3, 2021
    Posts:
    1
    i tried to run the installer in Alpine Linux but says
    Code (CSharp):
    1. ➜  ~ chmod a+x unity-accelerator-v1.0.941+g6b39b61-linux
    2. ➜  ~ ./unity-accelerator-v1.0.941+g6b39b61-linux install --sample install.json
    3. zsh: exec format error: ./unity-accelerator-v1.0.941+g6b39b61-linux
    ----
    update: never mind
    unity-accelerator-v1.0.941+g6b39b61-linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=JaePnOdGZgLo2iBSErMQ/eEVG_NfTEMl6p-hhr8eR/Ky5LTaV7BR1euDCya2bf/vnLMBPyvsK8by-AFrBNO, not stripped

    i'm trying to install in a 32bit server... never gonna work
     
    Last edited: Mar 18, 2022
  9. SockPuppetFriend

    SockPuppetFriend

    Unity Technologies

    Joined:
    Dec 3, 2021
    Posts:
    9
    Also note that if you're using the headless installer, be sure to modify install.json to enable ADBV2, otherwise you will encounter a known bug where AgentID in the resulting unity-accelerator.cfg file will be empty. At this point, all new users should be using ADBV2, but someone might forget to enable it on an initial install and then be confused as to why it isn't working correctly.

    This will present as a failure to start up properly, with the error message: "no known AgentID; perhaps run with an invite token?", as reported by a user in this thread: https://forum.unity.com/threads/doe...tid-perhaps-run-with-an-invite-token.1339442/
     
    rdjadu likes this.