jenkins.war arguments not respected?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

jenkins.war arguments not respected?

Juan Eiros


I am not sure if this is the right forum to raise this question. Please redirect as appropriate.

I want to run Jenkins running the WAR file directly ( as a daemonized process.

I see that there are some arguments that allow to change the port the web app is running on, as well as the prefix. These are, --httpPort and --prefix, respectively. I can see this running: java -jar jenkins.war --help

--httpPort               = set the http listening port. -1 to disable, Default is 8080

--prefix                 = add this prefix to all URLs (eg http://localhost:8080/prefix/resource). Default is none

--daemon                 = fork into background and run as daemon (Unix only)

So this is the command I ran:

java -jar jenkins.war --httpPort=16644 --prefix=jenkins-7521 --daemon

I can see this is running:

$ ps -ef | grep jenkins
username  3690     1  1 06:55 ?        00:00:14 java -Dcom.sun.akuma.Daemon=daemonized -jar jenkins.war --httpPort=16644 --prefix=jenkins-7521 --daemon

However, I get a 404 when trying to access the application both from a browser and using curl.404_jenkins.PNG

$ curl
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
<body><h2>HTTP ERROR 404 Not Found</h2>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<hr><a href="">Powered by Jetty:// 9.4.30.v20200611</a><hr/>


I've seen a mention in this thread ( to altering the JENKINS_ARGS and alter the prefix, however I think this only applies when running the Jenkins application through yum (Jenkins is run as a service). I can't find a mention to JENKINS_ARGS in the .jenkins subfolder made in the $HOME of the user that runs the java command:

$ pwd
$ grep -R 'JENKINS_ARGS'


Any ideas on what's going on?

Version details

jenkins.war is 2.249.1 LTS

$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
$ uname -a
Linux ab-rhel 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux


Juan Eiros

You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit