Commit ef881fd8 authored by 智勇's avatar 智勇

update

parent cf0c871d
......@@ -30,6 +30,19 @@ function ack()
echo "listen for the $ip $project log ack..."
for ((i=0;;))
do
#首先查询是否有启动失败的报错日志
fail_flag=`cat ${log_path} |grep "Application startup failed" | wc -l`
if [ "${fail_flag}" = 1 ];then
echo "server $ip $project not startup in ${max_wait_ack_time} seconds..."
num=`grep -n "\[ERROR\]" $log_path | head -1 |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
fi
exit -1
fi
bootstrap_flag=`cat ${log_path} |grep "${ack_phrase}"| wc -l`
if [ "${bootstrap_flag}" = 0 ] && [ "${max_wait_ack_time}" -gt "${wait_ack_time}" ]
then
......
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