当前位置:网站首页>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
边栏推荐
- L'étape avancée du pointeur de langage C (haut de gamme) pour l'enroulement des cocons
- Blue Bridge Cup Birthday candles (violence)
- MySQL service is missing from computer service
- UWB learning 1
- 考研失败,卷不进大厂,感觉没戏了
- 1090: integer power (multi instance test)
- JS plot flot application - simple curve
- 1140_ SiCp learning notes_ Use Newton's method to solve the square root
- 按键精灵脚本学习-关于天猫抢红包
- Software acceptance test
猜你喜欢
Le Service MySQL manque dans le service informatique
机器人技术创新与实践旧版本大纲
抽丝剥茧C语言(高阶)指针进阶练习
一、Go知识查缺补漏+实战课程笔记 | 青训营笔记
95后CV工程师晒出工资单,狠补了这个,真香...
leetcode:105. 从前序与中序遍历序列构造二叉树
面试官:你都了解哪些开发模型?
3、 High quality programming and performance tuning practical youth training camp notes
C language (high-level) data storage + Practice
科技云报道:从Robot到Cobot,人机共融正在开创一个时代
随机推荐
面试官:你都了解哪些开发模型?
机器人技术创新与实践旧版本大纲
毕设-基于SSM大学生兼职平台系统
我理想的软件测试人员发展状态
Outlier detection technology of time series data
pytorch 参数初始化
Robot technology innovation and practice old version outline
Six methods of flattening arrays with JS
About some details of final, I have something to say - learn about final CSDN creation clock out from the memory model
Implementing data dictionary with JSP custom tag
vus.SSR在asynData函数中请求数据的注意事项
Advanced practice of C language (high level) pointer
外包幹了三年,廢了...
Bi she - college student part-time platform system based on SSM
Music | cat and mouse -- classic not only plot
Detailed explanation of neo4j installation process
Causes and solutions of oom (memory overflow)
I failed in the postgraduate entrance examination and couldn't get into the big factory. I feel like it's over
Detailed explanation of uboot image generation process of Hisilicon chip (hi3516dv300)
Leetcode-226. Invert Binary Tree