Jenkins 错误java.lang.NoClassDefFoundError: hudson.model.Computer

Jenkins job 总是失败 即使执行的主体部分已经成功, log里面:

hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XXXX/XXXX:6051
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:955)
		at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
		at com.sun.proxy.$Proxy87.withRepository(Unknown Source)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl.withRepository(RemoteGitImpl.java:235)
		at hudson.plugins.git.GitSCM.printCommitMessageToLog(GitSCM.java:1271)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1244)
		at hudson.scm.SCM.checkout(SCM.java:504)
		at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
		at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
		at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
		at hudson.model.Run.execute(Run.java:1815)
		at hudson.matrix.MatrixBuild.run(MatrixBuild.java:323)
		at hudson.model.ResourceController.execute(ResourceController.java:97)
		at hudson.model.Executor.run(Executor.java:429)
java.lang.NoClassDefFoundError: hudson.model.Computer
	at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:929)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:903)
	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:855)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
	at java.lang.Thread.run(Unknown Source)
Caused: java.io.IOException: Remote call on JNLP4-connect connection from XXXX/XXXX:6051 failed
	at hudson.remoting.Channel.call(Channel.java:961)
	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
	at com.sun.proxy.$Proxy87.withRepository(Unknown Source)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl.withRepository(RemoteGitImpl.java:235)
	at hudson.plugins.git.GitSCM.printCommitMessageToLog(GitSCM.java:1271)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1244)
	at hudson.scm.SCM.checkout(SCM.java:504)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
	at hudson.model.Run.execute(Run.java:1815)
	at hudson.matrix.MatrixBuild.run(MatrixBuild.java:323)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

解决办法:

在Jenkins Slave上找到jenkins的安装目录下面的jenkins-slave.xml文件,增加参数‘Xmx1024m ’,然后重启jenkins agent服务,参数修改如下

 

<arguments>-Xmx1024m -Xrs -jar "%BASE%\slave.jar" -jnlpUrl http://XXXX:8080/jenkins/computer/Win_Alisa/slave-agent.jnlp -secret 2a43d17e0559ddd7c5433c2a38f4e9669971549bd62dd8b0da9a7cb8a2895175</arguments>

 

ERROR: Launching agent process aborted. Also: java.lang.Throwable: launched here at hudson.slaves.SlaveComputer._connect(SlaveComputer.java:287) at hudson.model.Computer.connect(Computer.java:447) at hudson.slaves.SlaveComputer.tryReconnect(SlaveComputer.java:854) at hudson.slaves.RetentionStrategy$Always.check(RetentionStrategy.java:173) at hudson.slaves.RetentionStrategy$Always.check(RetentionStrategy.java:161) at hudson.slaves.ComputerRetentionWork$1.run(ComputerRetentionWork.java:71) at hudson.model.Queue._withLock(Queue.java:1397) at hudson.model.Queue.withLock(Queue.java:1271) at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:62) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) java.lang.InterruptedException: Validate configuration: The Host must be specified The selected credentials cannot be found at hudson.plugins.sshslaves.SSHLauncher.checkConfig(SSHLauncher.java:925) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:411) at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
06-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值