Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
Page Properties
hiddentrue

Guidelines

Before reading this article, read this article: XTM file tree & locations for detailed information about the file tree, folders and important XTM Cloud application data!

...

  1. When you have stopped the application correctly, you need to shut down XTM Workbench, as it run using web-sockets. Create an executable bash script (see How to free up disk space to find out how to do it - SECOND step). Paste it into your file (e.g. wb_shutdown.sh):

Code Block
breakoutModefull-width
languagebash
#!/bin/bash

# WBCAT - tomcat with workbench

# WBSERVERPORT - local server address and port of workbench

# find tomcat with workbench

# WBCAT=$(ls -l /servers/*/webapps | grep workbench)

WBCAT=$(find /servers/*/webapps -name "workbench")

WBCAT=$(echo $WBCAT | cut -c10- | rev | cut -c19- | rev)

# find local server address and workbench port

WBSERVERPORT=$(cat /xtm/xtm/confs/xtm-paths-conf.xml | grep "workbench-local-server-address" | cut -c48- | rev | cut -c4- | rev)

if !($WEBSERVERPORT);

then

# if there is no information about Workbench in /xtm-paths-conf.xml, set default address and port

WBSERVERPORT='localhost:8080'

echo "default Workbench server address"

fi

echo "Tomcat with Workbench:"

echo $WBCAT

echo "Workbench server:port"

echo $WBSERVERPORT

TOKEN=`curl -s -H "Content-Type: application/x-www-form-urlencoded" -X POST $WBSERVERPORT/workbench/oauth/token -d 'grant_type=client_credentials' -u '4bigH0rsekey:twx9dFZ9xXK-T7iusecret' |awk -F'"' '{ $1 == "access_token" } { print $4 }'` ; sleep 2 ; curl -i -H 'Authorization: Bearer '$TOKEN'' -X GET $WBSERVERPORT/workbench/internal-api/shutdown?password=sec\!pass

sleep 15

echo "Workbench shutting down ..."

cat /servers/$WBCAT/logs/catalina.out | ‘grep com.xtm.workbench.superiors.shutdown.WorkbenchShutdownProcessor’

...