Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change port for jenkins window service when 8080 is being used

Tags:

jenkins

I installed Jenkins on a windows virtual server and want to run it as window service.

Since the port 8080 is being used by other service, I changed the http port to 8081 in jenkins.xml file. However, I am not able to launch localhost:8081/jenkins at all. I need detail instruction/steps to configure port 8081 or something to run Jenkins.

like image 509
victorialei Avatar asked May 20 '14 20:05

victorialei


People also ask

How do I change the port in Jenkins when default port 8080 is being used?

You can find this file in the Jenkins install folder (the default path is C:\Program Files\Jenkins\jenkins. xml). Open the file using a text editor such as Notepad or Notepad++. Scroll down until you find the line that contains --httpPort=8080 and change the number to the port you want to set.

How do I stop Jenkins running on port 8080?

Runs Jenkins listener on port $HTTP_PORT using standard http protocol. The default is port 8080. To disable (because you're using https), use port -1 . This option does not impact the root URL being generated within Jenkins logic (UI, inbound agent files, etc.).

How to run Jenkins on port 80?

When you install Jenkins, by default the Jenkins service runs on port 8080. Also, there is no direct option to run Jenkins on port 80. In this tutorial, we have explained the steps to setup Jenkins access on port 80.

How do I run Jenkins on a docker container?

Host your Jenkins on a docker container and map the port 80 on your docker host daemon to 8080 on the container. You can use docker run command to start jenkins along with the -p argument to supply port values.

What is the Jenkins_port variable in Jenkins?

The purpose of the first file is exactly the customization of the second file. So, within /etc/sysconfig/jenkins, there is a the JENKINS_PORT variable that holds the port number on which Jenkins is running.

How do I start Jenkins from the command line?

Use the following command at command prompt: If you want to use https use the following command: @SteveGreen: The above mentioned commands are starting Jenkins from the command line.


2 Answers

  1. Go to the directory where you installed Jenkins (by default, it's under Program Files/Jenkins)
  2. Open the Jenkins.xml configuration file
  3. Search --httpPort=8080 and replace the 8080 with the new port number that you wish
  4. Restart Jenkins for changes to take effect
like image 84
Nuh Metin Güler Avatar answered Sep 20 '22 08:09

Nuh Metin Güler


Restart Jenkins service

Just restart the Jenkins service after you changed the port in jenkins.xml.

  1. Press Win + R
  2. Type "services.msc"
  3. Right click on the "Jenkins" line > Restart

    Restart Jenkins

  4. Type http://localhost:8081/ in your browser to test the change.

like image 28
ROMANIA_engineer Avatar answered Sep 22 '22 08:09

ROMANIA_engineer