当前位置:网站首页>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
边栏推荐
- C language (high-level) data storage + Practice
- 【经验分享】如何为visio扩展云服务图标
- 2022-07-06: will the following go language codes be panic? A: Meeting; B: No. package main import “C“ func main() { var ch chan struct
- Tencent's one-day life
- 测试周期被压缩?教你9个方法去应对
- 抽絲剝繭C語言(高階)指針的進階
- 知识点滴 - 关于苹果认证MFI
- ASEMI整流桥RS210参数,RS210规格,RS210封装
- gatk4中的interval是什么??
- About binary cannot express decimals accurately
猜你喜欢

1089: highest order of factorial

English translation is too difficult? I wrote two translation scripts with crawler in a rage

测试周期被压缩?教你9个方法去应对

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
![[ANSYS] learning experience of APDL finite element analysis](/img/bc/dc0742c308816553a80d50d1a990e3.jpg)
[ANSYS] learning experience of APDL finite element analysis

【数学笔记】弧度

Bi she - college student part-time platform system based on SSM

3、 High quality programming and performance tuning practical youth training camp notes

四、高性能 Go 语言发行版优化与落地实践 青训营笔记

Leetcode-206. Reverse Linked List
随机推荐
URP - shaders and materials - light shader lit
After 95, the CV engineer posted the payroll and made up this. It's really fragrant
【Unity】物体做圆周运动的几个思路
242. Bipartite graph determination
About binary cannot express decimals accurately
Example of Pushlet using handle of Pushlet
UWB learning 1
leetcode:105. 从前序与中序遍历序列构造二叉树
【Liunx】进程控制和父子进程
Deep learning Flower Book + machine learning watermelon book electronic version I found
95后CV工程师晒出工资单,狠补了这个,真香...
【云原生】内存数据库如何发挥内存优势
Leetcode-226. Invert Binary Tree
JSON introduction and JS parsing JSON
1089: highest order of factorial
Detailed explanation of transform origin attribute
Role of virtual machine
Leetcode sword finger offer brush questions - day 20
[ANSYS] learning experience of APDL finite element analysis
Advanced practice of C language (high level) pointer