Comments (8)
Services is not a valid root element.
No configurator for the following root elements services
from configuration-as-code-plugin.
Also, right before this error occurs I am getting a warning as below:
WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl#file: type is abstract but not Describable.
from configuration-as-code-plugin.
Another update, I think this is related to the way I have split the yaml for ec2 plugin...
ec2.yaml looks like:
jenkins:
clouds:
- amazonEC2:
name: "XXXX"
....
templates:
AMI1.yaml
jenkins:
clouds:
- amazonEC2:
name: "XXXX"
templates:
- ami: "ami-1"
amiType:
windowsType:
.....
Similarly I have multiple templates yaml files, hoping that they will merge into a single one.
from configuration-as-code-plugin.
Just tried again by merging everything back together into a single yaml file ... Still get the same error.
from configuration-as-code-plugin.
Reduce it to a minimal error and post your full yaml.
the original error shows you nesting it under โservicesโ which is wrong
from configuration-as-code-plugin.
There is nothing named services in any of the twelve YAML config files, so I cannot pinpoint the issue or narrow it down to a particular part of the configuration.
-- Not entirely correct ... Turned out that, in a gist, I was copying everything in to the Jenkins_home including my compose.yaml file, which indeed had a services map right at the top ....
from configuration-as-code-plugin.
So, I removed the compose.yaml file from the jenkins home. Now the error I get with the below templates of the ec2 configuration is:
ec2.yaml
jenkins:
clouds:
- amazonEC2:
name: "cloudname"
instanceCapStr: "50"
region: "region"
sshKeysCredentialsId: "credentialsId"
ec2/ami-1.yaml
jenkins:
clouds:
- amazonEC2:
templates:
- ami: "ami-000391b8832ffa6f0"
amiType:
windowsData:
allowSelfSignedCertificate: true
password: "password"
specifyPassword: true
useHTTPS: false
associatePublicIp: false
connectBySSHProcess: false
connectionStrategy: PRIVATE_IP
deleteRootOnTermination: false
description: "ami-1"
ebsEncryptRootVolume: ENCRYPTED
ebsOptimized: true
hostKeyVerificationStrategy: CHECK_NEW_SOFT
idleTerminationMinutes: "30"
initScript: ""
instanceCapStr: "2"
javaPath: "java"
labelString: "label"
maxTotalUses: -1
metadataEndpointEnabled: true
metadataHopsLimit: 1
metadataSupported: true
metadataTokensRequired: false
minimumNumberOfInstances: 0
minimumNumberOfSpareInstances: 0
mode: EXCLUSIVE
monitoring: false
numExecutors: 2
remoteAdmin: "Administrator"
remoteFS: "/"
securityGroups: ""
stopOnTerminate: false
subnetId: "subnet"
t2Unlimited: false
tenancy: Default
tags:
- name: "jenkins_server_url"
value: "url"
- name: "Name"
value: "ami-1"
- name: "AWS_Internal"
value: "idleoff=2"
type: T3Medium
useEphemeralDevices: false
useInstanceProfileForCredentials: false
ec2/ami-2.yaml
jenkins:
clouds:
- amazonEC2:
templates:
- ami: "ami-000391b8832ffa6f0"
amiType:
windowsData:
allowSelfSignedCertificate: true
password: "password"
specifyPassword: true
useHTTPS: false
associatePublicIp: false
connectBySSHProcess: false
connectionStrategy: PRIVATE_IP
deleteRootOnTermination: false
description: "ami-2"
ebsEncryptRootVolume: ENCRYPTED
ebsOptimized: true
hostKeyVerificationStrategy: CHECK_NEW_SOFT
idleTerminationMinutes: "30"
initScript: ""
instanceCapStr: "2"
javaPath: "java"
labelString: "label"
maxTotalUses: -1
metadataEndpointEnabled: true
metadataHopsLimit: 1
metadataSupported: true
metadataTokensRequired: false
minimumNumberOfInstances: 0
minimumNumberOfSpareInstances: 0
mode: EXCLUSIVE
monitoring: false
numExecutors: 2
remoteAdmin: "Administrator"
remoteFS: "/"
securityGroups: ""
stopOnTerminate: false
subnetId: "subnet"
t2Unlimited: false
tenancy: Default
tags:
- name: "jenkins_server_url"
value: "url"
- name: "Name"
value: "ami-2"
- name: "AWS_Internal"
value: "idleoff=2"
type: T3Medium
useEphemeralDevices: false
useInstanceProfileForCredentials: false
2023-10-01 17:20:27.667+0000 [id=33] WARNING i.j.p.casc.BaseConfigurator#createAttribute: Can't handle class org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl#file: type is abstract but not Describable.
2023-10-01 17:20:27.834+0000 [id=33] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for templates
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:226)
at io.vavr.control.Option.orElse(Option.java:321)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:224)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
at io.vavr.Tuple2.apply(Tuple2.java:238)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:84)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:355)
at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)
at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$9(ConfigurationAsCode.java:803)
at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:737)
at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:803)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:789)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:658)
at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:315)
at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:307)
Caused: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:115)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1170)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
2023-10-01 17:20:27.843+0000 [id=24] SEVERE hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for templates
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:226)
at io.vavr.control.Option.orElse(Option.java:321)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:224)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
at io.vavr.Tuple2.apply(Tuple2.java:238)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:84)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:355)
at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)
at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$9(ConfigurationAsCode.java:803)
at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:737)
at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:803)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:789)
at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:658)
at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:315)
at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:307)
Caused: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:115)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1170)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:49)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1205)
at jenkins.model.Jenkins.<init>(Jenkins.java:992)
at hudson.model.Hudson.<init>(Hudson.java:86)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:264)
2023-10-01 17:20:27.892+0000 [id=24] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins
2023-10-01 17:20:27.946+0000 [id=24] INFO jenkins.model.Jenkins$16#onAttained: Started termination
2023-10-01 17:20:27.971+0000 [id=24] INFO h.p.b.global.Lifecycle#shutdown: Shutdown complete - Global TimeOut ScheduledExecutorService had 0 tasks pending
2023-10-01 17:20:28.021+0000 [id=24] INFO jenkins.model.Jenkins$16#onAttained: Completed termination
2023-10-01 17:20:28.022+0000 [id=24] INFO jenkins.model.Jenkins#_cleanUpDisconnectComputers: Starting node disconnection
2023-10-01 17:20:28.036+0000 [id=24] INFO jenkins.model.Jenkins#_cleanUpShutdownPluginManager: Stopping plugin manager
2023-10-01 17:20:28.076+0000 [id=24] INFO jenkins.model.Jenkins#_cleanUpPersistQueue: Persisting build queue
2023-10-01 17:20:28.084+0000 [id=24] INFO jenkins.model.Jenkins#_cleanUpAwaitDisconnects: Waiting for node disconnection completion
2023-10-01 17:20:28.086+0000 [id=24] SEVERE jenkins.model.Jenkins#_cleanUpPluginServletFilters: Failed to stop filters
java.lang.ClassNotFoundException: org.jenkinsci.plugins.ssegateway.SubscriptionConfigQueue$SubscriptionConfig
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/ssegateway/SubscriptionConfigQueue$SubscriptionConfig
at org.jenkinsci.plugins.ssegateway.SubscriptionConfigQueue.stop(SubscriptionConfigQueue.java:106)
at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.destroy(Endpoint.java:253)
at hudson.util.PluginServletFilter.cleanUp(PluginServletFilter.java:191)
at jenkins.model.Jenkins._cleanUpPluginServletFilters(Jenkins.java:3985)
at jenkins.model.Jenkins.cleanUp(Jenkins.java:3682)
at hudson.WebAppMain$3.run(WebAppMain.java:268)
2023-10-01 17:20:28.087+0000 [id=24] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Jenkins stopped
from configuration-as-code-plugin.
see https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos/ec2
under amazonEc2 templates needs to be indented
from configuration-as-code-plugin.
Related Issues (20)
- Bug with Theme Manager using Environment Variable
- Snake YAML Missing function HOT 5
- `$StaplerConverterImpl` is invoked with unexpected arguments
- Nicer error page on configuration error
- CasC support DateParameter plugin?
- Reload existing configuration failure HOT 10
- Not able to configure pipeline jobs using the JCasC plugin
- Invalid configuration elements for type class jenkins.model.GlobalConfigurationCategory$Security : queueItemAuthenticator HOT 4
- JCasC - configure a hudson.security.SecurityRealm HOT 3
- Typo / Name Change in Configuration as Code for gitscm demo HOT 6
- warning popup about master migration HOT 2
- SSH private key credential is corrupted by export + import HOT 2
- Add JUnit5 Annotation support for Test Cases
- Missing information how to generate/create yaml file HOT 1
- JCASC not able export create yaml with "list view swithin nested view" HOT 1
- Configuration As Code Plugin compatible with Scriptler HOT 1
- Jenkins Configuration Reload issue - ERROR 401 Unauthorized
- java.lang.IllegalArgumentException: No hudson.tools.ToolInstaller implementation found for jdkInstaller on Jenkins 2.440.1
- decodeBase64 it not working in casc secrets HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configuration-as-code-plugin.