<p>It looks like your XML tags aren't balanced.  You should run your config file through an XML validator to see what's wrong with it if you can't spot it by eye.</p>

CC BY-SA 3.0
2017-10-02T00:07:01.413Z
2017-10-02T00:07:01.413Z
chicks
<p>There would be many reason for it. If you are writing/updating <code>JENKINS_HOME/config.xml</code>, then the possibility of a syntax error may be in <code>config.xml</code>. So you can recover it with the following steps:</p>

<p>Step 1: Stop jenkins service</p>

<pre><code>cmd&gt; service jenkins stop
</code></pre>

<p>step 2: <code>mv JENKINS_HOME/config.xml</code>  to another file for backup </p>

<pre><code>cmd&gt; mv JENKINS_HOME/config.xml JENKINS_HOME/config.xml_bak
</code></pre>

<p>step 3: Start jenkins service </p>

<pre><code>cmd&gt; service jenkins start
</code></pre>

CC BY-SA 3.0
2017-10-02T21:01:35.403Z
Works like charm..JENKINS_HOME Path is also not set.Thanks
Hari
CC BY-SA 3.0
2017-10-02T11:38:23.547Z
2017-10-02T13:51:39.953Z
2017-10-02T13:51:39.953Z
Dheeraj Kumar
<pre><code>java.io.EOFException: no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1
    at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
    at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
Caused: com.thoughtworks.xstream.io.StreamException:  : no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:126)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:135)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.hasMoreChildren(AbstractPullReader.java:87)
    at com.thoughtworks.xstream.io.ReaderWrapper.hasMoreChildren(ReaderWrapper.java:32)
    at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:309)
    at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Caused: com.thoughtworks.xstream.converters.ConversionException:  : no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1 :  : no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1
---- Debugging information ----
message             :  : no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tag &lt;/hudson&gt; to close start tag &lt;hudson&gt; from line 2, parser stopped on END_TAG seen ...&lt;globalNodeProperties/&gt;\n\n... @42:1
class               : hudson.model.Hudson
required-type       : hudson.model.Hudson
converter-type      : hudson.util.RobustReflectionConverter
path                : /hudson
line number         : 42
version             : not available
-------------------------------
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
    at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
    at hudson.util.XStream2.unmarshal(XStream2.java:114)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
    at hudson.XmlFile.unmarshal(XmlFile.java:160)
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
    at hudson.XmlFile.unmarshal(XmlFile.java:162)
    at jenkins.model.Jenkins.loadConfig(Jenkins.java:3078)
    at jenkins.model.Jenkins.access$1200(Jenkins.java:307)
    at jenkins.model.Jenkins$16.run(Jenkins.java:3096)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
    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.&lt;init&gt;(Jenkins.java:929)
    at hudson.model.Hudson.&lt;init&gt;(Hudson.java:86)
    at hudson.model.Hudson.&lt;init&gt;(Hudson.java:82)
    at hudson.WebAppMain$3.run(WebAppMain.java:235)
Caused: hudson.util.HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:252)
</code></pre>

CC BY-SA 3.0
2017-10-02T12:47:39.650Z
You can't just drop a whole stacktrace and hope someone will magically found what is wrong with your setup. Give context, show your config.xml after ensuring there's indeed a closing tag before line 42.
Tensibai
CC BY-SA 3.0
2017-10-02T21:00:00.147Z
Noted.. Tensibai                                                                                          
 Will follow link: https://devops.stackexchange.com/help/how-to-ask afteron..
Hari
CC BY-SA 3.0
2017-10-03T07:29:32.860Z
Thanks for this :) Don't hesitate to [edit] this question also, with some more context and details I'm sure it will get a far better reception
Tensibai
<jenkins>
Why is Jenkins unable to read config.xml?
Hari
# Why is Jenkins unable to read config.xml?

(Asked by: username_0 on 2017-10-01)

java.io.EOFException: no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1
    at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
    at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
Caused: com.thoughtworks.xstream.io.StreamException:  : no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:126)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:135)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.hasMoreChildren(AbstractPullReader.java:87)
    at com.thoughtworks.xstream.io.ReaderWrapper.hasMoreChildren(ReaderWrapper.java:32)
    at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:309)
    at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
Caused: com.thoughtworks.xstream.converters.ConversionException:  : no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1 :  : no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1
---- Debugging information ----
message             :  : no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : no more data available - expected end tag  to close start tag  from line 2, parser stopped on END_TAG seen ...\n\n... @42:1
class               : hudson.model.Hudson
required-type       : hudson.model.Hudson
converter-type      : hudson.util.RobustReflectionConverter
path                : /hudson
line number         : 42
version             : not available
-------------------------------
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
    at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
    at hudson.util.XStream2.unmarshal(XStream2.java:114)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
    at hudson.XmlFile.unmarshal(XmlFile.java:160)
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
    at hudson.XmlFile.unmarshal(XmlFile.java:162)
    at jenkins.model.Jenkins.loadConfig(Jenkins.java:3078)
    at jenkins.model.Jenkins.access$1200(Jenkins.java:307)
    at jenkins.model.Jenkins$16.run(Jenkins.java:3096)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
    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: hudson.util.HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:252)

**Tags:** jenkins

> **Comments:**
> **username_1**: You can't just drop a whole stacktrace and hope someone will magically found what is wrong with your setup. Give context, show your config.xml after ensuring there's indeed a closing tag before line 42.  
> **username_0**: Noted.. username_1                                                                                            Will follow link: https://devops.stackexchange.com/help/how-to-ask afteron..  
> **username_1**: Thanks for this :) Don't hesitate to [edit] this question also, with some more context and details I'm sure it will get a far better reception  

---

## 2 answers

### Answer by username_3 on 2017-10-02. Score: 8 | Accepted answer

There would be many reason for it. If you are writing/updating JENKINS_HOME/config.xml, then the possibility of a syntax error may be in config.xml. So you can recover it with the following steps:
Step 1: Stop jenkins service
cmd> service jenkins stop

step 2: mv JENKINS_HOME/config.xml  to another file for backup 
cmd> mv JENKINS_HOME/config.xml JENKINS_HOME/config.xml_bak

step 3: Start jenkins service 
cmd> service jenkins start

> **Comments:**
> **username_0**: Works like charm..JENKINS_HOME Path is also not set.Thanks  

---

### Answer by username_2 on 2017-10-02. Score: 2

It looks like your XML tags aren't balanced. You should run your config file through an XML validator to see what's wrong with it if you can't spot it by eye.


---

