Rocky
Rocky

Reputation: 139

Jenkins error: Unable to read /home/jenkins/.jenkins/config.xml

Jenkins Problem Statement -

During jenkins restart process getting below error

hudson.util.HudsonFailedToLoad:org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read /home/jenkins/.jenkins/config.xml
    at hudson.WebAppMain$3.run(WebAppMain.java:248)
    Caused by: org.jvnet.hudson.reactor.ReactorException:java.io.IOException: Unable to read /home/jenkins/.jenkins/config.xml

    Caused by: jenkins.util.xstream.CriticalXStreamException:   
    hudson.plugins.active_directory.ActiveDirectorySecurityRealm : 
    hudson.plugins.active_directory.ActiveDirectorySecurityRealm

 ---- Debugging information ----

 message:  hudson.plugins.active_directory.ActiveDirectorySecurityRealm
 cause-exception     :      
 com.thoughtworks.xstream.mapper.CannotResolveClassException

 cause-message       : 
 hudson.plugins.active_directory.ActiveDirectorySecurityRealm
 class               : hudson.model.Hudson
 required-type       : hudson.model.Hudson
 converter-type      : hudson.util.RobustReflectionConverter
 path                : /hudson/securityRealm
 line number         : 550
 version             : not available
 ------------------------------- 

IMPORTANT: Debugging info highlights the issues around - Active Directory / LDAP Plugin

NOTE: Upon disabling (commenting line number 550 on config.xml) Jenkins UP but unable to login to Jenkins.

An issue related online forums referred but no luck

  1. https://groups.google.com/forum/#!topic/jenkinsci-users/iQ3iMvfOxQk

  2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764711

    Here an screenshot of the Jenkins error

Upvotes: 0

Views: 10781

Answers (3)

Bharat
Bharat

Reputation: 227

First check your JENKINS_HOME environment variable path, and also check

cat /etc/sysconfig/jenkins

If everything in above step is correct then do the following steps to recover the config.xml

Stop jenkins service

service jenkins stop

Move JENKINS_HOME/config.xml to another file for backup

mv JENKINS_HOME/config.xml JENKINS_HOME/config.xml_bak

Start jenkins service

service jenkins start

Upvotes: 1

Nital
Nital

Reputation: 6114

I had a similar issue and all I did was just set the env variable JENKINS_HOME=C:\jenkins and that fixed the issue for me.

Upvotes: 0

error404
error404

Reputation: 2823

This issue generally occurs when there is a cyclic dependency of the plugins and the version's are not the supported one

Since it is related to LDAP try modifying the security tag to false instead of true and then re start the Jenkins

Upvotes: 0

Related Questions