Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Headless unity license activation problem

Discussion in 'Linux' started by buas-cradle, Feb 10, 2017.

  1. buas-cradle

    buas-cradle

    Joined:
    Feb 3, 2017
    Posts:
    2
    I'm trying to activate a personal license on a headless Debian 8 server. I've installed (both) unity using the .deb file. I use the following command:

    We require 5.4.2 so this is where I tried it first. An error occurs while activating, here is the log:
    mono profile = '/opt/unity-editor-5.4.2f2/Editor/Data/Mono/lib/mono/2.0'
    Initialize mono
    Mono path[0] = '/opt/unity-editor-5.4.2f2/Editor/Data/Managed'
    Mono path[1] = '/opt/unity-editor-5.4.2f2/Editor/Data/Mono/lib/mono/2.0'
    Mono path[2] = '/opt/unity-editor-5.4.2f2/Editor/Data/UnityScript'
    Mono path[3] = '/opt/unity-editor-5.4.2f2/Editor/Data/Mono/lib/mono/2.0'
    Mono config path = '/opt/unity-editor-5.4.2f2/Editor/Data/Mono/etc'
    Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56639
    DisplayProgressbar: Unity license
    Xlib: extension "RANDR" missing on display ":99".
    ATTENTION: default value of option force_s3tc_enable overridden by environment.
    [0207/092410:ERROR:sandbox_linux.cc(308)] InitializeSandbox() called with multiple threads in process gpu-process

    LICENSE SYSTEM [201727 9:24:10] Opening https://license.unity3d.com/update/poll?cmd=9&tx_id=5464cbd245a794564aa5190d5d247ee3


    LICENSE SYSTEM [201727 9:24:10] Posting <?xml version="1.0" encoding="UTF-8"?><root><SystemInfo><IsoCode>en</IsoCode><UserName>root</UserName><OperatingSystem>Linux 3.14 unknown 64bit</OperatingSystem><OperatingSystemNumeric>314</OperatingSystemNumeric><ProcessorType>Intel(R) Xeon(R) CPU E3-1230 v5 @ 3.40GHz</ProcessorType><ProcessorSpeed>800</ProcessorSpeed><ProcessorCount>8</ProcessorCount><ProcessorCores>8</ProcessorCores><PhysicalMemoryMB>31912</PhysicalMemoryMB><ComputerName>ns315856.ip-37-187-29.eu</ComputerName><ComputerModel>PC</ComputerModel><UnityVersion>5.4.2f2</UnityVersion></SystemInfo><License id="Terms"><MachineID Value="WxasgCUjt8/ExUqBc7z6Iu8FKHQ=" /><MachineBindings><Binding Key="1" Value="575489e0268f48c39be50f8d8fddf616" /><Binding Key="2" Value="575489e0268f48c39be50f8d8fddf616" /></MachineBindings><UnityVersion Value="5.4.2f2" /></License></root>


    LICENSE SYSTEM [201727 9:24:11] Received https://license.unity3d.com/update/poll?cmd=9&tx_id=5464cbd245a794564aa5190d5d247ee3

    LICENSE SYSTEM [201727 9:24:11] Headers:
    HTTP/1.1 200 OK
    Server: nginx/1.2.1
    Date: Tue, 07 Feb 2017 08:24:11 GMT
    Content-Type: application/xml; charset=utf-8
    Content-Length: 122
    Connection: keep-alive
    Status: 200 OK
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    ETag: W/"a59178a14cfbeec37e04f457756545dd"
    Cache-Control: max-age=0, private, must-revalidate
    X-Request-Id: 5df86f0b-a28b-4a1e-afcb-339838d6037a
    X-Runtime: 0.057001
    Accept-Ranges: bytes
    X-Varnish: 82310662
    Age: 0
    Via: 1.1 varnish
    Set-Cookie: SERVERID=varnish02; path=/

    Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com
    This should not be called in batch mode.

    (Filename: /home/builduser/buildslave/unity/build/Editor/Platform/Linux/EditorUtility.cpp Line: 234)

    I also tried the latest version, this also gives an error, interestingly however it does have an additional line saying login in was successful
    mono profile = '/home/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
    Initialize mono
    Mono path[0] = '/home/opt/Unity/Editor/Data/Managed'
    Mono path[1] = '/home/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
    Mono path[2] = '/home/opt/Unity/Editor/Data/UnityScript'
    Mono path[3] = '/home/opt/Unity/Editor/Data/Mono/lib/mono/2.0'
    Mono config path = '/home/opt/Unity/Editor/Data/Mono/etc'
    Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56732
    DisplayProgressbar: Unity license
    [0210/134814:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
    Xlib: extension "RANDR" missing on display ":99".
    ATTENTION: default value of option force_s3tc_enable overridden by environment.
    [0210/134814:ERROR:sandbox_linux.cc(308)] InitializeSandbox() called with multiple threads in process gpu-process
    User research-ade@ade-nhtv.nl logged in successfully

    LICENSE SYSTEM [2017210 13:48:17] Starting license activation with account research-ade@ade-nhtv.nl


    LICENSE SYSTEM [2017210 13:48:17] Opening https://license.unity3d.com/update/poll?cmd=9&tx_id=a835ac9e2e0c54330ae033e8c88e937b


    LICENSE SYSTEM [2017210 13:48:17] Posting <?xml version="1.0" encoding="UTF-8"?><root><SystemInfo><IsoCode>en</IsoCode><UserName>root</UserName><OperatingSystem>Linux 3.14 Debian 8 64bit</OperatingSystem><OperatingSystemNumeric>314</OperatingSystemNumeric><ProcessorType>Intel(R) Xeon(R) CPU E3-1230 v5 @ 3.40GHz</ProcessorType><ProcessorSpeed>800</ProcessorSpeed><ProcessorCount>8</ProcessorCount><ProcessorCores>8</ProcessorCores><PhysicalMemoryMB>31912</PhysicalMemoryMB><ComputerName>ns315856.ip-37-187-29.eu</ComputerName><ComputerModel>PC</ComputerModel><UnityVersion>5.5.1xf1Linux</UnityVersion></SystemInfo><License id="Terms"><MachineID Value="WxasgCUjt8/ExUqBc7z6Iu8FKHQ=" /><MachineBindings><Binding Key="1" Value="575489e0268f48c39be50f8d8fddf616" /><Binding Key="2" Value="575489e0268f48c39be50f8d8fddf616" /></MachineBindings><UnityVersion Value="5.5.1xf1Linux" /></License></root>


    LICENSE SYSTEM [2017210 13:48:18] Received https://license.unity3d.com/update/poll?cmd=9&tx_id=a835ac9e2e0c54330ae033e8c88e937b

    LICENSE SYSTEM [2017210 13:48:18] Headers:
    HTTP/1.1 200 OK
    Server: nginx/1.2.1
    Date: Fri, 10 Feb 2017 12:48:18 GMT
    Content-Type: application/xml; charset=utf-8
    Content-Length: 122
    Connection: keep-alive
    Status: 200 OK
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1; mode=block
    X-Content-Type-Options: nosniff
    ETag: W/"a59178a14cfbeec37e04f457756545dd"
    Cache-Control: max-age=0, private, must-revalidate
    Set-Cookie: _activation_session=QXRJcUNOdXZrRWJzUGx4R1ZybFpKbmtBOU5wZWhLdnRFUVJtUUh2WVFhTzRSTjRuUmh0UXZZQjYvY2hFcGFNdThqdDZTbnhyWFltMmMzZmNTdjJBQ1VOQjR1RUhKbnBjYnlTZ0ttTXQzUWQxYjhxckhGV3VyMWpWeCtxZmxjdzVsbE4wa0N2aVV1MkpZUEdib29udDFRPT0tLWg0ei9jMUVTaW9nOEpIaks3YVBTNUE9PQ%3D%3D--3de81111886bdd2d7b55954b72d93c9586afa66e; path=/; secure; HttpOnly
    X-Request-Id: 053e97bb-21d4-47d8-9f75-ffa9c5f1657e
    X-Runtime: 0.368446
    Accept-Ranges: bytes
    X-Varnish: 3357435465
    Age: 0
    Via: 1.1 varnish
    Set-Cookie: SERVERID=varnish01; path=/


    Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com
    This should not be called in batch mode.

    (Filename: /home/builduser/buildslave/unity/build/Editor/Platform/Linux/EditorUtility.cpp Line: 222)

    Anyone know what might be the problem?
     
  2. luciusclay

    luciusclay

    Joined:
    Jan 27, 2017
    Posts:
    9
    You can't activate a personal license in headless mode unfortunately, you can only activate using a valid serial. If you need to activate personal mode, you'll need to use xvfb to create a virtual desktop, and then use VNC to access it and activate the personal license. From then on you should be ok to run in headless mode.
     
  3. AlejandroMJ

    AlejandroMJ

    Joined:
    Dec 27, 2017
    Posts:
    3
    So there's no chance to activate a personal license from a Continuous Integration system like GitLab CI right?
     
  4. BonneCW

    BonneCW

    Joined:
    Jan 22, 2017
    Posts:
    123
    You can ssh with x forwarding to start the Unity UI once to activate Unity. That's what I did. Afterwards you can start it headless.
     
  5. AlejandroMJ

    AlejandroMJ

    Joined:
    Dec 27, 2017
    Posts:
    3
    @BonneCW Machine is always a different one (since it's a docker image) so I guess that does not work, it's running in a cloud base service like GitLab not in my own managed server.
     
  6. BonneCW

    BonneCW

    Joined:
    Jan 22, 2017
    Posts:
    123
    I see, that's a problem :/
    Shouldn't be that hard for the Unity guys to provide a solution for this problem.
     
    mosaic_school and AlejandroMJ like this.
  7. mosaic_school

    mosaic_school

    Joined:
    Dec 12, 2012
    Posts:
    74
    Yeah, kinda feels like there should be an easy fix to make an headless activation for a personal license possible. =)
     
  8. basisbit

    basisbit

    Joined:
    Aug 28, 2017
    Posts:
    3
    I can also confirm the problem and a desperate need for a solution to at least run integration- /unit-tests and see if build succeeds as continuous integration for a MIT licensed free/libre open source game. Many such projects use docker or travis-ci to run tests for each submitted code / commit / pull request.
     
  9. AlejandroMJ

    AlejandroMJ

    Joined:
    Dec 27, 2017
    Posts:
    3
    Still waiting for this feature... :/
     
  10. skaughtx0r

    skaughtx0r

    Joined:
    Mar 9, 2014
    Posts:
    74
    WarriusBirde likes this.
  11. WarriusBirde

    WarriusBirde

    Joined:
    Jul 28, 2016
    Posts:
    4
    That seems super promising! I'll have to play around with it and see if I can get it working on my home server.
     
  12. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    261
    I activated using the temporary X server hack, but once I had the license file, I've been able to re-use it on any images based from that, so only had to activate one time so far. YMMV. I keep my license file in a private gitlab repo and add it as a submodule to CI projects.

    I couldn't use the same license file on an Ubuntu desktop VM I spun up months later--unsurprisingly I guess. My images are here, but I bet you'd have to re-activate to use them: https://hub.docker.com/r/angusmf/unity-build/
    I haven't tried the env var method here: https://gitlab.com/gableroux/unity3d-gitlab-ci-example
    or the images. Anyone had success with that?