question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Credentials cannot be configured on fresh install

See original GitHub issue

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

  • Jenkins version

  • Plugin version

  • OS

Description

configuration-as-code plugin fails to install using the jenkins-cli after the credentials plugin has been installed.

os version: CentOS 7

jenkins version: 2.205-1.1 from http://pkg.jenkins.io/redhat

credentials plugin version: 2.3.0 configuration-as-code plugin version: 1.33

jenkins yaml contains:

credentials:
    system:
        domainCredentials:
            - credentials:
                - usernamePassword:
                    scope: GLOBAL
                    id: "Description"
                    username: someUsername
                    password: somePassword
                    description: "Description of credential"

Error stacktrace:

2019-11-22 14:53:04.549+0000 [id=86]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
io.jenkins.plugins.casc.ConfiguratorException: No configurator for root element <credentials>
        at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:691)
        at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:727)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:712)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:593)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:281)
        at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:273)
Caused: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        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:834)
2019-11-22 14:53:04.551+0000 [id=74]    SEVERE  h.model.UpdateCenter$DownloadJob#run: Failed to install configuration-as-code
io.jenkins.plugins.casc.ConfiguratorException: No configurator for root element <credentials>
        at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:691)
        at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:727)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:712)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:593)
        at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:281)
        at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:273)
Caused: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
        at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
        at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Caused: org.jvnet.hudson.reactor.ReactorException
        at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
        at jenkins.InitReactorRunner.run(InitReactorRunner.java:48)
        at hudson.PluginManager.start(PluginManager.java:967)
        at hudson.PluginManager.dynamicLoad(PluginManager.java:935)
Caused: java.io.IOException: Failed to install configuration-as-code plugin
        at hudson.PluginManager.dynamicLoad(PluginManager.java:942)
        at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2082)
Caused: java.io.IOException: Failed to dynamically deploy this plugin
        at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2086)
        at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1773)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:111)
        at java.base/java.lang.Thread.run(Thread.java:834)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jetersencommented, Nov 28, 2019

Thanks for explaining the exact situation.

It’s definitely a plugin state issue.

The issue is located when extension are loaded and are augmented.

@oleg-nenashev is there a way to retrigger extension augmentation on plugin initialization?

0reactions
jetersencommented, Feb 26, 2020

I believe this is actually fixed in recent version of Jenkins core, after plugin loading it seems that load extensions gets called.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 activation with old credentials
When setup is ready copy files, it will prompt you to reconnect the installation source (your USB). Select the drive then click New...
Read more >
jenkins installation windows 10 "Service Logon Credentials"
Select Logon Type = Run Service as Local System ,click Install and complete the setup; To unlock Jenkins, Go to C:\Program Files\Jenkins and ......
Read more >
How to Fix a Persistent "Enter Network Credentials" Message ...
Type "Credential Manager" into Windows Search and click Open. · Select Windows Credential and click on Add a Windows Credential. windows- ...
Read more >
Set up AWS Credentials and Region for Development
Set up default AWS credentials and region for development with the AWS SDK for Java. ... This is new: When you are done...
Read more >
6 steps for when remote desktop credentials are not working By
The first step in troubleshooting the problem should always be to make sure that the correct credentials are in place. This includes making...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found