summaryrefslogtreecommitdiffstats
path: root/config-proxy
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@verizonmedia.com>2020-04-07 00:14:33 +0200
committerHåkon Hallingstad <hakon@verizonmedia.com>2020-04-07 00:14:33 +0200
commit9c3399d5fd7da1f9ac4c058d5a6b60592ab5ff86 (patch)
treed297fc4edb4cfb2058097ab8a71390a0e1b271df /config-proxy
parent5a8ca01510284386dac769e80222ee7e79dfd5ad (diff)
Add more info on config proxy startup
Diffstat (limited to 'config-proxy')
-rwxr-xr-xconfig-proxy/src/main/sh/vespa-config-ctl.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/config-proxy/src/main/sh/vespa-config-ctl.sh b/config-proxy/src/main/sh/vespa-config-ctl.sh
index ed59925298c..4db9e406fa0 100755
--- a/config-proxy/src/main/sh/vespa-config-ctl.sh
+++ b/config-proxy/src/main/sh/vespa-config-ctl.sh
@@ -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