jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.69k stars 720 forks source link

Can not install "Configuration as Code" plugin #466

Closed stanislr closed 5 years ago

stanislr commented 6 years ago

When trying to install plugin, we get below error(jpi file was downloaded but plugin was unable to be deployed): casc_plugin_failure

Also when tried to restart Jenkins it did not start with an error:

SEVERE: Failed to initialize Jenkins hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.util.ConcurrentModificationException at hudson.WebAppMain$3.run(WebAppMain.java:252) Caused by: org.jvnet.hudson.reactor.ReactorException: java.util.ConcurrentModificationException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269) at jenkins.InitReactorRunner.run(InitReactorRunner.java:47) at jenkins.model.Jenkins.executeReactor(Jenkins.java:1124) at jenkins.model.Jenkins.(Jenkins.java:929) at hudson.model.Hudson.(Hudson.java:86) at hudson.model.Hudson.(Hudson.java:82) at hudson.WebAppMain$3.run(WebAppMain.java:235) Caused by: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) at java.util.ArrayList$Itr.next(ArrayList.java:851) at hudson.PluginManager.resolveDependantPlugins(PluginManager.java:920) at hudson.PluginManager$2$2.run(PluginManager.java:569) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:1090) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

Do you know what may be the reason?

themysteq commented 6 years ago

This is fresh install just from container? Do you make any provisioning before deployment? Your version is near 1 year old and it's not current LTS.

Could you provide a list of installed plugins with their versions? take a look https://stackoverflow.com/questions/39365417/jenkins-how-can-i-see-which-plugin-is-causing-dependency-error

stanislr commented 6 years ago

Hi @themysteq, No, this is not fresh install form container. This is our playground Jenkins server(not Docker container). What we have done only is:

  1. Add environment variable CASC_JENKINS_CONFIG in "/etc/sysconfig/jenkins" and update "/etc/init.d/jenkins" respectively
  2. Install configuration-as-code-support plugin
Plugin Version Enabled
ace-editor 1.1 true
active-directory 2.0 true
amd_bootManager 18.4.1 true
amd_changeBuildStatus 18.4.1 true
amd_ci-validator-plugin 18.4.1 true
amd_clean-environment 18.4.1 true
amd_eaas-vco-plugin 18.4.1 true
amd_everestInstaller 18.4.1 true
amd_flow 18.4.1 true
amd_FullConsoleLink 18.4.1 true
amd_import_job 18.4.1 true
amd_jameleon 18.4.1 true
amd_nexus-upload 18.4.1 true
amd_qc 18.4.1 true
amd_selenium 18.4.1 true
amd_show-build-amount 18.4.1 true
amd_user-login 18.4.1 true
amd_uts 18.4.1 true
amd_xpi 18.4.1 true
analysis-core 1.95 true
ansible 1.0 true
ansicolor 0.4.3 true
ant 1.4 true
antisamy-markup-formatter 1.5 true
apache-httpcomponents-client-4-api 4.5.3-2.1 true
async-http-client 1.7.24.1 true
audit-trail 2.2 true
authentication-tokens 1.3 true
bitbucket 1.1.5 true
bitbucket-build-status-notifier 1.3.3 true
bitbucket-oauth 0.5 true
blackduck-hub 4.0.1 true
bouncycastle-api 2.16.0 true
branch-api 2.0.18 true
build-blocker-plugin 1.7.3 true
build-cause-run-condition 0.1 true
build-failure-analyzer 1.19.1 true
build-monitor-plugin 1.11+build.201701152243 true
build-timeout 1.18 true
build-user-vars-plugin 1.5 true
build-view-column 0.3 true
build-with-parameters 1.3 true
categorized-view 1.8 true
checkstyle 3.48 true
cloudbees-bitbucket-branch-source 2.2.10 true
cloudbees-folder 6.3 true
clover 4.8.0 true
cobertura 1.12.1 true
conditional-buildstep 1.3.5 true
config-file-provider 2.18 true
copy-to-slave 1.4.4 true
copyartifact 1.38.1 true
CreateNodeParameter 17.4.3 true
credentials 2.1.16 true
credentials-binding 1.15 true
ctrlp-step 1.0.10 true
custom-job-icon 0.2 true
cvs 2.12 true
dashboard-view 2.9.10 true
delivery-pipeline-plugin 0.10.3 true
description-setter 1.10 true
display-upstream-changes 0.3.2 true
display-url-api 2.2.0 true
docker-commons 1.6 true
docker-workflow 1.9.1 true
downstream-ext 1.8 true
durable-task 1.18 true
eaas_config_plugin 1.0.0 true
email-ext 2.61 true
envinject 2.1.5 true
envinject-api 1.5 true
extended-read-permission 1.0 true
extensible-choice-parameter 1.4.2 true
external-monitor-job 1.7 true
extra-columns 1.17 true
favorite 2.3.1 true
generic-webhook-trigger 1.36 true
gingerPlugin_v1.2 1.2 true
git 3.7.0 true
git-client 2.7.1 true
git-server 1.7 true
gitbucket 0.8 true
github 1.27.0 true
github-api 1.90 true
github-branch-source 2.3.2 true
gradle 1.25 true
greenballs 1.15 true
groovy 2.0 true
groovy-events-listener-plugin 1.014 true
groovy-postbuild 2.3.1 true
handlebars 1.1.1 true
handy-uri-templates-2-api 2.1.6-1.0 true
hidden-parameter 0.0.4 true
hp-application-automation-tools-plugin 5.0 true
htmlpublisher 1.14 true
icon-shim 2.0.3 true
ivy 1.27 true
jackson2-api 2.7.3 true
javadoc 1.4 true
jira 2.5 true
job-dsl 1.70 true
job-import-plugin 2.1 true
jobConfigHistory 2.15 true
jquery 1.11.2-0 true
jquery-detached 1.2.1 true
jsch 0.1.54.2 true
junit 1.24 true
kubernetes 0.12 true
kubernetes-credentials 0.3.1 true
ldap 1.20 true
log-parser 2.0 true
logstash 2.1.0 true
m2release 0.14.0 true
mail-watcher-plugin 1.16 true
mailer 1.20 true
mapdb-api 1.0.9.0 true
material-theme 1.3.0 true
matrix-auth 2.3 true
matrix-project 1.8 true
matrixtieparent 1.2 true
maven-plugin 3.1.2 true
mercurial 2.2 true
metrics 3.1.2.9 true
modernstatus 1.2 true
momentjs 1.1.1 true
monitoring 1.63.0 true
multiple-scms 0.6 true
naginator 1.17.2 true
nested-view 1.14 true
next-build-number 1.4 true
node-iterator-api 1.5 true
nodelabelparameter 1.7.2 true
openid 2.2 true
openid4java 0.9.8.0 true
p4 1.4.13 true
p4connection 17.4.3 true
pam-auth 1.3 true
Parameterized-Remote-Trigger 3.0.0 true
parameterized-trigger 2.35.2 true
perforce 1.3.36 true
periodicbackup 1.3 true
pipeline-build-step 2.7 true
pipeline-graph-analysis 1.6 true
pipeline-input-step 2.8 true
pipeline-milestone-step 1.3.1 true
pipeline-model-api 1.2.7 true
pipeline-model-declarative-agent 1.1.1 true
pipeline-model-definition 1.2.7 true
pipeline-model-extensions 1.2.7 true
pipeline-rest-api 2.9 true
pipeline-stage-step 2.2 true
pipeline-stage-tags-metadata 1.2.7 true
pipeline-stage-view 2.9 true
pipeline-utility-steps 1.5.1 true
plain-credentials 1.4 true
plugin-usage-plugin 0.3 true
pmd 3.46 true
preSCMbuildstep 0.3 true
progress-bar-column-plugin 1.0 true
promoted-builds 3.2 true
pubsub-light 1.12 true
rebuild 1.25 true
repository-connector 1.1.3 true
resource-disposer 0.8 true
rich-text-publisher-plugin 1.3 true
run-condition 1.0 true
scm-api 2.2.6 true
script-security 1.41 true
scriptler 2.9 true
shelve-project-plugin 1.5 true
sidebar-link 1.7 true
simple-theme-plugin 0.3 true
sonar 2.5 true
sse-gateway 1.15 true
ssh-agent 1.13 true
ssh-credentials 1.13 true
ssh-slaves 1.12 true
startup-trigger-plugin 2.8 true
stashNotifier 1.11.6 true
structs 1.14 true
subversion 2.7.1 true
support-core 2.38 true
suppress-stack-trace 1.5 true
testng-plugin 1.14 true
text-finder 1.10 true
text-finder-run-condition 0.1 true
throttle-concurrents 1.9.0 true
timestamper 1.8.7 true
token-macro 2.3 true
translation 1.15 true
uno-choice 2.1 true
variant 1.1 true
view-cloner 1.1 true
view-job-filters 1.27 true
warnings 4.66 true
windows-slaves 1.2 true
workflow-aggregator 2.4 true
workflow-api 2.25 true
workflow-basic-steps 2.3 true
workflow-cps 2.45 true
workflow-cps-global-lib 2.8 true
workflow-durable-task-step 2.19 true
workflow-job 2.17 true
workflow-multibranch 2.17 true
workflow-scm-step 2.4 true
workflow-step-api 2.14 true
workflow-support 2.18 true
ws-cleanup 0.34 true
themysteq commented 6 years ago

@stanislr the configuration-as-code plugin is not intended to be compatible with every single plugin at current stage of development. At this moment unfortunately you have to check on your own which plugin conflicts with configuration-as-code. I suppose that amd_* are your custom, in-house developed plugins. Keep in mind that "JCasC" was created to provide unattended installation and configuration. However, if it somehow works, it's not a good idea to do as you do. You should install on fresh, current Jenkins version and test which plugins are problematic (especially if you have custom, manually installed plugins). Any information about incompatibility is appreciated.

stanislr commented 6 years ago

Dziękuję @themysteq for replying, I already tried with fresh container installation and it worked with minimum installed plugins.

FYI after setting Active Directory and Project-based Matrix Authorization Strategy configurations yaml file generates with following error: casc_error

themysteq commented 6 years ago

@stanislr Glad I helped you :) Mind you close this issue and create fresh, related to ActiveDirectory plugin? I see the core of this problem probably.

ndeloof commented 6 years ago

active-directory plugin do declare some customDomain databound constructor parameter but no matching getter. The logic to compute this pseudo-attribute is actually hosted in the jelly view file.

afaict it is only used as a toggle for optional block, and is not even required in constructor as one can detect configured values vs null in domains parameter.

ndeloof commented 6 years ago

configuration-as-code should not break installation for unsupported plugins, at most it won't be able to configure them, but shouldn't prevent jenkins to load. I have no idea how it could impact jenkins boot with a ConcurrentModificationException like reported

ewelinawilkosz commented 6 years ago

@stanislr sorry it took so long... we've released a number of version of the plugin since you reported - 1.3 is currently latest Would it be possible for you to check and confirm if the problem still exists and this issue should be followed up?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.