【发布时间】:2021-02-21 07:43:06
【问题描述】:
我一直在运行一个代理主 EC2 实例,我们在其中运行所有作业。我正在考虑升级我们的解决方案并根据负载添加一些 Jenkins 代理。为此,我正在尝试使用 Jenkins 中提供的 EC2 插件。配置运行良好,只是为了测试它,我将最小实例数设置为“1”。一旦代理被初始化,Jenkins Master 就可以通过 SSH 连接到代理,但是一旦它 SSH,它就会返回 404 错误并且实例被终止,我不知道为什么会发生这种情况。这是错误:
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: The SSH key **** has been successfully checked against the instance console for connections to EC2 (Jenkins Agent 1) - Jenkins Agent (****)
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: Connected via SSH.
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: connect fresh as root
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: Connecting to **** on port ****, with timeout 10000.
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: Connection allowed after the host key has been verified
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: Connected via SSH.
Nov 09, 2020 12:15:58 PM hudson.plugins.ec2.EC2Cloud
INFO: Creating tmp directory (/tmp) if it does not exist
Nov 09, 2020 12:16:03 PM hudson.plugins.ec2.EC2Cloud
INFO: Verifying: java -fullversion
openjdk full version "1.8.0_265-8u265-b01-0ubuntu2~20.04-b01"
Nov 09, 2020 12:16:03 PM hudson.plugins.ec2.EC2Cloud
INFO: Verifying: which scp
/usr/bin/scp
Nov 09, 2020 12:16:03 PM hudson.plugins.ec2.EC2Cloud
INFO: Copying remoting.jar to: /tmp
Nov 09, 2020 12:16:03 PM hudson.plugins.ec2.EC2Cloud
INFO: Launching remoting agent (via Trilead SSH2 Connection): java -jar /tmp/remoting.jar -workDir /var/lib/jenkins
HTTP ERROR 404 Not Found
URI: /computer/EC2%20(Jenkins%20Agent%201)%20-%20Jenkins%20Agent%20(i-01c45e1be3ca4ab2f)/logText/progressiveHtml
STATUS: 404
MESSAGE: Not Found
SERVLET: Stapler
Powered by Jetty:// 9.4.30.v20200611
任何人都知道这是从哪里来的,或者以前在 Jenkins 上使用 EC2 插件有过这种情况?
【问题讨论】:
标签: amazon-web-services jenkins amazon-ec2 ssh jenkins-plugins