3

I have installed and run interactively a private build agent for Azure DevOps on Linux.

However, when attempting to follow documentation to setup as a service it's failing to run. It usually completes the install successfully. But, starting the service always returns an error.

Configuration: New VM running Ubuntu 18.04LTS, secured with AAD and JIT, logged in with VM Admin permissions.

Error:

$ sudo ./svc.sh install
Creating launch agent in /etc/systemd/system/vsts.agent.xxx.linux-agent-01.service
Run as user: xxx@microsoft.com
Run as uid: 1613914
gid: 1613914
$ sudo ./svc.sh start
Failed to start vsts.agent.xxx.linux-agent-01.service: Unit vsts.agent.xxx.linux-agent-01.service is not loaded properly: Exec format error.
See system logs and 'systemctl status vsts.agent.xxx.linux-agent-01.service' for details.
Failed: failed to start vsts.agent.xxx.linux-agent-01.service
$

When attempting to run I get this:

3$ sudo ./svc.sh status

/etc/systemd/system/vsts.agent.edgewebui.LinuxAgent03.service
● vsts.agent.edgewebui.LinuxAgent03.service - VSTS Agent (edgewebui.LinuxAgent03)
   Loaded: error (Reason: Exec format error)
   Active: inactive (dead)

Feb 28 18:59:18 build-agent-linux systemd[1]: /etc/systemd/system/vsts.agent.edgewebui.LinuxAgent03.service:7: Invalid user/group…osoft.com
Hint: Some lines were ellipsized, use -l to show in full.

Any suggestions on why this isn't working.

A. Wentzel
  • 420
  • 7
  • 13
  • well, what do the system logs say? – 4c74356b41 Feb 28 '19 at 19:04
  • edited details above with a little more of a clue. Which particular log file should I look at. I wonder if this maybe won't work with the AAD/JIT capability which is relatively recent given the mention of invalid `user/group...osoft.com` – A. Wentzel Feb 28 '19 at 19:16
  • what about systemctl command they mention? – 4c74356b41 Feb 28 '19 at 20:15
  • I'm able to get around this particular error by updating the service template to use a 'User=LocalAdminAccount' instead of the user logged in with AAD which is formatted like an email. This too me sounds like a bug. Though, I'm still unable to get the service to run for some reason. – A. Wentzel Feb 28 '19 at 23:19
  • Have u fixed the issue? – palAlaa Apr 15 '21 at 02:19

0 Answers0