Server Restart Procedures
This page provides procedures for bringing PlexTrac back up after a restart of the server or other event which results in an interruption to database operations.

Graceful Teardown

Prior to a planned reboot of your server, perform a graceful teardown of PlexTrac. This is performed in two steps:
1
docker-compose down
Copied!
After return of the command line,
1
docker-compose --file ./docker-database.yml down
Copied!
After return of the command line you may reboot your server. Proceed to the next step after the server is back up.

Navigate to your PlexTrac folder

1
cd /opt/plextrac
Copied!

Assess the Status of Docker Containers

1
docker ps
Copied!
If you see no data for running containers under the headers below, proceed to Option 1.
1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
Copied!
If you see container data, proceed to Option 2.
1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2
f41f9cdab27b plextrac/plextracnginx "/docker-entrypoint.…" About an hour ago Up About an hour 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp plextrac_plextracnginx_1
3
0ad5d212e985 plextrac/plextracapi "docker-entrypoint.s…" About an hour ago Up About an hour 127.0.0.1:4350->4350/tcp plextrac_plextracapi_1
4
5fd0fbea3dab plextrac/plextracdb "./couchbase_init.sh" 2 weeks ago Up 2 weeks 8095-8096/tcp, 11207/tcp, 11210-11211/tcp, 127.0.0.1:8091-8094->8091-8094/tcp, 18091-18096/tcp plextrac_plextracdb_1
Copied!

Option 1: Clean Restore

Bring the database back online with:
1
./database_update.sh
Copied!
When the command line is restored, you may see a command 6 lines up. Copy and run this command to tail the database logs.
1
You can use the command:
2
docker logs -f d845edd2cc06 # <- This is the command to run!
3
4
When you see the line containing:
5
/entrypoint.sh couchbase-server
6
You may run ./plextrac_run.sh
7
[email protected]:/opt/plextrac#
Copied!
If you do not have a command to tail the database logs displayed, run
1
docker logs -f $(docker ps -f name=plextrac_plextracdb -q)
Copied!
You will now be tailing the database logs. When you see the following, proceed to the next step.
1
Design document restored, exiting
2
/entrypoint.sh couchbase-server
3
+ echo 'Design document restored, exiting'
4
+ fg 1
Copied!
In most situations, the database is fully ready at this point. However, for long-time users of PlexTrac or those with very large databases, the database may still be performing indexing operations that may continue for several hours. If you encounter issues after completing the remainder of this procedure, see section on "Restarting the API."
Bring up the remaining containers with
1
./plextrac_run
Copied!
Tail the API logs with
1
docker logs -f $(docker ps -f name=plextrac_plextracapi -q)
Copied!
When you see the following, your PlexTrac platform is operational.

Restarting the API

If you encounter issues after the above, perform the following:
1
docker-compose restart plextracapi
Copied!
Resume the above procedure by tailing the API logs. If you are still experiencing issues, contact [email protected]

Option 2: API Restart

If your containers attempted to automatically restart after your server restart or other service interruption, large databases may not be able ready to interface with the API when the API hits key points in the initialization sequence.
If you experience errors or anomalies after a restart or other interruption to your database operations, a simple restart of the API may return you to normal operations. Perform:
1
docker-compose restart plextracapi
Copied!
Tail the API logs with
1
docker logs -f $(docker ps -f name=plextrac_plextracapi -q)
Copied!
When you see the following, your PlexTrac platform is operational.
If you continue to have issues, please contact [email protected]
Last modified 5mo ago