问题描述
我启动了一个 aws ec2 实例,它正在运行 jenkins。它运行良好,但几天后自动停止运行。 我使用 dmesg 诊断了问题,但出现以下错误
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/jenkins.service,task=java,pid=1168,uid=993
[233949.461595] Out of memory: Killed process 1168 (java) total-vm:2251668kB,anon-RSS:317444kB,file-RSS:0kB,shmem-RSS:0kB,UID:993
[233949.566855] oom_reaper: reaped process 1168 (java),Now anon-RSS:0kB,shmem-RSS:0kB
[ec2-user@ip-172-31-18-74 ~]$ ^C
[ec2-user@ip-172-31-18-74 ~]$ ps -f 1168
UID PID PPID C STIME TTY STAT TIME CMD
我在网上找到的解决方案是编辑 /var/lib/jenkins 中的 jenkins.xml。但我找不到 jenkins.xml 而我有 config.xml
?xml version='2.1' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors>
<string>jenkins.diagnostics.RootUrlNotSetMonitor</string>
</disabledAdministrativeMonitors>
<version>2.263.4</version>
<installStateName>RUNNING</installStateName>
<numExecutors>2</numExecutors>
<mode>norMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
<denyAnonymousReadAccess>true</denyAnonymousReadAccess>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>
<disableRememberMe>false</disableRememberMe>
<projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
<workspaceDir>${JENKINS_HOME}/workspace/${ITEM_FULL_NAME}</workspaceDir>
<buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
<jdks>
<jdk>
<name>Java</name>
<home>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.x86_64</home>
<properties/>
</jdk>
</jdks>
<viewsTabBar class="hudson.views.defaultviewsTabBar"/>
<myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
<clouds/>
<scmCheckoutRetryCount>0</scmCheckoutRetryCount>
<views>
<hudson.model.AllView>
<owner class="hudson" reference="../../.."/>
<name>all</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
</hudson.model.AllView>
</views>
<primaryView>all</primaryView>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)