7

To upgrade Jenkins from version 1.466.2 to version 1.557, I replaced the old jenkins war file with jenkins war file in the directory /usr/share/jenkins. Then on restarting the jenkins from command line I started getting the new Jenkins version 1.557. But sometime later I messed with security part of it, I checked the security check box while configuring Jenkins. Now I am not able to use Jenkins, if I go to myproject.com:3300 it gives me error: hudson.security.AccessDeniedException2: anonymous is missing the Overall/Administer permission.
To fix this error I found that I need to change <usesecurity> from true to false. But when I go to the var/lib/jenkins (which home directory of Jenkins) to edit config.xml. I am still seeing the old version version 1.466.2 but in GUI at myproject.com:3300 it shows new version.

I am stuck here, please let me know what am I missing, how can I get it running.

paul
  • 4,333
  • 16
  • 71
  • 144

1 Answers1

7

You are right that you need to change <usessecurity> in $JENKINS_HOME/config.xml. I wouldn't worry about the config file having a different version. Shutdown the process. Change the file. Restart the process.

But if after this you are seeing no change and still can't login, maybe your Jenkins home is something else

Slav
  • 27,057
  • 11
  • 80
  • 104
  • I also think restart would work, because since I changed the config.xml I didn't restart. But how to restart. I can't see jenkins file in home folder i.e. **/var/lib/jenkins** and if it is lying in **/etc/default/** folder, there on executing restart it says **command not found**; I tried sudo **/etc/default/jenkins restart**. Third way, I tried **myproject.com:3300/restart** it takes me to error page that explained above. – paul Apr 04 '14 at 06:17
  • That it depends on how you installed it. **[This answer has a lot of options listed for linux installations](http://stackoverflow.com/questions/8072700/jenkins-manual-restart)** – Slav Apr 04 '14 at 12:59
  • All you have to do is to go to that machine, do a ps -eAf|grep -I "jenkins". Whatever pid you'll see, you'll know how you started the instance (i.e. using java -jar ... way or behind Tomcat, etc). Once the PID is killed (kill -15 pidxxx), start the process again by running the same command which you found against that PID you just killed (java -jar ... way - you can write a script to do that), or running Tomcat stop/start will restart it too if Jenkins is behind Tomcat under webapps directory – AKS Jul 02 '14 at 15:26