2015-07-10 38 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

這個錯誤不會來自詹金斯作爲服務運行,但在命令行 –