Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to start jenkins after editing matrix based security

I deployed latest jenkins war in tomcatrunning on my W$7 machine.During my first log in i configured something in matrix based security as explained here.After adding a user in the matrix, ia m unable to load the jenkins. The following error stack is shown. For complete stack trace please visit here..

Now, When i go to the login page, i could see the login form. Do we have any default login to proceed ?

Note: as described in that article i don't see create an account tab in the login page. Hence i am unable to proceed.

Stack trace :

hudson.security.AccessDeniedException2: anonymous is missing the Overall/Read permission
at hudson.security.ACL.checkPermission(ACL.java:54)
at hudson.model.Node.checkPermission(Node.java:418)
at jenkins.model.Jenkins.getTarget(Jenkins.java:3680)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:612)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:587)
at org.kohsuke.stapler.Stapler.service(Stapler.java:218)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)

Edit:

I have also, redeployed the war.The issue was still there.

So then, i have downloaded the fresh war file from the JenKins site and deployed in the tomcat of xampp. When ever, i navigate to the jenkins app , the Java SE crashes.

like image 635
Karthikeyan Avatar asked Nov 26 '13 10:11

Karthikeyan


1 Answers

It looks like you locked yourself out. Here are the lock picker instructions:

Securing Jenkins

...

Disabling Security

One may accidentally set up security realm / authorization in such a way that you may no longer able to reconfigure Jenkins.

When this happens, you can fix this by the following steps:

  1. Stop Jenkins (the easiest way to do this is to stopthe servlet container.)
  2. Go to $JENKINS_HOME in the file system and find config.xml file.
  3. Open this file in the editor.
  4. Look for the <useSecurity>true</useSecurity> element in this file.
  5. Replace true with false
  6. Remove the elements authorizationStrategy and securityRealm
  7. Start Jenkins
  8. When Jenkins comes back, it will be in an unsecured mode where everyone gets full access to the system.

If this is still not working, trying renaming or deleting config.xml.

like image 124
Peter Schuetze Avatar answered Nov 15 '22 23:11

Peter Schuetze