簡體   English   中英

java.io.IOException:無法運行程序“git”:錯誤=11,資源暫時不可用

[英]java.io.IOException: Cannot run program “git”: error=11, Resource temporarily unavailable

使用 GOCD 管道。 我們有兩個節點,其中一個可以很好地克隆代碼,而這個舊節點則沒有。 我們看到無法運行程序“git”:錯誤=11,日志中的資源暫時不可用。 是否有一些我可以檢查的配置?

日志:

020-08-25 17:39:18,629 [loopThread] ERROR thoughtworks.go.work.DefaultGoPublisher:135 - Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git@github.comcast.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build] 
 Make sure this command can execute manually.
java.lang.RuntimeException: Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git@example.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build] 
 Make sure this command can execute manually.
    at com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:36)
    at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:159)
    at com.thoughtworks.go.domain.MaterialRevision.updateTo(MaterialRevision.java:151)
    at com.thoughtworks.go.domain.materials.AbstractMaterialAgent.prepare(AbstractMaterialAgent.java:41)
    at com.thoughtworks.go.remote.work.BuildWork.prepareJob(BuildWork.java:193)
    at com.thoughtworks.go.remote.work.BuildWork.build(BuildWork.java:141)
    at com.thoughtworks.go.remote.work.BuildWork.doWork(BuildWork.java:96)
    at com.thoughtworks.go.agent.JobRunner.run(JobRunner.java:60)
    at com.thoughtworks.go.agent.AgentHTTPClientController.retrieveWork(AgentHTTPClientController.java:123)
    at com.thoughtworks.go.agent.AgentHTTPClientController.work(AgentHTTPClientController.java:99)
    at com.thoughtworks.go.agent.AgentController.loop(AgentController.java:78)
    at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
    at org.springframework.scheduling.support.MethodInvokingRunnable.run(MethodInvokingRunnable.java:65)
    at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Caused by: com.thoughtworks.go.util.command.CommandLineException: Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git@example.com:TPP-Provisioning/PortOutGui.git /app/go-agent1/pipelines/PATGUI-build] 
 Make sure this command can execute manually.
    at com.thoughtworks.go.util.ProcessManager.startProcess(ProcessManager.java:112)
    at com.thoughtworks.go.util.ProcessManager.createProcess(ProcessManager.java:64)
    at com.thoughtworks.go.util.command.CommandLine.createProcess(CommandLine.java:361)
    at com.thoughtworks.go.util.command.CommandLine.execute(CommandLine.java:354)
    at com.thoughtworks.go.util.command.CommandLine.run(CommandLine.java:513)
    at com.thoughtworks.go.domain.materials.SCMCommand.run(SCMCommand.java:34)
    at com.thoughtworks.go.domain.materials.git.GitCommand.clone(GitCommand.java:82)
    at com.thoughtworks.go.config.materials.git.GitMaterial.git(GitMaterial.java:247)
    at com.thoughtworks.go.config.materials.git.GitMaterial.updateTo(GitMaterial.java:153)
    ... 17 more
Caused by: java.io.IOException: Cannot run program "git": error=11, Resource temporarily unavailable
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at com.thoughtworks.go.util.ProcessManager.startProcess(ProcessManager.java:105)
    ... 25 more
Caused by: java.io.IOException: error=11, Resource temporarily unavailable
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

去CD構建:

20:21:26.207 [go] Job Started: 2020-08-25 20:21:26 UTC

20:21:26.207 [go] Start to prepare PATGUI-build/131/Execute_Script/1/build_job on exmaple-po-b4p.sys.comcast.net [/app/go-agent3]
20:21:26.212 [go] Start to update materials.

20:21:26.212 [go] Start updating files at revision 1c9e6a31946f62af1285305f338178d2a8fd13f2 from git@github.comcast.com:TPP-Provisioning/PortOutGui.git
20:21:26.214 Error while executing [git clone --branch=20.08_OMS_15.09_Endpoint git@example.com:TPP-Provisioning/PortOutGui.git /app/go-agent3/pipelines/PATGUI-build] 
 Make sure this command can execute manually.
20:21:26.231 [go] Job completed PATGUI-build/131/Execute_Script/1/build_job on exmaple-po-b4p.sys.comcast.net [/app/go-agent3]

此問題已通過重新啟動 go 代理解決。 出現了一個新問題,但此問題已通過以下方式解決。

  1. 登錄到 GoCD 用戶界面。
  2. 點擊“代理”
  3. 選擇需要重啟的代理
  4. 單擊禁用按鈕
  5. 刷新頁面。
  6. 您將看到該代理已禁用,並位於列表的最后一個
  7. 復制“代理名稱”。 這是主機代理。 使用 Cada 憑據登錄此主機。
  8. 運行命令:sudo su -
  9. 現在執行: sudo /etc/init.d/go-agent1 restart (注意:agent 后的最后一位數字將根據 GoCD UI 中的 Agents/“sandbox” 值更改) 以上命令將重新啟動代理
  10. 現在返回 GoCD UI,選擇禁用的代理並單擊啟用。
  11. 刷新頁面,代理應該回到空閑狀態。重新啟動 GoCD 代理:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM