[英]Jenkins error trying to raise on-demand linux ec2 slave
Whenever I try to trigger a job that depends on that ec2 slave, it just stands in queue. 每当我尝试触发依赖于该ec2从站的作业时,它就排在队列中。 I looked at the logs and saw this exception:
我查看了日志,看到了这个异常:
com.amazonaws.services.ec2.model.AmazonEC2Exception: Network interfaces and an instance-level security groups may not be specified on the same request
Whenever I click on build executor status on the left, there is a button that says "provision via ". 每当我单击左侧的构建执行器状态时,都有一个按钮显示“ provision via”。 I click on it and see the correct amazon linux image name that I entered under cloud on Jenkins' System Configuration, but when I click on that, I see that same exception as well... I just don't know how to fix this and cannot find any helpful information on this.
我单击它,然后看到我在Jenkins的系统配置中的云下输入的正确的Amazon Linux映像名称,但是当我单击它时,我也看到了相同的异常...我只是不知道如何解决此问题并且找不到与此有关的任何有用信息。
Any help would be much appreciated. 任何帮助将非常感激。
Ok, I'm not exactly sure what was causing the error since I don't really know how the Jenkins plugin interfaces with the aws api. 好的,我不确定是什么导致了错误,因为我真的不知道Jenkins插件如何与aws api交互。 But after a good amount of trial and error, I was able to provision the On Demand worker by adding more details/parameters in Configuration, under Cloud.
但是经过大量的试验和错误之后,我能够通过在Cloud下的Configuration中添加更多详细信息/参数来配置On Demand工作者。
Adding a subnet ID for the VPC and a IAM Instance profile did the trick (I already had everything else including security groups, availability zone, instance type, etc). 为VPC和IAM实例配置文件添加子网ID可以解决问题(我已经拥有其他所有内容,包括安全组,可用性区域,实例类型等)。 So it seems like you either leave out security groups, or go all in and fill in pretty much everything.
因此,似乎您要么放弃了安全组,要么全力以赴并填写了几乎所有内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.