unable to start jenkins after editing matrix based security
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:
- Stop Jenkins (the easiest way to do this is to stopthe servlet container.)
- Go to
$JENKINS_HOME
in the file system and findconfig.xml
file.- Open this file in the editor.
- Look for the
<useSecurity>true</useSecurity>
element in this file.- Replace
true
withfalse
- Remove the elements
authorizationStrategy
andsecurityRealm
- Start Jenkins
- 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
.
Karthikeyan
GitHub : https://github.com/javapriyan LinkedIn : http://www.linkedin.com/pub/karthikeyan-annamalai/3a/300/aa
Updated on June 25, 2022Comments
-
Karthikeyan almost 2 years
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.
-
rogue lad about 10 yearsI couldn't found config.xml in my jenkins [v1.550].
-
Dhanasekaran Anbalagan about 10 yearsI am in ubuntu 12.04 machine.root@bugcy013:~# su - jenkins jenkins@bugcy013:~$ pwd /var/lib/jenkins jenkins@bugcy013:~$ cat /etc/passwd|grep jenkins jenkins:x:123:65534:Jenkins,,,:/var/lib/jenkins:/bin/bash jenkins@bugcy013:~$
-
Dhanasekaran Anbalagan about 10 yearsStop Jenkins (the easiest way to do this is to kill the servlet container.) Go to $JENKINS_HOME in the file system and find config.xml file. Open this file in the editor. Look for the <useSecurity>true</useSecurity> element in this file. Replace true with false Remove the elements authorizationStrategy and securityRealm Start Jenkins
-
Mustafa over 8 yearsi am on ubuntu and jenkins is started successfuly but
$JENKINS_HOME
is empty . i triedecho $JENKiNS_HOME
. empty -
Ondrej Rafaj about 8 yearssudo find / -name "config.xml"
-
Gerold Broser almost 7 yearsAgreed, the accepted answer is link-only, but that's basically just C&P of the last section of the Jenkins page linked there about three years before.
-
Gerold Broser almost 7 yearsThis is only the last resort (see the accepted answer) since you will reset all other configurations, too, which can be quite a lot.
-
Gerold Broser almost 7 yearsI guessed that it worked for you (otherwise you wouldn't put it as an answer here, hopefully ;) but that's not the point, which is that you gave an answer three years after and with the information of the accepted one rather than updating that answer which I did right now.
-
Gyuhyeon Lee about 6 yearsI was getting
java.lang.NullPointerException
because I locked myself out(...?). I think leaving the security realm elements intact while setting security to false caused that problem. Deleting the elements made it work again, thanks. -
Jesús Sánchez almost 5 yearsThanks, i used windows and when i changed the config.xml it's works.