gpt4 book ai didi

jenkins - 无法通过 Jenkins 连接到 AWS slave

转载 作者:行者123 更新时间:2023-12-04 12:20:24 27 4
gpt4 key购买 nike

我正在尝试使用 jenkins 中的 EC2 插件配置主从配置。配置 EC2 插件后,jenkins 成功启动了从站,我什至可以通过 ssh 进入该从站。但是当我查看 jenkins 中的 Node 日志时,我发现 jenkins 无法连接到 slave。这是我所看到的:

This node is offline because Jenkins failed to launch the slave agent   on it. See log for more details
INFO: Authenticating as ubuntu
Jan 31, 2017 6:29:00 PM null
INFO: Connecting to ip-10-226-254-52.ec2.internal on port 22, with timeout 10000.
Jan 31, 2017 6:29:10 PM null
INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
Jan 31, 2017 6:29:10 PM null
INFO: Waiting for SSH to come up. Sleeping 5.
Jan 31, 2017 6:29:15 PM null
INFO: Connecting to ip-10-226-254-52.ec2.internal on port 22, with timeout 10000.
Jan 31, 2017 6:29:25 PM null
INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
Jan 31, 2017 6:29:25 PM null
INFO: Waiting for SSH to come up. Sleeping 5.
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins
java.lang.NullPointerException
at hudson.plugins.ec2.ssh.EC2UnixLauncher.bootstrap(EC2UnixLauncher.java:309)
at hudson.plugins.ec2.ssh.EC2UnixLauncher.launch(EC2UnixLauncher.java:131)
at hudson.plugins.ec2.EC2ComputerLauncher.launch(EC2ComputerLauncher.java:122)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:253)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

我在网上查过,但帮不上什么忙。如果你们中有人熟悉这种错误,请帮助我。提前致谢。

最佳答案

我想我已经想通了。我指定供从属使用的安全组没有 SSH 端口(22)未在主安全组上打开。打开 SSH 端口后,我可以连接到从节点注意:我对主从使用相同的安全组

INFO: Connected via SSH.
Feb 02, 2017 4:29:59 PM null
INFO: connect fresh as root

关于jenkins - 无法通过 Jenkins 连接到 AWS slave,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41965115/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com