如何使用Bash启动Jenkins?

时间:2019-02-19 00:24:32

标签: bash jenkins vagrant

sudo systemctl status jenkins
● jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; generated)
   Active: failed (Result: exit-code) since Tue 2019-02-19 00:14:29 UTC; 43s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 878 ExecStart=/etc/init.d/jenkins start (code=exited, status=7)

Feb 19 00:14:28 vagrant jenkins[878]: Correct java version found
Feb 19 00:14:28 vagrant jenkins[878]:  * Starting Jenkins Automation Server jenkins
Feb 19 00:14:28 vagrant su[947]: Successful su for jenkins by root
Feb 19 00:14:28 vagrant su[947]: + ??? root:jenkins
Feb 19 00:14:28 vagrant su[947]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Feb 19 00:14:28 vagrant su[947]: pam_unix(su:session): session closed for user jenkins
Feb 19 00:14:29 vagrant jenkins[878]:    ...fail!
Feb 19 00:14:29 vagrant systemd[1]: jenkins.service: Control process exited, code=exited status=7
Feb 19 00:14:29 vagrant systemd[1]: jenkins.service: Failed with result 'exit-code'.
Feb 19 00:14:29 vagrant systemd[1]: Failed to start LSB: Start Jenkins at boot time.

我正在使用Vagrant共享我的Vagrant测试工作区

jenkins.vm.synced_folder "E:/Jenkins_tests_server", "/home/vagrant/jenkins_shared" , owner: "jenkins", group: "jenkins"
enter code here

添加一些解决方法来绕过Java throw io问题。

JAVA_ARGS="-Djava.awt.headless=true -Djava.io.tmpdir=/home/vagrant/jenkins_shared/"

詹金斯之家

JENKINS_HOME=/home/vagrant/jenkins_shared/

现在,我必须手动启动Jenkins进程,以使其在每次引导时发生。

sudo systemctl start jenkins

0 个答案:

没有答案