[id='xsite_tshoot-{context}']
= Collecting Logs and Troubleshooting Cross-Site Replication
Diagnose and resolve issues related to {brandname} cross-site replication. Use
the {brandname} Command Line Interface (CLI) to adjust log levels at run-time
and perform cross-site troubleshooting.

.Procedure

. Open a terminal in `{server_home}`.
. Create a {brandname} CLI connection.
. Adjust run-time logging levels to capture DEBUG messages if necessary.
+
For example, the following command enables DEBUG log messages for the org.infinispan.XSITE category:
+
[source,options="nowrap",subs=attributes+]
----
[//containers/default]> logging set --level=DEBUG org.infinispan.XSITE
----
+
You can then check the {brandname} log files for cross-site messages in the `{server_root}/log` directory.
+
. Use the [command]`site` command to view status for backup locations and perform troubleshooting.

For example, check the status of the "customers" cache that uses "LON" as a
backup location:

[source,options="nowrap",subs=attributes+]
----
[//containers/default]> site status --cache=customers
{
  "LON" : "online"
}
----

Another scenario for using the {brandname} CLI to troubleshoot is when the
network connection between backup locations is broken during a state transfer
operation.

If this occurs, {brandname} clusters that receive state transfer continually
wait for the operation to complete. In this case you should cancel the state
transfer to the receiving site to return it to a normal operational state.

For example, cancel state transfer for "NYC" as follows:

[source,options="nowrap",subs=attributes+]
----
[//containers/default]> site cancel-receive-state --cache=mycache --site=NYC`
----

.Reference

* link:{server_docs}#tshoot_server[{brandname} Server Troubleshooting]
* link:{server_docs}#logs[Working with {brandname} Server Logs]
