简体   繁体   English

java.io.IOException:无法运行程序“git”:错误=11,资源暂时不可用

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

Using GOCD pipeline.使用 GOCD 管道。 We have two nodes, one of which clones code fine, this older node does not.我们有两个节点,其中一个可以很好地克隆代码,而这个旧节点则没有。 We are seeing Cannot run program "git": error=11, Resource temporarily unavailable in the logs.我们看到无法运行程序“git”:错误=11,日志中的资源暂时不可用。 Is there some configuration I am able to check?是否有一些我可以检查的配置?

Logs:日志:

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)

GO CD Build:去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]

This issue was resolved by restarting the go agent.此问题已通过重新启动 go 代理解决。 A new issue arouse but this issue was resolved by the following.出现了一个新问题,但此问题已通过以下方式解决。

  1. Login into GoCD UI.登录到 GoCD 用户界面。
  2. Click on "Agents"点击“代理”
  3. Select the agent which is required to be restarted选择需要重启的代理
  4. click on Disable button单击禁用按钮
  5. refresh the page.刷新页面。
  6. You will see that agent disabled and at the last in the list您将看到该代理已禁用,并位于列表的最后一个
  7. Copy the "Agent Name".复制“代理名称”。 This is the host of agent.这是主机代理。 Login into this host with Cada credentials.使用 Cada 凭据登录此主机。
  8. Run command : sudo su -运行命令:sudo su -
  9. Now execute : sudo /etc/init.d/go-agent1 restart (Note : The last digit after agent will change as per Agents/"sandbox" value in the GoCD UI) Above command will restart the agent现在执行: sudo /etc/init.d/go-agent1 restart (注意:agent 后的最后一位数字将根据 GoCD UI 中的 Agents/“sandbox” 值更改) 以上命令将重新启动代理
  10. Now go back to the GoCD UI, select the disabled agent and click on Enable.现在返回 GoCD UI,选择禁用的代理并单击启用。
  11. Refresh the page, agent should be back in idle state.Restarting GoCD agents:刷新页面,代理应该回到空闲状态。重新启动 GoCD 代理:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在jshell中按Tab键时,出现“输入错误:java.io.IOException:资源暂时不可用” - Getting “Error on input: java.io.IOException: Resource temporarily unavailable” when pressing Tab in jshell java.io.IOException: 无法运行程序“...”: java.io.IOException: error=2, No such file or directory - java.io.IOException: Cannot run program “…”: java.io.IOException: error=2, No such file or directory 无法运行程序java.io.IOException - Cannot run program java.io.IOException java.io.IOException:无法运行程序“ scala”:CreateProcess错误= 2, - java.io.IOException: Cannot run program “scala”: CreateProcess error=2, java.io.IOException:无法运行程序“/usr/bin/sh”:java.io.IOException:error=2,没有那个文件或目录 - java.io.IOException: Cannot run program “/usr/bin/sh”: java.io.IOException: error=2, No such file or directory java.io.IOException:无法运行程序“ C:\\ AutoIt \\ ModenaAutoIt.exe”:java.io.IOException:error = 2,没有此类文件或目录 - java.io.IOException: Cannot run program “C:\AutoIt\ModenaAutoIt.exe”: java.io.IOException: error=2, No such file or directory java.io.IOException:无法运行程序“ant” - java.io.IOException: Cannot run program “ant” java.io.IOException:无法运行程序“mysql”:CreateProcess error=2,系统找不到指定的文件 - java.io.IOException:Cannot run program “mysql”:CreateProcess error=2, The system cannot find the file specified java.io.IOException:无法运行程序“”:CreateProcess error = 2,系统找不到指定的文件 - java.io.IOException: Cannot run program “”: CreateProcess error=2, The system cannot find the file specified java.io.IOException:无法运行程序“plink”:CreateProcess error=2,系统找不到指定的文件 - java.io.IOException: Cannot run program "plink": CreateProcess error=2, The system cannot find the file specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM