hudson.util.IOException2: Unable to read /usr/hudson/config.xml

Jenkins JIRA | delirii | 7 years ago
  1. 0

    That's the second time I've got this issue when restarting hudson. This is related to my security configuration as my workaround to get Hudson up and running again is to edit the config.xml file by hand, replacing the security configuration with the default one (no security at all), and set it up again throught the Hudson conf page. That being done, it works as previously except that if I try to restart Hudson again, it crashes with the same exception. Here is how I restart Hudson (correct me if I'm wrong with it) : "Prepare for Shutdown" from the Manage Hudson page Stop and Start Tomcat (6.0.18, JDK 6.0u14, running under Fedora) That's it ! Here is the exception written on the main page when Hudson is up : hudson.util.IOException2: Unable to read /usr/hudson/config.xml at hudson.XmlFile.unmarshal(XmlFile.java:150) at hudson.model.Hudson.load(Hudson.java:1975) at hudson.model.Hudson.(Hudson.java:557) at hudson.WebAppMain$2.run(WebAppMain.java:190) Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null ---- Debugging information ---- cause-exception : java.lang.IllegalArgumentException cause-message : null class : hudson.model.Hudson required-type : hudson.security.GlobalMatrixAuthorizationStrategy path : /hudson/authorizationStrategy/permission[21] line number : 28 ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshallField(RobustReflectionConverter.java:262) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:222) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923) at hudson.util.XStream2.unmarshal(XStream2.java:65) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909) at hudson.XmlFile.unmarshal(XmlFile.java:146) ... 3 more Caused by: java.lang.IllegalArgumentException at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:85) at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:99) at hudson.security.GlobalMatrixAuthorizationStrategy.access$200(GlobalMatrixAuthorizationStrategy.java:65) at hudson.security.GlobalMatrixAuthorizationStrategy$ConverterImpl.unmarshal(GlobalMatrixAuthorizationStrategy.java:215) at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:141) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) ... 19 more Here is my config.xml faulty file : <?xml version='1.0' encoding='UTF-8'?> <hudson> <version>1.319</version> <numExecutors>2</numExecutors> <mode>NORMAL</mode> <useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"> <permission>hudson.model.Computer.Delete:admin</permission> <permission>hudson.model.View.Configure:admin</permission> <permission>hudson.scm.SCM.Tag:admin</permission> <permission>hudson.scm.SCM.Tag:team</permission> <permission>hudson.model.Hudson.Administer:admin</permission> <permission>hudson.model.Item.Configure:admin</permission> <permission>hudson.model.View.Create:admin</permission> <permission>hudson.model.Run.Delete:admin</permission> <permission>hudson.model.Item.Create:admin</permission> <permission>hudson.model.Item.Build:admin</permission> <permission>hudson.model.Item.Build:team</permission> <permission>hudson.model.Item.Release:admin</permission> <permission>hudson.model.Item.Release:team</permission> <permission>hudson.model.View.Delete:admin</permission> <permission>hudson.model.Item.Workspace:anonymous</permission> <permission>hudson.model.Item.Workspace:admin</permission> <permission>hudson.model.Item.Workspace:team</permission> <permission>hudson.model.Item.Delete:admin</permission> <permission>hudson.model.Hudson.Read:anonymous</permission> <permission>hudson.model.Hudson.Read:admin</permission> <permission>hudson.model.Hudson.Read:team</permission> <permission>hudson.model.Item.Read:anonymous</permission> <permission>hudson.model.Item.Read:admin</permission> <permission>hudson.model.Item.Read:team</permission> <permission>hudson.model.Run.Update:admin</permission> <permission>hudson.model.Computer.Configure:admin</permission> </authorizationStrategy> <securityRealm class="hudson.security.HudsonPrivateSecurityRealm"> <disableSignup>true</disableSignup> </securityRealm> [...]

    Jenkins JIRA | 7 years ago | delirii
    hudson.util.IOException2: Unable to read /usr/hudson/config.xml
  2. 0

    That's the second time I've got this issue when restarting hudson. This is related to my security configuration as my workaround to get Hudson up and running again is to edit the config.xml file by hand, replacing the security configuration with the default one (no security at all), and set it up again throught the Hudson conf page. That being done, it works as previously except that if I try to restart Hudson again, it crashes with the same exception. Here is how I restart Hudson (correct me if I'm wrong with it) : "Prepare for Shutdown" from the Manage Hudson page Stop and Start Tomcat (6.0.18, JDK 6.0u14, running under Fedora) That's it ! Here is the exception written on the main page when Hudson is up : hudson.util.IOException2: Unable to read /usr/hudson/config.xml at hudson.XmlFile.unmarshal(XmlFile.java:150) at hudson.model.Hudson.load(Hudson.java:1975) at hudson.model.Hudson.(Hudson.java:557) at hudson.WebAppMain$2.run(WebAppMain.java:190) Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null ---- Debugging information ---- cause-exception : java.lang.IllegalArgumentException cause-message : null class : hudson.model.Hudson required-type : hudson.security.GlobalMatrixAuthorizationStrategy path : /hudson/authorizationStrategy/permission[21] line number : 28 ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshallField(RobustReflectionConverter.java:262) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:222) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923) at hudson.util.XStream2.unmarshal(XStream2.java:65) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909) at hudson.XmlFile.unmarshal(XmlFile.java:146) ... 3 more Caused by: java.lang.IllegalArgumentException at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:85) at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:99) at hudson.security.GlobalMatrixAuthorizationStrategy.access$200(GlobalMatrixAuthorizationStrategy.java:65) at hudson.security.GlobalMatrixAuthorizationStrategy$ConverterImpl.unmarshal(GlobalMatrixAuthorizationStrategy.java:215) at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:141) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) ... 19 more Here is my config.xml faulty file : <?xml version='1.0' encoding='UTF-8'?> <hudson> <version>1.319</version> <numExecutors>2</numExecutors> <mode>NORMAL</mode> <useSecurity>true</useSecurity> <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy"> <permission>hudson.model.Computer.Delete:admin</permission> <permission>hudson.model.View.Configure:admin</permission> <permission>hudson.scm.SCM.Tag:admin</permission> <permission>hudson.scm.SCM.Tag:team</permission> <permission>hudson.model.Hudson.Administer:admin</permission> <permission>hudson.model.Item.Configure:admin</permission> <permission>hudson.model.View.Create:admin</permission> <permission>hudson.model.Run.Delete:admin</permission> <permission>hudson.model.Item.Create:admin</permission> <permission>hudson.model.Item.Build:admin</permission> <permission>hudson.model.Item.Build:team</permission> <permission>hudson.model.Item.Release:admin</permission> <permission>hudson.model.Item.Release:team</permission> <permission>hudson.model.View.Delete:admin</permission> <permission>hudson.model.Item.Workspace:anonymous</permission> <permission>hudson.model.Item.Workspace:admin</permission> <permission>hudson.model.Item.Workspace:team</permission> <permission>hudson.model.Item.Delete:admin</permission> <permission>hudson.model.Hudson.Read:anonymous</permission> <permission>hudson.model.Hudson.Read:admin</permission> <permission>hudson.model.Hudson.Read:team</permission> <permission>hudson.model.Item.Read:anonymous</permission> <permission>hudson.model.Item.Read:admin</permission> <permission>hudson.model.Item.Read:team</permission> <permission>hudson.model.Run.Update:admin</permission> <permission>hudson.model.Computer.Configure:admin</permission> </authorizationStrategy> <securityRealm class="hudson.security.HudsonPrivateSecurityRealm"> <disableSignup>true</disableSignup> </securityRealm> [...]

    Jenkins JIRA | 7 years ago | delirii
    hudson.util.IOException2: Unable to read /usr/hudson/config.xml
  3. 0

    Vraptor + Rest + LocalDateTime[RESOLVIDO]

    com.br | 1 year ago
    com.thoughtworks.xstream.converters.ConversionException: Not supported yet. : Not supported yet. ---- Debugging information ---- message : Not supported yet. cause-exception : java.lang.UnsupportedOperationException cause-message : Not supported yet. class : br.com.coliseu.model.Versaotabelas required-type : org.joda.time.LocalDateTime path : /versaotabelas/dttimealter -------------------------------
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JENKINS-4172] Unable to read /home/hudson/config.xml - Jenkins JIRA

    jenkins-ci.org | 6 months ago
    hudson.util.IOException2: Unable to read /home/hudson/config.xml
  6. 0

    => Manage Hudson => Configure System => Access Control (LDAP-Config !!!) => Authorization => Check: Project-based Matrix Authorization Strategy => User/group to add: "m500488" => Klick "add" => Configure Matrix: Check all permissions fpr m500488 => Tomcat: Reload Hudson-Webapplication => Reenter Hudson-Webapplication => The following Exception occurs: hudson.util.IOException2: Unable to read /usr/share/tomcat5/.hudson/config.xml at hudson.XmlFile.unmarshal(XmlFile.java:152) at hudson.model.Hudson.load(Hudson.java:1967) at hudson.model.Hudson.(Hudson.java:560) at hudson.WebAppMain$2.run(WebAppMain.java:191) Caused by: com.thoughtworks.xstream.converters.ConversionException: Failed to parse 'hudson.model.Item.Release:m500488' --- no such permission : Failed to parse 'hudson.model.Item.Release:m500488' --- no such permission ---- Debugging information ---- message : Failed to parse 'hudson.model.Item.Release:m500488' --- no such permission cause-exception : java.lang.IllegalArgumentException cause-message : Failed to parse 'hudson.model.Item.Release:m500488' --- no such permission class : hudson.model.Hudson required-type : hudson.security.ProjectMatrixAuthorizationStrategy path : /hudson/authorizationStrategy/permission[2] line number : 9 ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at hudson.util.RobustReflectionConverter.unmarshallField(RobustReflectionConverter.java:262) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:222) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923) at hudson.util.XStream2.unmarshal(XStream2.java:67) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909) at hudson.XmlFile.unmarshal(XmlFile.java:148) ... 3 more Caused by: java.lang.IllegalArgumentException: Failed to parse 'hudson.model.Item.Release:m500488' --- no such permission at hudson.security.GlobalMatrixAuthorizationStrategy.add(GlobalMatrixAuthorizationStrategy.java:101) at hudson.security.GlobalMatrixAuthorizationStrategy.access$200(GlobalMatrixAuthorizationStrategy.java:65) at hudson.security.GlobalMatrixAuthorizationStrategy$ConverterImpl.unmarshal(GlobalMatrixAuthorizationStrategy.java:218) at hudson.security.ProjectMatrixAuthorizationStrategy$ConverterImpl.unmarshal(ProjectMatrixAuthorizationStrategy.java:84) at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:151) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) ... 19 more

    Jenkins JIRA | 7 years ago | chrisabit
    hudson.util.IOException2: Unable to read /usr/share/tomcat5/.hudson/config.xml

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.thoughtworks.xstream.converters.ConversionException

      null : null ---- Debugging information ---- cause-exception : java.lang.IllegalArgumentException cause-message : null class : hudson.model.Hudson required-type : hudson.security.GlobalMatrixAuthorizationStrategy path : /hudson/authorizationStrategy/permission[21] line number : 28 -------------------------------

      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert()
    2. XStream Core
      TreeUnmarshaller.convert
      1. com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
      1 frame