当前位置:网站首页>Jenkins remote build project timeout problem
Jenkins remote build project timeout problem
2022-07-07 07:41:00 【Cooked snail】
Catalog
One 、 Problem description
In the use of Publish Over SSH The following errors are always reported when carrying out remote deployment projects :ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 120,001 ms]
Two 、 The analysis reason
1、 Log analysis shows timeout , So modify the time , take 120000 It is amended as follows 300000, And then change it to 600000, They didn't solve the problem , So the elimination is not this problem
2、 Search online , be supposed to jenkins Kill it at startup build Process outside , You need to add this sentence to the script file BUILD_ID=dontKillMe, Plus, it's still not good .daemon The guardian thread . Not yet. .
3、 Some people say that there is insufficient space , Then execute the following command Cleared the cache , Not yet.
sync
echo 3 > /proc/sys/vm/drop_caches
4、 Later, start the script manually on the server , Found the problem , The last line , Log output line
Original script
#!/bin/bash
source /etc/profile
project=test-wechat-1.0-SNAPSHOT.jar
dir=/opt/deploy/wechat
echo "prepare to deploy test-wechat-1.0-SNAPSHOT"
pid=`ps -ef |grep test-wechat-1.0-SNAPSHOT |grep -v grep| grep 'java' |awk '{print $2}'`
if [[ $pid ]]; then
echo "test-wechat-1.0-SNAPSHOT is running and pid is $pid"
kill -9 $pid
if [[ $? -eq 0 ]];then
echo "sucess to stop test-wechat-1.0-SNAPSHOT"
else
echo "fail to stop test-wechat-1.0-SNAPSHOT"
fi
fi
echo "start to deploy test-wechat-1.0-SNAPSHOT"
cd /opt/deploy/wechat/
nohup java -jar /opt/deploy/wechat/test-wechat-1.0-SNAPSHOT.jar --server.port=9003 >/dev/null 2>&1 &
I found that I was stuck on the page after startup , Although it is started in the background, there is no effect of background startup
Modify the script as follows , Problem solving .
#!/bin/bash
source /etc/profile
project=test-wechat-1.0-SNAPSHOT.jar
dir=/opt/deploy/wechat
echo "prepare to deploy test-wechat-1.0-SNAPSHOT"
pid=`ps -ef |grep test-wechat-1.0-SNAPSHOT |grep -v grep| grep 'java' |awk '{print $2}'`
if [[ $pid ]]; then
echo "test-wechat-1.0-SNAPSHOT is running and pid is $pid"
kill -9 $pid
if [[ $? -eq 0 ]];then
echo "sucess to stop test-wechat-1.0-SNAPSHOT"
else
echo "fail to stop test-wechat-1.0-SNAPSHOT"
fi
fi
echo "start to deploy test-wechat-1.0-SNAPSHOT"
cd /opt/deploy/wechat/
nohup java -jar /opt/deploy/wechat/test-wechat-1.0-SNAPSHOT.jar --server.port=9003 > nohup.out 2>&1 &
stay jenkins To configure , Be sure to add nohup , Otherwise, the project fails to start
Then I studied the instructions of log output , source https://blog.csdn.net/sunrier/article/details/7695839
However, I still don't understand why there is no backstage way to start , I hope the boss can discuss it together
边栏推荐
- Wechat applet full stack development practice Chapter 3 Introduction and use of APIs commonly used in wechat applet development -- 3.10 tabbar component (I) how to open and use the default tabbar comp
- MIPS uclibc cross compile ffmpeg, support g711a encoding and decoding
- 【Liunx】进程控制和父子进程
- Cloud backup project
- Build personal website based on flask
- How do I get the last part of a string- How to get the last part of a string?
- 海思芯片(hi3516dv300)uboot镜像生成过程详解
- 四、高性能 Go 语言发行版优化与落地实践 青训营笔记
- 我理想的软件测试人员发展状态
- Jenkins远程构建项目超时的问题
猜你喜欢
抽丝剥茧C语言(高阶)指针进阶练习
Le Service MySQL manque dans le service informatique
Talk about seven ways to realize asynchronous programming
【Unity】物体做圆周运动的几个思路
Is the test cycle compressed? Teach you 9 ways to deal with it
外包幹了三年,廢了...
记一个并发规则验证实现
抽絲剝繭C語言(高階)數據的儲存+練習
Interviewer: what development models do you know?
2022-07-06:以下go语言代码是否会panic?A:会;B:不会。 package main import “C“ func main() { var ch chan struct
随机推荐
About binary cannot express decimals accurately
JS plot flot application - simple curve
The metauniverse of the platofarm farm continues to expand, with Dao governance as the core
leetcode:105. 从前序与中序遍历序列构造二叉树
[Linux] process control and parent-child processes
[semantic segmentation] - multi-scale attention
Write CPU yourself -- Chapter 9 -- learning notes
Bi she - college student part-time platform system based on SSM
二、并发、测试笔记 青训营笔记
A concurrent rule verification implementation
JS small exercise
【Liunx】进程控制和父子进程
Interviewer: what development models do you know?
解决:Could NOT find KF5 (missing: CoreAddons DBusAddons DocTools XmlGui)
242. Bipartite graph determination
Tianqing sends instructions to bypass the secondary verification
After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
科技云报道:从Robot到Cobot,人机共融正在开创一个时代
JS small exercise ---- time sharing reminder and greeting, form password display hidden effect, text box focus event, closing advertisement
MIPS uclibc cross compile ffmpeg, support g711a encoding and decoding