Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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!

Startup

Below, you can see the correct starting sequence for the XTM Cloud application:

  1. Log in as user xtm:

  • From the root account, do the following: su xtm.

To enable a user to log in from different accounts, you must configure the sudo mechanism for a particular user, so it can log in to the XTM Cloud user.

2. Run this command while being logged in as user xtm (We assume that XTM Cloud is installed in a standard location. If not, edit the path accordingly): /xtm/start.sh.

This script starts the application and it can take a few minutes for the launch to be completed so, after a while, check the logs and the service itself to confirm that it is working (those commands work from the xtm user):

systemctl status xtm-cat.service ; systemctl status xtm-pm.service ; systemctl status xtm-spell.service
tail -f /servers/all_logs/*

Shutdown

The shutdown should be made in the following order:

  1. Log in as user xtm.

  2. Run this command while being logged in as user xtm (We assume that XTM Cloud is installed in a standard location. If not, edit the path accordingly): /xtm/stop.sh.

Verify that the application has stopped correctly:

systemctl status xtm-cat.service ; systemctl status xtm-pm.service ; systemctl status xtm-spell.service
tail -f /servers/all_logs/*

3. 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 (click here to find out how to do it - SECOND step). Paste it into your file (e.g. wb_shutdown.sh):

#!/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 '4bigH0rse:twx9dFZ9xXK-T7iu' |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’

4. Run this script. Now close XTM Workbench.

Restart

To restart the application, first repeat all steps in the SHUTDOWN section, then start the application as shown in STARTUP section.

Troubleshooting

What to do when there are issues?

Application was run by a different user (mainly as a root)

Generally, the application should be run by the xtm user. If it was run by a root, by accident, then, in many cases, the ownership of many application files will have been changed to root.

To resolve this, a full shutdown should be performed from a root account, as described above. Then change the ownership of files in the XTM Cloud application (run this from the root account):

chown -R xtm:xtm /xtm

This is very likely to happen if you have an operating system that does not use systemd (e.g. CentOS 6.X), as new versions of the XTM Cloud application use systemd to control the service and run them from the xtm user. Bear in mind that it can even occur if you have a modern OS.

Application was run from /servers/cat/bin/start.sh instead of /xtm/start.sh

The application should always be started from /xtm/start.sh. If it has been started from this location, we need to check if it was run by the XTM user.

If so, there should not be any problems but if it was run by a different user, follow the steps described in Application was run by a different user (mainly as a root).

Application was closed but without closing XTM Workbench

XTM Workbench runs using web sockets and is not connected to the main application, when it comes to closing it.

If the application was stopped, then, please, run it again without stopping Workbench, as there may be some issues. In such a case, please, perform a full shutdown once again, as described in the SHUTDOWN section. 

Then verify that the application and XTM Workbench are not running anymore. After startup has been performed correctly (see the STARTUP section in this article), both modules should function correctly, but bear in mind that some of the work in XTM Workbench might be lost due to the incorrect shutdown.

Restarting individual services or 'processing'

Log into the xtm user. You can then restart each separate service using the commands listed below:

sudo systemctl restart xtm-spell.service
sudo systemctl restart xtm-pm.service
sudo systemctl restart xtm-cat.service

Note that this is mainly used when it is necessary to restart processing. Running them without a reason might result in losing the progress information for your projects.

  • No labels