Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
10689cfe
Commit
10689cfe
authored
Dec 01, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.quantgroup.cn/QA/qa-deploy-utils
parents
7243d7e6
09dd9d59
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
35 deletions
+33
-35
restartJava.sh
qa_shell_script/base_script/restartJava.sh
+33
-35
No files found.
qa_shell_script/base_script/restartJava.sh
View file @
10689cfe
...
...
@@ -34,11 +34,10 @@ function ack()
fail_flag
=
`
grep
-E
"APPLICATION FAILED TO START|Application startup failed"
${
log_path
}
|
wc
-l
`
if
[
"
${
fail_flag
}
"
=
1
]
;
then
echo
"server
$ip
$project
startup failed in
${
wait_ack_time
}
seconds..."
num
=
`
grep
-n
"
\[
ERROR
\]
"
$log_path
|
head
-1
|
cut
-d
":"
-f
1
`
num
=
`
grep
-n
-E
"APPLICATION FAILED TO START|Application startup failed"
$log_path
|
cut
-d
":"
-f
1
`
if
[
-n
"
$num
"
]
;
then
echo
"server
$ip
$project
启动日志错误信息截取如下:"
#echo "sed -n "$[$num-3],$[$num+10]p" $log_path"
sed
-n
"
$[$num
-2],
$[$num
+10]p"
$log_path
sed
-n
"
$[$num
],
$[$num
+10]p"
$log_path
fi
exit
-1
fi
...
...
@@ -56,11 +55,10 @@ function ack()
else
echo
"server
$ip
$project
not startup in
${
max_wait_ack_time
}
seconds..."
#echo "num=`grep -n \"\[ERROR\]\" $log_path | head -1 |cut -d ":" -f 1`"
num
=
`
grep
-n
"
\[
ERROR
\]
"
$log_path
|
head
-1
|
cut
-d
":"
-f
1
`
num
=
`
grep
-n
-E
"APPLICATION FAILED TO START|Application startup failed"
$log_path
|
cut
-d
":"
-f
1
`
if
[
-n
"
$num
"
]
;
then
echo
"server
$ip
$project
启动日志错误信息截取如下:"
#echo "sed -n "$[$num-3],$[$num+10]p" $log_path"
sed
-n
"
$[$num
-2],
$[$num
+10]p"
$log_path
sed
-n
"
$[$num
],
$[$num
+10]p"
$log_path
fi
exit
-1
fi
...
...
@@ -79,7 +77,7 @@ cd $project_path/$project
P_UUID
=
`
ps
-ef
|grep
${
project
}
.jar |grep
-v
'grep'
|awk
'{print $2}'
`
if
[
-n
"
${
P_UUID
}
"
]
;
then
echo
"Kill
$project
PPID=
${
P_UUID
}
"
kill
-9
${
P_UUID
}
kill
${
P_UUID
}
sleep
2s
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment