After changing the port number in 8080 to 9999 and it not changing in jenkins. And it showing the default port number 8080 only.
I restart the jenkins service with this command also
"service jenkins restart" "systemctl jenkins restart"
but its not works, I worked on "Ubuntu 20.04.4 LTS" server
port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=9999
--httpPort=8080
CodePudding user response:
Please refer to this link: https://askubuntu.com/a/1401952/1586251 I answered the same question.
TLDR;
Refer to the documentations in: https://www.jenkins.io/doc/book/installing/linux/#debianubuntu
It says that you can modify by: systemctl edit jenkins
Then add the following lines:
[Service] Environment="JENKINS_PORT=9999"
Port should be your desired port to use. Save it and then restart jenkins: sudo systemctl restart jenkins