首页 > 解决方案 > 如何解决无法启动服务以在运行 Linux VM 的 Azure 上运行私有构建代理的问题

问题描述

我已经在 Linux 上安装并以交互方式运行 Azure DevOps 的私有构建代理。

但是,当尝试按照文档设置为服务时,它无法运行。它通常会成功完成安装。但是,启动服务总是返回错误。

配置:运行 Ubuntu 18.04LTS 的新 VM,使用 AAD 和 JIT 保护,使用 VM 管理员权限登录。

错误

$ 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
$

尝试运行时,我得到了这个:

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.

关于为什么这不起作用的任何建议。

标签: azure-devopsbuild-agentazure-devops-self-hosted-agent

解决方案


推荐阅读