我正在尝试运行命令java -jar jenkins.war
。它可以成功运行,并且我可以通过http://localhost:8080访问它。
但是当我从命令行键入 CTRL + C 时,jenkins服务就会关闭。
有人可以告诉我这个问题是什么吗?
LOG
-
-bash-4.1$ java -jar jenkins.war
Running from: /home/htr/temp/jenkins.war
webroot: $user.home/.jenkins
Oct 16, 2018 6:02:18 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Oct 16, 2018 6:02:18 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.9
Oct 16, 2018 6:02:21 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /home/htr/.jenkins found at: $user.home/.jenkins
Oct 16, 2018 6:02:22 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8080
Oct 16, 2018 6:02:22 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Oct 16, 2018 6:02:22 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Oct 16, 2018 6:02:22 AM hudson.init.impl.InstallUncaughtExceptionHandler init
INFO: Succesfully installed a global UncaughtExceptionHandler.
Oct 16, 2018 6:02:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Oct 16, 2018 6:02:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Oct 16, 2018 6:02:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Oct 16, 2018 6:02:23 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Oct 16, 2018 6:02:26 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Oct 16, 2018 6:02:26 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 44513
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Oct 16, 2018 6:02:26 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Oct 16, 2018 6:02:26 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Oct 16, 2018 6:04:33 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 127,379 ms
jenkins version : 1.654
java version:
openjdk ve**strong text**rsion "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
有人可以告诉我是否需要以sudo用户身份运行jenkins,或者是否是由于其他问题?
答案 0 :(得分:1)
答案 1 :(得分:0)
您已将其安装为独立服务器。如果要保持詹金斯运行,请保持该终端不变。要执行其他操作,请打开单独的终端/ cmd。
答案 2 :(得分:0)
您可以将其安装为服务,它在后台运行并在计算机启动时启动。您还可以更改启动端口。默认为8080
如果在将其作为服务安装时遇到问题,请尝试首先从以管理员模式打开的cmd启动jenkins,然后执行上述步骤。