File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -107,25 +107,39 @@ jobs:
107107 - name : Test 3 - Start Gateway
108108 id : test3
109109 run : |
110+ set -e
110111 START_TIME=$(date +%s)
111112
113+ echo "JAVA_HOME is: $JAVA_HOME"
114+ echo "java on PATH:"
115+ which java || true
116+ java -version || true
117+
112118 export JAVA_HOME="$JAVA_HOME"
113119 export KNOX_HOME="$KNOX_HOME"
114-
115120 export PATH="$JAVA_HOME/bin:$PATH"
116- "$KNOX_HOME/bin/gateway.sh" start
117121
122+ echo "Starting Knox gateway..."
123+ "$KNOX_HOME/bin/gateway.sh" start || echo "gateway.sh start exited non-zero (will check logs)"
118124
119- # Wait for startup
125+ echo "Sleeping 20s to let gateway boot..."
120126 sleep 20
121127
122- if "$KNOX_HOME/bin/gateway.sh" status | grep -qi "running"; then
128+ echo "==== gateway.log (tail) ===="
129+ tail -n 80 "$KNOX_HOME/logs/gateway.log" || echo "No gateway.log yet"
130+
131+ echo "Checking status via gateway.sh..."
132+ if "$KNOX_HOME/bin/gateway.sh" status 2>&1 | tee /tmp/knox_status.txt | grep -qi "running"; then
123133 echo "✓ gateway started"
124134 echo "status=passed" >> $GITHUB_OUTPUT
125135 else
126- echo "✗ gateway start failed"
127- echo "Gateway log:"
136+ echo "✗ gateway start failed (status did not show 'running')"
137+ echo "Status output:"
138+ cat /tmp/knox_status.txt || true
139+
140+ echo "Full gateway.log for debugging:"
128141 cat "$KNOX_HOME/logs/gateway.log" || true
142+
129143 echo "status=failed" >> $GITHUB_OUTPUT
130144 exit 1
131145 fi
You can’t perform that action at this time.
0 commit comments