我将端口8080用于tomcat,并在更改
后运行jenkins服务HTTP_PORT=8080
到
HTTP_PORT=8083
(和9999,8081)
在/etc/default/jenkins
中,我的浏览器无法访问它,但终端中没有显示任何错误。
但是,如果我将端口更改回8080并停止tomcat(使用端口8080),则可以正常工作。
如何将jenkins的端口更改为8080以外的端口?谢谢!
Jenkins日志:
Apr 04, 2016 6:42:06 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Apr 04, 2016 6:42:06 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.9
Apr 04, 2016 6:42:10 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
Apr 04, 2016 6:42:11 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8083
Apr 04, 2016 6:42:11 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Apr 04, 2016 6:42:12 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 04, 2016 6:42:12 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 04, 2016 6:42:12 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Apr 04, 2016 6:42:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Apr 04, 2016 6:42:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Apr 04, 2016 6:42:18 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Apr 04, 2016 6:42:19 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Apr 04, 2016 6:42:19 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 11 ms
Apr 04, 2016 6:42:20 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 37431
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Apr 04, 2016 6:42:20 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 04, 2016 6:42:20 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
答案 0 :(得分:0)
首先更改/etc/default/jenkins
中的端口号。
然后使用sudo service jenkins restart
重新启动Jenkins。