1

"Unable to access jarfile jenkins.war" getting this error while run the cmd "java -jar jenkins.war" in OS- windows 7

How can I solve? i did installation as per what showed in youtube

Surendra T
  • 11
  • 1
  • 1
  • 2
  • Note: `running java -jar jenkins.war` most definitively does *not* require to be run as administrator. – VonC Apr 23 '17 at 03:43

6 Answers6

4

Command java -jar jenkins.war in Win7 command line require administrator permission.

Right click on the cmd icon and choose the Run as administrator option.

It worked for Windows 8 too.

Andy K
  • 4,944
  • 10
  • 53
  • 82
Luka Chapukhin
  • 103
  • 1
  • 10
  • hi @luka-chapukhin, please add some context – Andy K Apr 22 '17 at 09:00
  • 1
    Hi Andy, @Surendra-T mentioned that he ran "java -jar jenkins.war" commnad in Windows 7 cmd, this action require an administrators permission, so just do right click on the cmd icon and choose 'Run as administrator' option. – Luka Chapukhin Apr 22 '17 at 09:52
  • @luka-capukhin see VonC's answer as some sort of template. It should help you to get my idea. You can add your comment in your answer. :) – Andy K Apr 22 '17 at 10:26
  • 1
    Thank you for good advices Andy. Moved from comment to answer. – Luka Chapukhin Apr 22 '17 at 15:41
1

I also faced this issue after I updated the jenkins version.

The error message was found in <jenkins_dir>/jenkins.error.log


Resolved Step:

  1. Download your jenkins.war at https://updates.jenkins-ci.org/download/war/
  2. Put jenkins.war to your jenkins work directory
  3. Go Jenkins Service and restart it
  4. Enjoy it!

Ref: Cannot start Jenkins

W. Dan
  • 906
  • 8
  • 10
0

Make sure you are executing that command in the folder where jenkins.war is actually installed.

Also check if the file is readable, and not preempted by another process (you can check that with Process Explorer)

Finally, double-check the size of jenkins.war, to see if the download was complete, and the file is not corrupted (incomplete or small size): see the list of jenkins.war released.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Open Command Prompt as Administrator in Windows . Go to the directory where Jenkins is installed. and stop the Jenkins service first, using jenkins.exe stop

type the command to change the port using, java -jar jenkins.war

You will be able to access the .war file of Jenkins.

0

I had the same issue. What worked for me was adding .jar to the file name, like

java -jar jenkins.war.jar

in case that you face an error that says, "Failed to listen on port 8080" There is an answer here that worked for me, by pasting the following on cmd,

java -jar jenkins.war.jar --ajp13Port=-1 --httpPort=9090
mk_sch
  • 1,060
  • 4
  • 16
  • 31
0

do not create a folder for jenkins.war file store it right inside downloads direction then go to your terminal go to downloads direction not to jenkins.war file direction then type java -jar jenkins.war it will work