Add more info on config proxy startup
@@ -117,6 +117,7 @@ case $1 in
VESPA_SERVICE_NAME=configproxy
export VESPA_SERVICE_NAME
+ start_seconds=$SECONDS
echo "Starting config proxy using $configsources as config source(s)"
vespa-runserver -r 10 -s configproxy -p $P_CONFIG_PROXY -- \
java ${jvmopts} \
@@ -133,15 +134,29 @@ case $1 in
sleep 0.1
if [ -f $P_CONFIG_PROXY ] && kill -0 `cat $P_CONFIG_PROXY` && vespa-ping-configproxy -s $hname 2>/dev/null
then
- echo "config proxy started (runserver pid `cat $P_CONFIG_PROXY`)"
+ startup_seconds=$(( SECONDS - start_seconds ))
+ echo "config proxy started after ${startup_seconds}s (runserver pid `cat $P_CONFIG_PROXY`)"
fail=false
break
fi
done
if $fail ; then
- echo "Failed to start config proxy!" 1>&2
- echo "look for reason in vespa.log, last part follows..."
- tail -n 15 $LOGFILE | vespa-logfmt -
+ startup_seconds=$(( SECONDS - start_seconds ))
+ echo "Config proxy failed to start in ${startup_seconds}S!" 1>&2
+
+ if ! [ -f $P_CONFIG_PROXY ]
+ then
+ echo "pid file $P_CONFIG_PROXY was not created" 1>&2
+ elif ! kill -0 `cat $P_CONFIG_PROXY`
+ then
+ echo "config proxy process `cat $P_CONFIG_PROXY` has terminated" 1>&2
+ elif ! vespa-ping-configproxy -s $hname
+ then
+ echo "failed to ping config proxy $hname" 1>&2
+ fi
+
+ echo "look for reason in vespa.log, last part follows..." 1>&2
+ tail -n 15 $LOGFILE | vespa-logfmt - 1>&2
exit 1
fi
