Locked out of Jenkins

1,761 views
Skip to first unread message

Levente Barabas

unread,
Oct 10, 2016, 4:18:44 AM10/10/16
to Jenkins Users
Hello,

After some plugin updates I locked myself out of Jenkins.
I tried modifying the security options from the config.xml file as discussed on other forums but unfortunately it does not work.
The error message is the following:

hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read D:\jenkins\config.xml
at hudson.WebAppMain$3.run(WebAppMain.java:244)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read D:\jenkins\config.xml
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:45)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1009)
at jenkins.model.Jenkins.<init>(Jenkins.java:877)
at hudson.model.Hudson.<init>(Hudson.java:85)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.WebAppMain$3.run(WebAppMain.java:227)
Caused by: java.io.IOException: Unable to read D:\jenkins\config.xml
at hudson.XmlFile.unmarshal(XmlFile.java:165)
at jenkins.model.Jenkins.loadConfig(Jenkins.java:2785)
at jenkins.model.Jenkins.access$700(Jenkins.java:324)
at jenkins.model.Jenkins$16.run(Jenkins.java:2803)
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:998)
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(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
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         : 171
version             : not available
-------------------------------
at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:356)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:270)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
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:163)
... 11 more
Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: hudson.plugins.active_directory.ActiveDirectorySecurityRealm
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at hudson.util.XStream2$CompatibilityMapper.realClass(XStream2.java:282)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at hudson.util.xstream.MapperDelegate.realClass(MapperDelegate.java:43)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:48)
at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:461)
at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:327)
... 22 more

Any suggestions?
Thank you in advance for your help!

Daniel Beck

unread,
Oct 10, 2016, 6:24:05 AM10/10/16
to jenkins...@googlegroups.com
You likely disabled or uninstalled the Active Directory Plugin while it was your instance's security realm.

https://wiki.jenkins-ci.org/display/JENKINS/Disable+security
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bb54169e-b635-4f90-a7b9-5e64458b2d87%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Levente Barabas

unread,
Oct 10, 2016, 6:37:59 AM10/10/16
to Jenkins Users, m...@beckweb.net
I just checked and it is not uninstalled.

Daniel Beck

unread,
Oct 10, 2016, 6:42:22 AM10/10/16
to jenkins...@googlegroups.com

> On 10.10.2016, at 12:37, Levente Barabas <levi...@gmail.com> wrote:
>
> I just checked and it is not uninstalled.

Then it may be disabled, or something else during startup forces it to become disabled. In both cases, it will be logged.

Levente Barabas

unread,
Oct 10, 2016, 6:54:35 AM10/10/16
to Jenkins Users, m...@beckweb.net

Do you have any suggestion on how may I check this or enable it in case it is being disabled during startup?
   Thank you for your time! 

Jennifer Hofmeister

unread,
Oct 10, 2016, 8:48:50 AM10/10/16
to jenkins...@googlegroups.com

You could search your Jenkins home directory for logs, e.g. $JENKINS_HOME/monitoring or maybe /logs.

--

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Sam K

unread,
Oct 10, 2016, 1:22:29 PM10/10/16
to Jenkins Users
I have been in this situation before, and have learnt a lesson since then never to close the window and never to use 'save' but use 'apply' instead, use a incognito window and make sure I still am able to login before closing the main window.

That said, how about installing another version of Jenkins on another computer, use that config.xml, and try to restart jenkins?  Then slowly make the changes that you had previously.  You could even check the differences between the two and find the culprit. Sorry, that is not the best answer you were expecting but something to get by. 

shobha t s

unread,
Oct 12, 2017, 8:19:21 AM10/12/17
to Jenkins Users
removing this flag "ldap.jpi.disabled" from the jenkins plugin page would resolve this issue
Reply all
Reply to author
Forward
0 new messages