0

I am running Jenkins from the WAR file on Windows. I came across the option to change the port via the --httpPort option, which worked and the instance got launched on my desired port. However when i tried to create the service from the UI it fell back to port 8080. How can i start Jenkins from the WAR File as a service on other than 8080 port?

Nathan
  • 674
  • 8
  • 22

1 Answers1

1

Please follow the below steps:-

1. Open the Jenkins.xml configuration file and search for string --httpPort=8080
2. Replace the 8080 with the new port.
3. Restart Jenkins for changes to take effect ( you ca also restart Jenkins from the windows services running your machine)

Please follow the answer for more information.

user_9090
  • 1,884
  • 11
  • 28
  • while launching from the cmdline it doesn't take the updated `jenkins.xml` file - which i still don't know why rather i need to pass the `--httpPort=` to get it to work. For the service - when you install the service it resets the configuration file. Once the service is installed before starting it, i had to go and redo these values in that file to get it to work. Also the service failed to locate Java for which i had to update the absolute path of java in the executable tag. and for Java 12.0 i had to append `--enable-future-java` at the end of the command. Thanks for the help – Nathan Sep 04 '19 at 15:26