我使用用户名/密码和ssh密钥对在jenkins上创建了一个从节点,当我从节点打开ssh连接时,堆栈跟踪中出现错误“错误:无法监视可用交换空间”
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.
首先,经常会看到“可用交换空间错误”,其次它是否实际连接,因为最后它说“[SSH] SSH 主机密钥与该主机之前看到的密钥匹配。将允许连接。”
是的,节点连接成功。节点监控不起作用,因为您的节点正在运行 Jenkins 不知道如何监控的操作系统版本。这显然不理想,但不会造成任何问题。