Jenkins Server Keeps Rebooting

Jenkins setup:

Jenkins: 2.426.3
OS: Linux - 5.4.0-171-generic
Java: 11.0.21 - Ubuntu (OpenJDK 64-Bit Server VM)

After upgrading my jenkins server, the server keeps rebooting by itself. Here is a log example:

Feb 14 02:40:47 young jenkins[83887]: 2024-02-14 02:40:47.080+0000 [id=32]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
Feb 14 02:40:47 young jenkins[83887]: 2024-02-14 02:40:47.148+0000 [id=28]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Started all plugins
Feb 14 02:40:47 young jenkins[83887]: WARNING: An illegal reflective access operation has occurred
Feb 14 02:40:47 young jenkins[83887]: WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/var/cache/jenkins/war/WEB-INF/lib/groovy-all-2.4.21.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
Feb 14 02:40:47 young jenkins[83887]: WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
Feb 14 02:40:47 young jenkins[83887]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Feb 14 02:40:47 young jenkins[83887]: WARNING: All illegal access operations will be denied in a future release
Feb 14 02:40:49 young jenkins[83887]: 2024-02-14 02:40:49.351+0000 [id=29]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
Feb 14 02:40:49 young jenkins[83887]: 2024-02-14 02:40:49.542+0000 [id=32]#011INFO#011h.p.b.g.GlobalTimeOutConfiguration#load: global timeout not set
Feb 14 02:40:50 young jenkins[83887]: 2024-02-14 02:40:50.766+0000 [id=29]#011INFO#011hudson.slaves.SlaveComputer#tryReconnect: Attempting to reconnect gisela
Feb 14 02:40:50 young jenkins[83887]: 2024-02-14 02:40:50.793+0000 [id=29]#011INFO#011hudson.slaves.SlaveComputer#tryReconnect: Attempting to reconnect pine
Feb 14 02:40:50 young jenkins[83887]: 2024-02-14 02:40:50.968+0000 [id=29]#011INFO#011jenkins.InitReactorRunner$1#onAttained: System config loaded
Feb 14 02:40:52 young jenkins[83887]: 2024-02-14 02:40:52.011+0000 [id=31]#011INFO#011jenkins.InitReactorRunner$1#onAttained: System config adapted
Feb 14 02:40:52 young jenkins[83887]: 2024-02-14 02:40:52.015+0000 [id=28]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
Feb 14 02:40:52 young jenkins[83887]: 2024-02-14 02:40:52.028+0000 [id=28]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
Feb 14 02:40:52 young jenkins[83887]: 2024-02-14 02:40:52.169+0000 [id=28]#011INFO#011jenkins.InitReactorRunner$1#onAttained: Completed initialization
Feb 14 02:40:52 young jenkins[83887]: 2024-02-14 02:40:52.264+0000 [id=22]#011INFO#011hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
Feb 14 02:40:52 young systemd[1]: Started Jenkins Continuous Integration Server.
Feb 14 02:40:59 young jenkins[83887]: [02/14/24 02:40:59] SSH Launch of pine on 192.168.88.42 completed in 7,830 ms
Feb 14 02:41:08 young jenkins[83887]: [02/14/24 02:41:08] SSH Launch of gisela on 192.168.88.40 completed in 16,609 ms
Feb 14 02:42:17 young systemd[1]: jenkins.service: Main process exited, code=killed, status=9/KILL
Feb 14 02:42:18 young systemd[1]: jenkins.service: Failed with result 'signal'.
Feb 14 02:42:18 young systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 13.
Feb 14 02:42:18 young systemd[1]: Stopped Jenkins Continuous Integration Server.
Feb 14 02:42:18 young systemd[1]: Starting Jenkins Continuous Integration Server...
Feb 14 02:42:19 young jenkins[86494]: Running from: /usr/share/java/jenkins.war
Feb 14 02:42:20 young jenkins[86494]: 2024-02-14 02:42:19.976+0000 [id=1]#011INFO#011winstone.Logger#logInternal: Beginning extraction from war file

What could be the problem or where should I go to collect more info?

@zhangjinzhou
can you check /var/log/jenkins/jenkins.log
ref: Viewing logs

It’s empty. The latest log in there was 2022 about EC2 agent.

what if you try checking “sudo journalctl -xe” or “sudo journalctl -u jenkins”

the “sudo journalctl -xe” returns very similar result as /var/log/syslog
the “sudo journalctl -u jenkins” has no recent log.

@zhangjinzhou
May i know how you upgraded jenkins?

It was through apt-get.
I have some new clues. There is usually about 2 mins between the jenkins server fully started and the reboot. During the 2 mins, the memory usage starts at 500MB and jumps to 1.2GB suddenly. And then the reboot will be triggered. So could the memory usage be the trigger of the reboot?

that might be the cause.

@zhangjinzhou was apt-get the same method of initial installation?

I ask because using different methods can lead to performance instability, in my experiences.