【问题标题】:Base ClearCase failed. exit code=1. IOException: cleartool did not return the expected exit code基本 ClearCase 失败。退出代码=1。 IOException: cleartool 没有返回预期的退出代码
【发布时间】:2015-07-10 07:58:55
【问题描述】:

搜索后发现要从 Jenkins 运行 selenium 测试,我们必须通过命令 Java -jar jenkins.war 而不是作为 服务 运行 jenkins >

问题是,当将 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

【问题讨论】:

    标签: java selenium jenkins continuous-integration clearcase


    【解决方案1】:

    您需要检查您使用哪个帐户运行 Jenkins 作为服务:

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

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

    此错误不会来自作为服务运行的 Jenkins,而是来自命令行

    如果情况相反,您可以创建一个简单的 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
    

    这将启动一个新窗口。

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

    【讨论】:

    • 服务正在使用登录选项卡上检查的本地系统帐户。
    • @akshayjain 确切地说,尝试使用用户帐户而不是本地系统帐户。
    • 这个错误不会来自 Jenkins 作为服务运行,而是来自命令行
    • @akshayjain 好的,我已经相应地修改了我的答案。
    • 当我们从 java -jar jenkins.war 运行 Jenkins 时,它从哪个帐户开始??
    最近更新 更多