Commit df34d603 authored by 智勇's avatar 智勇

up

parent b61447b5
...@@ -31,14 +31,11 @@ function ack() ...@@ -31,14 +31,11 @@ function ack()
for ((i=0;;)) for ((i=0;;))
do do
#首先查询是否有启动失败的报错日志 #首先查询是否有启动失败的报错日志
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 -E "APPLICATION FAILED TO START|Application startup failed" $log_path | 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 if [ -n "${num}" ];then
echo "server $ip $project startup failed in ${wait_ack_time} seconds..."
echo "server $ip $project 启动日志错误信息截取如下:" echo "server $ip $project 启动日志错误信息截取如下:"
sed -n "$[$num],$[$num+10]p" $log_path sed -n "$[$num],$[$num+10]p" $log_path
fi
exit -1 exit -1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment