Jenkins从节点SSH连接出现空闲交换空间监控失败错误的咨询
Jenkins从节点SSH连接问题解答
问题一:“空闲交换空间监控失败”是否属于常见问题?
这个错误不属于通用场景下的常见问题,触发原因是你的从节点操作系统为NONSTOP_KERNEL,而Jenkins的SwapSpaceMonitor模块没有针对该操作系统的适配实现,导致无法获取空闲交换空间信息,进而抛出No suitable implementation found异常。这类问题仅会出现在使用Jenkins官方未提供监控适配的小众/特殊操作系统作为从节点时,主流Linux、Windows、macOS等系统中很少遇到。
问题二:从节点是否已成功建立连接?
从节点已经成功建立SSH连接并处于在线状态,依据日志中的关键信息:
- 明确标记:
Agent successfully connected and online - 末尾的SSH主机密钥校验通过提示:
[SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
监控失败只是Jenkins后续的节点状态监控任务执行出错,不会影响从节点的连接可用性,该从节点可以正常承接并执行Jenkins任务,仅交换空间状态监控功能无法使用。
附完整错误堆栈信息
This is a Unix agent Agent successfully connected and online ERROR: Failed to monitor for Free Swap Space Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Devops at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1787) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel$2.adapt(Channel.java:1037) at hudson.remoting.Channel$2.adapt(Channel.java:1033) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:66) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitorDetailed(AbstractAsyncNodeMonitorDescriptor.java:112) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:76) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:324) java.io.IOException: No suitable implementation found: os.name=NONSTOP_KERNEL os.arch=amd64 sun.arch.data.model=64 at org.jvnet.hudson.MemoryMonitor.obtain(MemoryMonitor.java:93) at org.jvnet.hudson.MemoryMonitor.get(MemoryMonitor.java:59) at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:129) at hudson.node_monitors.SwapSpaceMonitor$MonitorTask.call(SwapSpaceMonitor.java:124) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:377) at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:838) Caused: java.util.concurrent.ExecutionException at hudson.remoting.Channel$2.adapt(Channel.java:1039) at hudson.remoting.Channel$2.adapt(Channel.java:1033) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:66) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitorDetailed(AbstractAsyncNodeMonitorDescriptor.java:112) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:76) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:324) [05/10/24 16:55:47] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
内容的提问来源于stack exchange,提问作者Manya Tiwari
相关产品推荐
相关产品推荐

