Jenkins 安裝啓動提示「iJob for jenkins.service failed because the control process exited with error code...

  經過RPM安裝Jenkins簡單方便,不太須要複雜的過程,可是在安裝完成之後啓動Jenkins的時候提示「Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.」,此時沒法啓動Jenkins,須要執行systemctl status jenkins.service來檢查下其狀態;java

經過檢查Jenkins的運行狀態咱們能夠捕捉到啓動的時候報錯「Starting Jenkins bash: /usr/bin/java: No such file or directory」,沒有找到jdk;bash

由於此時我默認安裝的jdk的路徑是「/usr/java/jdk1.8.0_91/bin/」,此時咱們須要修改下Jenkins的查找jdk的路徑;code

打開「Jenkins的啓動腳本路徑/etc/rc.d/init.d/jenkins」,搜索jdk的配置路徑jenkins

此時觀察咱們發現默認搜索的路徑是/usr/bin/java,因此須要變動成爲本身的jdk路徑「/usr/java/jdk1.8.0_91/bin/java」,注意須要指定到java的執行文件,修改完成從新啓動;it

這樣咱們就能夠成功的啓動Jenkins啦class

相關文章
相關標籤/搜索