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. flume 诞生背景 数据同步

    flume一开始是cloudlera的项目 当时他们的工程师需要一次次地为客户编写工具 来实现数据的自动化导入

  2. vue使用install函数把组件做成插件方便全局调用

    在vue项目中,我们可以自定义组件,像element-ui一样使用Vue.use()方法来使用,具体实现方法: 1.首先新建一个Cmponent.vue文件 // Cmponent.vue <t ...

  3. MySQL查询获取行号rownum

    MySQL中可以使用变量产生行号,下面是2个简单例子: 使用工具:MySQL Workbench 说明:表heyf_10中字段,empid(员工工号).deptid(部门编号).salary(薪资): ...

  4. opencv常见示例

    1.批量转换灰度图并保存 #include <iostream> #include <opencv2/opencv.hpp> #include <string> u ...

  5. SQL-W3School-测验:SQL 测验

    ylbtech-SQL-W3School-测验:SQL 测验 1.返回顶部 1. 您可以通过 W3SCHOOL 的测验程序来测试您的 SQL 技能. 关于本测验 本测验包含 20 道题,每道题的最长答 ...

  6. Java8 新特性之Stream

    1.Student package com.elk.log.myTest; public class Student implements Comparable<Student> { /* ...

  7. PS 实用技巧

    1.  调整大小     ctrl + T 2. 导出透明背景图片    选择  png格式

  8. ARM程序的RO段、RW段和ZI段 --Image

    Limit 含义了解RO,RW和ZI需要首先了解以下知识:ARM程序的组成此处所说的“ARM程序”是指在ARM系统中正在执行的程序,而非保存在ROM中的bin映像(image)文件,这一点清注意区别. ...

  9. Qt编写控件属性设计器6-动态属性

    一.前言 之前就提过,Qt的属性机制强大到爆,这次的动态属性功能就是要让他爆,很难想象只要一行代码即可widget->setProperty("value", value); ...

  10. 一百四十五:CMS系统之帖子加精和取消加精

    模型 class HighlightPostModel(db.Model): """ 帖子加精信息 """ __tablename__ = ...