Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Problem with headless build (Multiple instances)

Discussion in 'Linux' started by wenkly, Sep 1, 2023.

  1. wenkly

    wenkly

    Joined:
    Sep 4, 2014
    Posts:
    20
    I have installed Unity 2021.3.15f1 on EC2 Amazon, AWS Linux. I am trying to run unity build using commands and flag to use batchmode, but even I am invoking the command only once, there is a message

    Code (CSharp):
    1. It looks like another Unity instance is running with this project open.
    2.  
    3. Multiple Unity instances cannot open the same project.
    4.  
    5. Project: /repo/VR-Survival
    6. Fatal Error! It looks like another Unity instance is running with this project open.
    7.  
    8. Multiple Unity instances cannot open the same project.
    I've checked if there is any process of Unity, but no. Restarts of EC2 instance doesn't help either. Any ideas how to solve this?

    Command:
    xvfb-run /home/ec2-user/Editor/Unity -batchmode -nographics -projectPath /repo/VR-Survival/ -quit -logfile ~/editor.log -serial [my serial number] -username pawelmalysz@xxx.com -password my_password


    Full logs (censored)

    Code (CSharp):
    1. [ec2-user@ip-xxxx ~]$ cat editor.log
    2. Unity Editor version:    2021.3.15f1 (e8e88683f834)
    3. Branch:                  2021.3/staging
    4. Build type:              Release
    5. Batch mode:              YES
    6. System name:             Linux
    7. Distro version:          #1 SMP PREEMPT_DYNAMIC Tue Aug  1 20:47:25 UTC 2023
    8. Kernel version:          6.1.41-63.114.amzn2023.x86_64
    9. Architecture:            x86_64
    10. Available memory:        15779 MB
    11. User pawelmalysz@xxxx.com logged in successfully
    12. [LicensingClient] Channel doesn't exist: "LicenseClient-ec2-user"
    13. [Licensing::Module] Successfully launched the LicensingClient (PId: 2200)
    14. No usable version of libssl was found
    15. [LicensingClient] Channel doesn't exist: "LicenseClient-ec2-user"
    16. [Licensing::Module] Timed-out after 60.00s, waiting for channel: "LicenseClient-ec2-user"
    17. IPC channel to LicensingClient doesn't exist; falling back to Legacy licensing
    18.  
    19. LICENSE SYSTEM [202391 9:1:38] Next license update check is after 2023-08-19T08:54:23
    20.  
    21.  
    22. LICENSE SYSTEM [202391 9:1:38] Current license is already valid and activated. Skipping license activation process (Provided username/password will be ignored).
    23. Pro License: YES
    24. Initialize udev device monitor.
    25. [Package Manager] Server::Start -- Port 42797 was selected
    26.  
    27. COMMAND LINE ARGUMENTS:
    28. /home/ec2-user/Editor/Unity
    29. -batchmode
    30. -nographics
    31. -projectPath
    32. /repo/VR-Survival/
    33. -quit
    34. -logfile
    35. /home/ec2-user/editor.log
    36. -serial
    37. (hidden)
    38. -username
    39. pawelmalysz@xxxx.com
    40. -password
    41. (hidden)
    42. -executeMethod
    43. /repo/VR-Survival/Assets/Editor/Scripts/BuildScript.cs
    44. Successfully changed project path to: /repo/VR-Survival/
    45. /repo/VR-Survival
    46. It looks like another Unity instance is running with this project open.
    47.  
    48. Multiple Unity instances cannot open the same project.
    49.  
    50. Project: /repo/VR-Survival
    51. Fatal Error! It looks like another Unity instance is running with this project open.
    52.  
    53. Multiple Unity instances cannot open the same project.
    54.  
    55. Project: /repo/VR-Survival
    Script:

    Code (CSharp):
    1. using UnityEditor;
    2.  
    3. public class BuildScript
    4. {
    5.    public static void BuildLinux()
    6.    {
    7.        string[] scenes = { "Assets/Scenes/SplashSceen", "Assets/Scenes/MainMenu", "Assets/Scenes/Oregano", "Assets/Scenes/OtherScene" };
    8.        string buildPath = "/home/ec2-user/SNBuild";
    9.        Console.Log("TEST TEST");
    10.        Debug.Log("TEST 2 Test 2");
    11.        BuildReport buildReport = BuildPipeline.BuildPlayer(scenes, buildPath, BuildTarget.StandaloneLinux64, BuildOptions.None);
    12.  
    13.        if (buildReport.summary.result == BuildResult.Succeeded)
    14.        {
    15.            UnityEngine.Debug.Log("Build completed successfully.");
    16.        }
    17.        else
    18.        {
    19.            UnityEngine.Debug.LogError("Build failed. Error: " + buildReport.summary);
    20.        }
    21.    }
    22. }
    Any ideas what should I try or where should I look for an answer?
     
  2. ChiwTheNeko

    ChiwTheNeko

    Joined:
    Mar 24, 2022
    Posts:
    144
    Try deleting the Temp directory that's inside your project (back it up just in case).
     
    wenkly likes this.