基本 ClearCase 失败。退出代码=1。 IOException: cleartool 没有 return 预期的退出代码

Base ClearCase failed. exit code=1. IOException: cleartool did not return the expected exit code

搜索后发现,为了 运行 来自 Jenkins 的硒测试,我们必须 运行 通过命令 Java -jar jenkins.war 而不是 as一个 服务

问题是,当 运行将 Jenkins 作为一项服务运行时,它工作正常,但是当 运行将其与命令作业一起运行时出现错误:

FATAL: Base ClearCase failed. exit code=1
FATAL: java.io.IOException: cleartool did not return the expected exit code. 
Command line="endview -server sprint8_view_DCLLegacy", actual exit code=1
[workspace] $ "C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\cleartool" endview -server sprint8_view_DCLLegacy
cleartool: Error: Cannot stop view server for view "sprint8_view_DCLLegacy": Permission denied.

FATAL: Base ClearCase failed. exit code=1
java.io.IOException: cleartool did not return the expected exit code. 
Command line="endview -server sprint8_view_DCLLegacy", actual exit code=1

您需要检查您使用的是哪个帐户 运行 Jenkins 即服务:

  • 系统帐号
  • 或用户帐户。

如果 cleartool enview -server 在命令行中工作,但不是来自 Jenkins 运行 作为服务,您需要确保该服务是 运行 正确的帐户。

this error wont come from Jenkins running as a service but comes in command line

如果相反,您可以创建一个简单的 Jenkins 作业来关闭您想要的视图(使用参数)。
调用该作业将结束视图。

或者,在命令行中,use PsExec,应该使用 LocalSystem 帐户启动会话:

C:\>psexec -i -s Powershell.exe

PsExec v1.97 - Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com

This will launch a new window.

PS C:\Windows\system32> whoami
nt authority\system