为什么收到“进程返回的退出码100:文件名'tf'”

时间:2019-08-06 18:05:43

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

我正在使用Azure DevOps(visualstudio.com),并试图在本地服务器上启动并运行Linux Build Agent。以前可以使用,但是我将Linux服务器从Ubuntu 16.04升级到了18.04。那破坏了我以前的构建代理。

因此,我删除了以前的构建代理,并安装了最新的代理。新版本很容易注册,但是当我尝试运行一个版本时,它无法检出源代码。

有人知道什么可能导致此问题,或者我可以在哪里寻求帮助?我不管理我们的Azure DevOps。我只是想让Linux部分正常工作。

编辑:我应该注意,运行./externals/tee/tf会产生零输出(并返回相同的100代码)。也许与Java有关。我正在运行Java(TM)SE运行时环境(内部版本12.0.2 + 10)。

##[debug]Evaluating condition for step: 'Checkout'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: Checkout
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
##[debug]Processed: ##vso[plugininternal.updaterepositorypath alias=__designer_repo;]/home/***/myagent/_work/1/s
##[debug]Repository requires to be placed at '/home/***/myagent/_work/1/s', current location is '/home/***/myagent/_work/1/s'
Prepending PATH environment variable with directory containing 'tf'.
##[debug]Processed: ##vso[task.prependpath]/home/***/myagent/externals/tee
##[debug]PATH: '/home/***/myagent/externals/tee:/home/***/bin:/home/***/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
Querying workspace information.
##[debug]tf workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt
##[debug]Starting process:
##[debug]  File name: 'tf'
##[debug]  Arguments: 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'
##[debug]  Working directory: '/home/***/myagent/_work/1/s'
##[debug]  Require exit code zero: 'True'
##[debug]  Encoding web name:  ; code page: ''
##[debug]  Force kill process on cancellation: 'False'
##[debug]  Redirected STDIN: 'False'
##[debug]  Persist current code page: 'False'
##[debug]  Keep redirected STDIN open: 'False'
##[debug]  High priority process: 'False'
##[debug]Updated oom_score_adj to 500 for PID: 1921.
##[debug]Process started with process id 1921, waiting for process exit.
##[debug]STDOUT/STDERR stream read finished.
##[debug]STDOUT/STDERR stream read finished.
##[debug]Finished process 1921 with exit code 100, and elapsed time 00:00:03.3458546.
##[error]Exit code 100 returned from process: file name 'tf', arguments 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'.
##[debug]Processed: ##vso[task.logissue type=error;]Exit code 100 returned from process: file name 'tf', arguments 'workspaces -format:xml "-collection:https://mydomain.visualstudio.com/" -jwt:*** -noprompt'.
##[debug]Processed: ##vso[task.complete result=Failed;]
##[debug]   at Agent.Plugins.Repository.TeeCliManager.WorkspacesAsync(Boolean matchWorkspaceNameOnAnyComputer)
   at Agent.Plugins.Repository.TfsVCSourceProvider.GetSourceAsync(AgentTaskPluginExecutionContext executionContext, RepositoryResource repository, CancellationToken cancellationToken)
   at Agent.Plugins.Repository.CheckoutTask.RunAsync(AgentTaskPluginExecutionContext executionContext, CancellationToken token)
   at Agent.PluginHost.Program.Main(String[] args)
##[section]Finishing: Checkout

1 个答案:

答案 0 :(得分:0)

当我看到tf命令未产生任何输出时,我很确定它一定是Java问题。我尝试了许多不同版本的Java,但没有一个起作用。但是,使用Oracle Java 1.8.0_221终于可以了。

我下载了.tar.gz文件,将其解压缩,然后改写/ usr / bin / java *符号链接以指向1.8副本,然后它起作用了。