Jenkins报错'Gradle build daemon disappeared unexpectedly'的问题解决
在将项目集成到 Jenkins 后,经常会出现不稳定的构建,Jenkins 控制台输出的错误信息为:Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)。
经过调查,问题可能出在 ./gradlew assembleDebug 这条命令上。
通过查看Gradle的官方文档,得知从 Gradle 3.0 开始,Daemon 便默认开启的。它是一个长时间运行的后台进程,作用是在内存中存储构建信息,以便在之后的构建过程中复用信息提高构建速度。
但是在文档中,也提到一句:If you run CI builds in ephemeral environments (such as containers) that do not reuse any processes, use of the Daemon will slightly decrease performance (due to caching additional information) for no benefit, and may be disabled. 大概的意思是如果通过CI(持续集成)进行项目构建,Daemon 就没多大作用了,反倒会因为存储额外的信息而降低系统性能,从而导致被停用。
那么,如何在 Jenkins 里停止使用 Daemon 呢?
很简单,如下:
./gradlew --no-daemon assembleDebug
在命令里加入一个 --no-daemon 参数就好啦。
Jenkins报错'Gradle build daemon disappeared unexpectedly'的问题解决的更多相关文章
- linux服务器使用Jenkins+gradle+git打apk包,报错Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
linux服务器使用Jenkins+gradle+git打apk包,遇到的错误Gradle build daemon disappeared unexpectedly (it may have bee ...
- Jenkins 报错合集
目录 一.启动项目显示,没有接受许可之前不能够自动安装 二.明明配置了jdk但还是说找不到 三.jenkins-RestAPI调用出现Error 403 No valid crumb was incl ...
- 在spring添加注解时,第一行package报错configure build path
练习spring的ioc的注解的时候写上注解就会在第一行package报错configure build path. 用的spring4.2.4的jar包.经过上网查阅资料,可能是jar包冲突,解决办 ...
- 【Mac + Appium】之运行报错:[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
产生下面的原因是因为:与uiautomator2的weditor冲突,两者不能同时使用. 有时打开appium时会报错: [UiAutomator] UiAutomator exited unexpe ...
- jenkins报错;自定义工作目录;
[1]no such file 报错: 如果jdk配置路径错误,有可能会报这样的错误: 其实只要在/etc/profile中配置好JAVA_HOME就足够了: 对应的系统配置框,留空不新加即可: [2 ...
- Jenkins报错Caused: java.io.IOException: Cannot run program "sh" (in directory "D:\Jenkins\Jenkins_home\workspace\jmeter_test"): CreateProcess error=2, 系统找不到指定的文件。
想在本地执行我的python文件,我本地搭建了一个Jenkins,使用了execute shell来运行我的脚本,发现报错 [jmeter_test] $ sh -xe D:\tomcat\apach ...
- jenkins报错The goal you specified requires a project to execute but there is no POM inthis directory
报错截图及详细: 15:30:29[ERROR]The goal you specified requires a project to execute but there is no POM i ...
- vs code调试console程序报错--preLaunchTask“build”
网上有其他大神给出的建议是注释掉launch.json中的 "preLaunchTask": "build", 但是这种方式也会造成一个问题,就是再使用F5调试 ...
- 解决 docker 报错: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver
CentOS 7.5 x64下 sudo yum install docker -y systemctl enable docker systemctl start docker 发现启动失败 jou ...
随机推荐
- Kubernetes-1
master 节点负责管理整个集群,管理的控制面板,全局的角色和调度 3个组件 API Server : 统一入口 kubectl 客户端管理工具 Etcd 数据库 Scheduler 集群的调度 C ...
- HoloLens开发手记-配置开发环境 Install the tools
随着Build 2016开发者大会的结束,HoloLens开发包也正式开放下载.Hololens没有独立的SDK,开发特性被集成到最新的Visual Studio Update 2中.如果你没有Hol ...
- .NET手记-HttpClient解析GB2312乱码问题
最近为App的服务器端卸了个爬虫程序,输出结果时发现出现乱码现象,尝试使用了几个方案发现效果并不太好,最后发现了一个很简单的用法. var result = await client.GetByteA ...
- Spring 源码分析之 bean 依赖注入原理(注入属性)
最近在研究Spring bean 生命周期相关知识点以及源码,所以打算写一篇 Spring bean生命周期相关的文章,但是整理过程中发现涉及的点太多而且又很复杂,很难在一篇文章中把Spri ...
- Python基础教程(第3版) 笔记(三)
1.9.1让脚本像普通程序一样在UNIX中运行脚本,只需将下面的代码作为脚本的第一行, 就可在UNIX中轻松运行脚本: #!/usr/bin/env python 要像普通程序一样运行脚本,还必须将其 ...
- docker 容器时间和系统时间不一致
docker cp /etc/localtime 容器名:/etc/localtime cp /etc/localtime 24fe94504424:/etc/localtime date -s 09 ...
- Linux学习笔记之四————Linux常用命令之文件管理
Linux命令——文件管理相关命令 <1>查看文件信息:ls ls是英文单词list的简写,其功能为列出目录的内容,是用户最常用的命令之一,它类似于DOS下的dir命令. Linux文件或 ...
- 如何从GitHub仓库clone项目
自己也已经多次接触了git了,但是因为工作用svn,自己平时也很少用git,所以每次都是用的时候可能还可以,等过一段时间再来用的时候,就又忘得差不多了,所以索性自己写个博客,自己记得自己也好懂,而且熟 ...
- .net core + headless chrome实现动态网页爬虫
一般的http请求库只能够抓取到网页的静态内容,如果想抓取通过js动态生成的内容可以使用没有gui的browser库,之前许多人会使用phantomjs作为headless browser,不过现在p ...
- C#容器类,性能介绍
http://www.php.cn/csharp-article-354819.html 1 indexer []声明的变量必须是固定长度的,即长度是静态的:object[] objectArray ...