2015-07-10 42 views
1

搜索发现,从运行詹金斯硒测试中,我们必须通过命令来运行詹金斯Java -jar jenkins.war而不是作为一个服务Base ClearCase失败。退出代码= 1。 IOException异常:cleartool没有返回预期的退出代码

问题是,后在运行时,詹金斯因为它工作正常服务,但与命令作业运行时,它给错误:

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 

回答

1

您需要检查哪个帐户正在运行詹金斯作为一个服务:

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

如果在命令行中cleartool enview -server的作品,而不是从詹金斯作为服务运行,你需要确保该服务使用正确的帐户运行。

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

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

或者,在命令行,use PsExec,应该使用本地acount启动会话:

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 
+0

服务使用本地系统帐户登录选项卡检查。 –

+0

@akshayjain准确地说,请尝试使用用户帐户而不是本地系统帐户。 – VonC

+0

这个错误不会来自詹金斯作为服务运行,但在命令行 –