記錄Jenkins升級到最新版遇到的問題

首先吐槽一下Jenkins:

1、安裝插件的時候無法根據Jenkins的版本號安裝對應的插件!

2、安裝插件安裝版本不一致的時候無法降低插件版本!

3、為啥要我們升級到最新版!

 

一、升級原因

我的Jenkins提示一堆插件不符合版本要求,無法使用,去插件網站下載低版本的插件發現也是無法解決,最後迫不得已只能升級Jenkins。垃圾Jenkins!

 

二、說明

因為我是通過yum安裝的Jenkins,沒升級之前 使用systemctl start jenkins 都沒問題。

Jenkins 從2.300 升級到最新版2.340,使用systemctl start jenkins 一直卡住,但是在另外的終端查看是有Jenkins進程啟動的,只是和原來的進程不一樣。

正常的情況下之後下面紅框的進程,明顯是多了兩個進程:

systemctl start jenkins 卡了很久之後,然後下面報錯:

Mar 25 15:50:54 gogslfs.leniu.com polkitd[599]: Registered Authentication Agent for unix-process:17645:1020038543 (system bus name :1.
Mar 25 15:50:54 gogslfs.leniu.com systemd[1]: Stopping LSB: Jenkins Automation Server...
-- Subject: Unit jenkins.service has begun shutting down
-- Defined-By: systemd
-- Support: //lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has begun shutting down.
Mar 25 15:50:55 gogslfs.leniu.com jenkins[17651]: Shutting down Jenkins [  OK  ]
Mar 25 15:50:55 gogslfs.leniu.com systemd[1]: Stopped LSB: Jenkins Automation Server.
-- Subject: Unit jenkins.service has finished shutting down
-- Defined-By: systemd
-- Support: //lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has finished shutting down.
Mar 25 15:50:55 gogslfs.leniu.com polkitd[599]: Unregistered Authentication Agent for unix-process:17645:1020038543 (system bus name :
Mar 25 15:51:19 gogslfs.leniu.com polkitd[599]: Registered Authentication Agent for unix-process:17671:1020041100 (system bus name :1.
Mar 25 15:51:19 gogslfs.leniu.com systemd[1]: Starting LSB: Jenkins Automation Server...
-- Subject: Unit jenkins.service has begun start-up
-- Defined-By: systemd
-- Support: //lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has begun starting up.
Mar 25 15:51:19 gogslfs.leniu.com runuser[17678]: pam_unix(runuser:session): session opened for user root by (uid=0)
Mar 25 15:51:24 gogslfs.leniu.com jenkins[17677]: Starting Jenkins WARNING: An illegal reflective access operation has occurred
Mar 25 15:51:24 gogslfs.leniu.com jenkins[17677]: WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:
Mar 25 15:51:24 gogslfs.leniu.com jenkins[17677]: WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vm
Mar 25 15:51:24 gogslfs.leniu.com jenkins[17677]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective 
Mar 25 15:51:24 gogslfs.leniu.com jenkins[17677]: WARNING: All illegal access operations will be denied in a future release
Mar 25 15:56:19 gogslfs.leniu.com systemd[1]: jenkins.service start operation timed out. Terminating.
Mar 25 15:56:19 gogslfs.leniu.com systemd[1]: Failed to start LSB: Jenkins Automation Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: //lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has failed.
-- 
-- The result is failed.
Mar 25 15:56:19 gogslfs.leniu.com systemd[1]: Unit jenkins.service entered failed state.
Mar 25 15:56:19 gogslfs.leniu.com systemd[1]: jenkins.service failed.
Mar 25 15:56:19 gogslfs.leniu.com polkitd[599]: Unregistered Authentication Agent for unix-process:17671:1020041100 (system bus na

 

 

但是是不影響Jenkins使用,也沒有相關的日誌報錯。

而且kill掉上面三個進程之後,如果使用systemctl start jenkins 啟動發現,發現沒有卡住,也沒有日誌輸出。而且是一下子就執行完了,但是實際上Jenkins沒有啟動。

解決方法:使用restart來啟動(很狗)具體原因未知!!!!但是Jenkins能正常使用。

systemctl restart jenkins

Tags: