You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
Create new Cloud in Jenkins console
Configure Cloud for ECS cluster
Add Template to Cloud
Create Job with scripted pipeline that utilizes ECSTaskTemplate to inherit from the cloud template
Run the Job
Jun 17, 2023 9:48:12 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSProvisioningStrategy
Started provisioning on-prem-agent-cluster-onpremtest68-htgt1 from on-prem-agent-cluster with 1 executors. Remaining excess workload: 0
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher
ECS: Launching agent
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher
[on-prem-agent-cluster-onpremtest68-htgt1]: Creating Task in cluster null
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSProvisioningStrategy
Received StrategyState{label=onpremtest68, snapshot=LoadStatisticsSnapshot{definedExecutors=1, onlineExecutors=0, connectingExecutors=1, busyExecutors=0, idleExecutors=0, availableExecutors=0, queueLength=1}, plannedCapacitySnapshot=0, additionalPlannedCapacity=0}
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSCloud
Selected Region: us-west-2
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSCloud
Found dynamic agent task definition: arn:aws:ecs:us-west-2:<aws_account>:task-definition/on-prem-agent-cluster-onpremtest68-dz678:1
Jun 17, 2023 9:48:22 PM INFO com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher runECSTask
[on-prem-agent-cluster-onpremtest68-htgt1]: Starting agent with task definition arn:aws:ecs:us-west-2:<aws_account>:task-definition/on-prem-agent-cluster-onpremtest68-dz678:1}
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSCloud
Selected Region: us-west-2
Jun 17, 2023 9:48:22 PM FINE com.cloudbees.jenkins.plugins.amazonecs.ECSCloud
Found container definition with 1 container(s). Assuming first container is the Jenkins agent: on-prem-agent-cluster-onpremtest68-dz678
Jun 17, 2023 9:48:22 PM WARNING com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher launch
[on-prem-agent-cluster-onpremtest68-htgt1]: Error in provisioning; agent=com.cloudbees.jenkins.plugins.amazonecs.ECSSlave[on-prem-agent-cluster-onpremtest68-htgt1]
com.amazonaws.services.ecs.model.InvalidParameterException: Override argument cannot be null. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException; Request ID: cc490add-edd4-49fa-ae71-5ee09bc50121; Proxy: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1879)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1418)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1387)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1157)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:814)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:781)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:755)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:715)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:697)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:561)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:541)
at com.amazonaws.services.ecs.AmazonECSClient.doInvoke(AmazonECSClient.java:5067)
at com.amazonaws.services.ecs.AmazonECSClient.invoke(AmazonECSClient.java:5034)
at com.amazonaws.services.ecs.AmazonECSClient.invoke(AmazonECSClient.java:5023)
at com.amazonaws.services.ecs.AmazonECSClient.executeRunTask(AmazonECSClient.java:3546)
at com.amazonaws.services.ecs.AmazonECSClient.runTask(AmazonECSClient.java:3515)
at com.cloudbees.jenkins.plugins.amazonecs.ECSService.runEcsTask(ECSService.java:510)
at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.runECSTask(ECSLauncher.java:213)
at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.launchECSTask(ECSLauncher.java:149)
at com.cloudbees.jenkins.plugins.amazonecs.ECSLauncher.launch(ECSLauncher.java:110)
at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Anything else?
Experiencing strange behavior in the UI when opening the Cloud Configurations, All clouds show as "Edited". Using JCasC to configure an existing cloud and manually adding the cloud that is not functioning. Inspecting the cloud through the script console shows the correct clusterArn. Manually running the created task definition in the ECS cluster through AWS Console/CLI also functions as expected.
The text was updated successfully, but these errors were encountered:
Creating Task in cluster null is coming from the use of agent.getClusterArn() on ECSLauncher.java:146. This will not work as the clusterArn is not set on the agent until after task creation at
The root cause was the instance Jenkins URL not being set correctly from JCasC upon restart. Opening the global configuration page and saving, then opening the Cloud Configuration and saving appears to have corrected the issue.
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
Create new Cloud in Jenkins console
Configure Cloud for ECS cluster
Add Template to Cloud
Create Job with scripted pipeline that utilizes ECSTaskTemplate to inherit from the cloud template
Run the Job
Job
Expected Results
Task is created in ECS.
Actual Results
Anything else?
Experiencing strange behavior in the UI when opening the Cloud Configurations, All clouds show as "Edited". Using JCasC to configure an existing cloud and manually adding the cloud that is not functioning. Inspecting the cloud through the script console shows the correct clusterArn. Manually running the created task definition in the ECS cluster through AWS Console/CLI also functions as expected.
The text was updated successfully, but these errors were encountered: