4

I created an Azure Agent in my kubernetes cluster using https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops. I can run hello-world style pipelines on it, the agent is up and running. I have unity-editor installed with a manual license file using unityci/editor:ubuntu-2021.1.10f1-webgl-0.13.0 from GameCI.

Tried running the script beforehand by execing into the pod:

unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file

This was working fine...

Now with Azure Pipeline:

steps:
- script: unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file
  displayName: 'Validate unity installation'

I get the following error:

==============================================================================
Generating script.
Script contents:
unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /azp/_work/_temp/bad98430-5af6-47b2-a280-353adbf033c9.sh
/usr/bin/xvfb-run: 159: /usr/bin/xvfb-run: cannot create /dev/stdout: No such device or address
/usr/bin/xvfb-run: 83: /usr/bin/xvfb-run: cannot create /dev/stdout: No such device or address
##[error]Bash exited with code '2'.

I suspected some kind of permission error, but the job is running under root (verified by a whoami pipeline step returning root)

I then tried running the exact same line the job is running

echo "unity-editor -nographics -batchmode -quit -manualLicenseFile /path/to/license-file" > tmp.sh
chmod +x tmp.sh
/bin/bash --noprofile --norc ./tmp.sh

Which again... worked fine.

What am I missing with Azure Pipeline?

GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
MrAkroMenToS
  • 503
  • 1
  • 5
  • 9
  • https://stackoverflow.com/questions/40301841/cannot-create-dev-stdout-no-such-device-or-address – Mr Qian Jun 09 '21 at 09:54
  • 1
    How does that solve my problem? I have no control over how Azure Pipeline calls my scripts nor have I control over unity-editor. For now I have a workaround by putting >/dev/null 2>&1 at the end of my command I no longer see error messages and the build runs, but this ruins the real-time output (I can still cat the log file at the end of the build tho) – MrAkroMenToS Jun 11 '21 at 17:54
  • Hey there @MrAkroMenToS, I know it's been a while, but did you find a solution to this or are you still using the `>/dev/null 2>&1` at the end of the command? _Asking for a friend ;)_ – GabLeRoux Jun 27 '22 at 21:48
  • 1
    @GabLeRoux yes as this was a CI for a gamejam project I went with the /dev/null solution and gave up on the realtime output, but I'm sure there is a nicer solution – MrAkroMenToS Jun 30 '22 at 22:52
  • @MrAkroMenToS facing the same issue :( Tried to apply the /dev/null option and in my case it looks like it does run Unity, but then in a minute it fails with exit code ‘133’ and no idea yet what goes wrong as there is no output. Did you find any other solution or able to get output somehow? – Ilia Shakitko Oct 09 '22 at 09:43

0 Answers0