Seeing vote down: I did the steps again on fresh server.
There were ** characters and I removed that
There were missing $sign for tomcat like this $TOMCAT_VERSION
(Both corrected and it is working) (updated on 28.03.2016)
Disable the security as given below:
http://markunsworth.com/2012/02/13/locked-yourself-out-of-jenkins/
Unable to login jenkins, and can't disable login option either
Or
Locked in login with Jenkins on Tomcat.
http://xx.xxx.xxx.xxx:8080/jenkins/login?from=/jenkins/
and after filling the userId Password, which was not set up at all, will always take to this page
http://xx.xxx.xxx.xxx:8080/jenkins/j_acegi_security_check
HTTP Status 404 - description The requested resource is not available.
I had .war file installed in tomcat
It took me long to fix this issue.
I had many times completely removed Tomcat, Jenkins all folders .jenkins etc reinstalled and what not...
Remove both Tomcat and Jenkins completely once again...
The solution is proper use of user and group, let us see how to it by running the following commands one by one.
You are logged in with user(e.g. vimal) with sudo permission.
vimal@h123:~$ sudo apt-get update
vimal@h123:~$ BASE_USER=vimal
vimal@h123:~$ sudo chown -Rf $BASE_USER:$BASE_USER /opt/
vimal@h123:~$ USER=apache-tomcat
vimal@h123:~$ GROUP=myjenkins
vimal@h123:~$ TOMCAT_INSTALL_DIR=/opt
vimal@h123:~$ TOMCAT_VERSION=apache-tomcat-8.0.23
vimal@h123:~$ TOMCAT_URL=http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.23/bin/apache-tomcat-8.0.23.zip
For TOMCAT_URL, copy the link that you need from archive/src (.zip) of tomcat download site
vimal@h123:~$ mkdir -p $TOMCAT_INSTALL_DIR
vimal@h123:~$ cd $TOMCAT_INSTALL_DIR
vimal@h123:~$ wget $TOMCAT_URL
vimal@h123:~$ unzip -q $TOMCAT_VERSION.zip
vimal@h123:~$ rm $TOMCAT_VERSION.zip
Before running command below you need to have JAVA_HOME set up in like JAVA_HOME="/usr/lib/jvm/java-8-oracle/" by adding this into
sudo nano /etc/environment
vimal@h123:~$ sudo chmod +x $TOMCAT_INSTALL_DIR/$TOMCAT_VERSION/bin/*.sh
vimal@h123:~$ $TOMCAT_INSTALL_DIR/$TOMCAT_VERSION/bin/catalina.sh start
vimal@h123:~$
vimal@h123:~$ cd $TOMCAT_INSTALL_DIR/$TOMCAT_VERSION/webapps/
vimal@h123:~$ wget http://mirrors.jenkins-ci.org/war-stable/latest/jenkins.war
Wait for a couple of minutes till Jenkins is fully loaded. Needs 2GB memory.
Try going to the browser on http://xx.xxx.xxx.xxx:8080/jenkins/ and it will work...
Took me one day to find the solution.
j_acegi_security_check
blank page on login attempt, on Chrome and Opera on Windows. Turns out the problem was I had a Fiddler proxy enabled which for some reason was preventing me from logging in.