【发布时间】:2020-07-30 21:50:14
【问题描述】:
我正在关注 this guide 并坚持使用我新创建的云配置来配置我的 Jenkins 从站。
我正在使用公共 Amazon AMI (ami-062f7200baf2fa504) 作为从站。
通过点击Provision via <cloud-name>,我启动了一个新的从站,然后日志如下所示:
INFO: Connected via SSH.
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: connect fresh as root
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: Connecting to 172.31.86.97 on port 22, with timeout 10000.
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: Connected via SSH.
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: Creating tmp directory (/tmp) if it does not exist
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: Verifying: java -fullversion
bash: java: command not found
Feb 12, 2020 8:34:00 AM hudson.plugins.ec2.EC2Cloud
INFO: Installing: sudo yum install -y java-1.8.0-openjdk.x86_64
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Existing lock /var/run/yum.pid: another copy is running as pid 3381.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 34 M RSS (325 MB VSZ)
Started: Wed Feb 12 08:33:58 2020 - 00:09 ago
State : Sleeping, pid: 3381
...
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 34 M RSS (325 MB VSZ)
Started: Wed Feb 12 08:33:58 2020 - 00:35 ago
State : Sleeping, pid: 3381
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: amzn2-core/2/x86_64
Could not retrieve mirrorlist http://amazonlinux.us-east-1.amazonaws.com/2/core/latest/x86_64/mirror.list error was
12: Timeout on http://amazonlinux.us-east-1.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Connection timed out after 5000 milliseconds')
Feb 12, 2020 8:35:10 AM hudson.plugins.ec2.EC2Cloud
WARNING: Failed to install: sudo yum install -y java-1.8.0-openjdk.x86_64
Feb 12, 2020 8:35:10 AM hudson.plugins.ec2.EC2Cloud
INFO: Verifying: which scp
/usr/bin/scp
Feb 12, 2020 8:35:10 AM hudson.plugins.ec2.EC2Cloud
INFO: Copying remoting.jar to: /tmp
我的 Jenkins 从站似乎无法使用yum 安装java?这是为什么?我在我的主 Jenkins 实例上安装了 java 就好了......主和从使用相同的 AWS 安全组,可以对任何地方进行出站访问。
在 Chrome 上转到 http://amazonlinux.us-east-1.amazonaws.com/2/core/latest/x86_64/mirror.list 工作正常,下载会自动开始...任何关于为什么会发生此错误的线索表示赞赏!
【问题讨论】:
标签: amazon-web-services jenkins amazon-ec2