jenkins安装启动后,使用systemctl来进行进程监控

# systemctl enable jenkins

但是还是经常发生jenkins进程挂了,不会自动重启,通过systemctl查看状态为:

# systemctl status jenkins

● jenkins.service - LSB: Jenkins Automation Server

Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)

Active: active (exited) since Tue 2019-09-24 18:52:26 CST; 1 months 1 days ago

Docs: man:systemd-sysv-generator(8)

Tasks: 0

Memory: 0B

查看日志没有任何异常,可能的原因如下:

Possibly the Linux kernel's oom-killer ("out-of memory killer") killed your JVM. It sends a SIGKILL signal to selected processes if the physical memory is no longer sufficient to accomodate all processes. Check that output of journalctl for lines containing the string oom-killer to confirm.

It is normal that the oom-killer strikes only after a certain period. Normally, Linux does not impose restrictions on the amount of virtual memory that a process requests (so your JVM can easily allocate 2 GiB of RAM on a 512 MiB system). However, if the process starts actually using the allocated memory (in your case: amount of used heap grows), then the kernel may find that the amount of physical memory is no longer sufficient. This is the point where the oom-killer will select a promising candiate process to be killed. Jenkins, as a non-system process that consumes a lot of memory, has very good chances to be the one that will be killed.

You can solve the situation by

  • adding more physical memory to your system
  • reducing JVM memory settings (e.g., smaller heap)

修改jenkins占用内存

# vi /etc/sysconfig/jenkins

JENKINS_JAVA_OPTIONS="-Xmx512m"

参考:https://stackoverflow.com/questions/42607771/jenkins-active-exited

【原创】大叔经验分享(88)jenkins假死的更多相关文章

  1. 【原创】经验分享:一个小小emoji尽然牵扯出来这么多东西?

    前言 之前也分享过很多工作中踩坑的经验: 一个线上问题的思考:Eureka注册中心集群如何实现客户端请求负载及故障转移? [原创]经验分享:一个Content-Length引发的血案(almost.. ...

  2. 【原创】大叔经验分享(90)linux服务器iowait和负载很高

    # top top - 21:21:51 up 207 days, 1:30, 5 users, load average: 0.90, 0.79, 1.62 Tasks: 249 total, 1 ...

  3. 【原创】大叔经验分享(7)创建hive表时格式如何选择

    常用格式 textfile 需要定义分隔符,占用空间大,读写效率最低,非常容易发生冲突(分隔符)的一种格式,基本上只有需要导入数据的时候才会使用,比如导入csv文件: ROW FORMAT DELIM ...

  4. 【原创】大叔经验分享(30)CM开启kerberos

    kerberos安装详见:https://www.cnblogs.com/barneywill/p/10394164.html 一 为CM创建用户 # kadmin.local -q "ad ...

  5. 【原创】大叔经验分享(54)flume kudu sink运行一段时间kudu client报错

    flume kudu sink运行一段时间报错: 19/05/05 10:15:56 WARN client.ConnectToCluster: Error receiving a response ...

  6. 【原创】大叔经验分享(51)docker报错Exited (137)

    docker container启动失败,报错:Exited (137) *** ago,比如 Exited (137) 16 seconds ago 这时通过docker logs查不到任何日志,从 ...

  7. 【原创】大叔经验分享(50)hue访问mysql(librdbms)

    cloudera manager安装hue后想开启访问mysql(librdbms)需要在这里配置(hue_safety_valve.ini) 添加配置如下 [librdbms] # The RDBM ...

  8. 【原创】大叔经验分享(49)hue访问hdfs报错/hue访问oozie editor页面卡住

    hue中使用hue用户(hue admin)访问hdfs报错: Cannot access: /. Note: you are a Hue admin but not a HDFS superuser ...

  9. 【原创】大叔经验分享(48)oozie中通过shell执行impala

    oozie中通过shell执行impala,脚本如下: $ cat test_impala.sh #!/bin/sh /usr/bin/kinit -kt /tmp/impala.keytab imp ...

随机推荐

  1. PorterDuffXfermode之PorterDuff.Mode.XOR入门学习

    package com.loaderman.customviewdemo.view; import android.content.Context; import android.graphics.* ...

  2. Java根据实体快速生成对象

    一.来源 在写代码时总是遇到下面这种情况: Account account = new Account(); account.setId(); account.setGmtCreate(); acco ...

  3. Day5作业,商城+ATM机+后台管理

    晚来了....东西太多,需要写的blog内容太多,re讲的渣渣,不明白为什么oldboy经常换老师,吐槽下吧,真心不爱了.... github地址在这:https://github.com/ccorz ...

  4. 手写C++代码实现POST传输数据

    char *pHttpPost = "POST %s HTTP/1.1\r\n" "Host: %s:%d\r\n" "Content-Type: a ...

  5. maven仓库里如何搜索三方包?查看流行软件

    问题 这个仓库提供了搜索,但是功能比较弱,不支持groupid/artfactid的联合搜索 https://mvnrepository.com/ 解决 直接在搜索的url里添加groupid和art ...

  6. Egret入门学习日记 --- 第十七篇(书中 7.4~8.2节 内容)

    第十七篇(书中 7.4~8.2节 内容) 昨天看到 7.3 节,那么今天. 开始 7.4节.     好吧,这些其他的服务器运行知识,就不搞了... 至此,7.4节 内容结束. 开始 7.5节 内容. ...

  7. 【Aizu - 0189】Convenient Location (最短路 Floyd算法)

    Convenient Location 直接翻译了 Descriptions 明年毕业的A为就业而搬家.就职的公司在若干城市都有办公室,不同天出勤的办公室也不同.所以A在考虑住在哪去各个办公室的时长最 ...

  8. (二)MVC项目+c3p0连接池

    一.项目架构 注:删除了原有的数据库工具,添加了c3p0数据库工具类,添加了c3p0的配置文件,修改了Dao类以及servlet类 二.修改或添加的类 1.C3p0Helper(暂时不了解事务回滚之类 ...

  9. mysql学习之join从句

    一.join从句共有5种类型 内连接(inner join) 全外连接(full outer join) 左外连接(left outer join) 右外连接(right outer join) 交叉 ...

  10. nssm使用,安装服务、删除服务

    安装服务参考 nssm设置solr开机启动服务 删除服务 Windows删除服务 sc delete 服务名 nssm删除服务 nssm remove 服务名 nssm常用命令: nssm insta ...