Skip to content

Manage the Docker container

The Stelo Replicator container runs SQDR on any Linux computer with Docker, without installing the products, their drivers or a database yourself. This page covers operating the container; setting it up and licensing it is in Install on Docker. Everything else (sources, destinations, groups, monitoring) works as the rest of the manual describes.

Start and stop the services

The services start with the container. To check or control the Replicator Service inside the container:

Command What it does
sqdrsvc-status Shows whether the service (sqdrsvcd) is running.
sqdrsvc-start Starts the service.
sqdrsvc-stop Stops the service.

Always use a login shell

Run these commands in an interactive shell (docker exec -ti stelo-full bash) or with docker exec stelo-full bash -lc 'sqdrsvc-start'. A login shell sets the UTF-8 locale (LANG=en_US.UTF-8) that the StarSQL driver needs. Started without it (for example with docker exec stelo-full sh -c ...), the service can't connect to its control database and stops at once.

A watchdog checks the service every 60 seconds and restarts it if it ended unexpectedly, up to 10 times in a row. Its settings are in /var/sqdr/stelo-watchdog.conf (see The watchdog).

The Stelo Capture services are controlled with /etc/init.d/sqdr-derby (the SQDR Plus Derby database), /etc/init.d/sqdr-jetty (the SQDR Control Center) and /etc/init.d/sqdr-capagent (the Launch Agent and Capture Agents), with start, stop, restart or status. The Launch Agent and the SQDR Control Center depend on Derby: start them in that order (Derby, Jetty, Capture Agents) and stop them in the reverse order.

To stop everything, stop the containers: docker compose down, in the directory with docker-compose.yml (for an older setup started with stelo-container-start.sh, stelo-container-stop.sh). Stopping the service has the effects described in Start and stop the service.

The watchdog

The Stelo watchdog (stelo-watchdog) starts with the container and keeps the Replicator Service running, as the Recovery settings of a Windows service do. It also starts the service once the licenses are in place after the first setup. You don't need to do anything with it; this is what it does:

  • It checks the service at each interval. If the service ended unexpectedly, it runs the start command, up to the retry limit; the count starts again once the service is running.
  • It doesn't restart a service you stopped yourself with sqdrsvc-stop.
  • It reads /var/sqdr/stelo-watchdog.conf again when the file changes. The file is on the sq-config volume, so a change is kept when the container is recreated.
Setting Default What it does
interval 60 Seconds between checks.
command /opt/StarQuest/sqdr/sqdrsvcd.sh start The command that starts the service.
restart true false only logs the service's state, without restarting it.
retry 10 How many times in a row it tries to restart the service.

Its log is /var/sqdr/watchdog/stelo-watchdog.INFO (follow it with tail -f); log files are kept for 7 days, up to 10 MB each. Each check logs a status: 1 running, -1 ended unexpectedly (restarted unless restart is false), 0 stopped on purpose (not restarted).

The control database

The control database is the Db2 database SQDRC in the container, owned by the instance user db2inst1 and stored on the db2-data and db2-logs volumes. /var/sqdr/sqdr.properties holds the connection to it. What it contains and how it's pruned is in Control database.

  • Back it up with Db2's backup command, run as db2inst1 (su - db2inst1), for example to /backups on the backups volume. Also keep a copy of the volumes' host directories.
  • Db2 license: the container runs Db2 Community Edition unless you place a Db2 license file named db2std_vpc.lic in /home/db2inst1; it's applied when the container starts.
  • Users: the sqdr and db2inst1 passwords don't expire. If one does, reset expiration inside the container with chage -l sqdr (to check) and passwd -x -l sqdr. For Stelo Capture, see also Change the passwords Stelo Capture uses.

Logs

Besides the Monitoring page of the Data Replicator Manager (DRM), described in Logs, the logs are in these files:

Log Location
Replicator Service log /var/log/sqdr/sqdrsvc_service.log (and .1, .2, ...) in stelo-full. Not on a volume: save what you need before recreating the container.
Replicator Service crash log /var/tmp/sqdrsvc_crash.log in stelo-full
Replication history The control database; see Replication events.
Capture Agents /var/sqdrplus/conf/agt<N>/capture_agent0.log; also in the SQDR Control Center
Db2 /home/db2inst1/sqllib/db2dump/DIAG0000/db2diag.0.log
Data Replicator Manager /app/logs in stelo-webdrm, and docker logs stelo-webdrm

Configure the logs:

  • Replicator Service: the log size, the generations kept and the forwarding are in the Data Replicator Manager, as on Windows (see Logging settings). With Forward to Windows Event Log / container log on, entries at or above the chosen severity are also written to the container's output, so docker logs stelo-full and Docker's logging driver get them.
  • Data Replicator Manager: its file level and how many days of logs it keeps are on the DRM App Log tab (see DRM App Log tab). They're stored in the stelo-webdrm container, so a new container starts with the defaults again (level info, 7 days).
  • Docker: docker-compose.yml rotates each container's output (docker logs): at most 5 files of 20 MB, in the logging settings of both services. To change the limits, edit max-size and max-file there and run bash compose-start.sh, which recreates the containers. With the earlier setup files, Docker keeps the output without a limit unless Docker's daemon.json sets one (see Configure logging drivers in the Docker documentation).

To send logs to Stelo Support, see Collecting logs and diagnostics for Stelo Support.

ODBC drivers in the container

The container includes the drivers most sources and destinations need, registered in /etc/odbcinst.ini. The versions are those the images are built with; to see the ones in your container, run docker exec stelo-full bash -c "rpm -qa | grep -i odbc".

Database Driver (name in odbcinst.ini) Version
Db2 for i, Db2 for LUW, Db2 for z/OS StarSQL (64-bit) (StarSQL, included and licensed with SQDR) 6.50
IBM DB2 ODBC DRIVER The Db2 11.5.9 client of the container's Db2
Db2 for i IBM i Access ODBC Driver 64-bit 1.1.0.26
Oracle, Informix, Amazon Redshift, Salesforce, text files The SQDR bundled drivers (included and licensed with SQDR): SQDR Oracle 8, SQDR Informix, SQDR Redshift, SQDR Salesforce, SQDR Text; also SQDR Microsoft SQL Server 8, SQDR MySQL and SQDR PostgreSQL 8.0.1
Informix IBM Informix (IBM Informix Client SDK) 15.0
SQL Server, Azure SQL ODBC Driver 18 for SQL Server 18.5.1.1
ODBC Driver 17 for SQL Server 17.11
PostgreSQL PostgreSQL Unicode (the PostgreSQL 16 build of psqlODBC), PostgreSQL 15 Unicode, and their ANSI and (x64) variants psqlODBC as published by the PostgreSQL project when the image was built
MySQL MySQL ODBC 8.4 Unicode Driver, MySQL ODBC 8.4 ANSI Driver (MySQL Connector/ODBC) 8.4.0
MariaDB MariaDB ODBC 3.1 Driver 3.1.20
Databricks, Apache Spark Databricks ODBC Driver 64-bit 2.11.0
Simba Spark ODBC Driver 2.8.2
Google BigQuery Simba ODBC Driver for Google BigQuery 64-bit 3.4.4
Snowflake SnowflakeDSIIDriver 3.22.0
Exasol Exasol Driver 25.2.2

Tips:

  • Use connection strings rather than data sources. Data sources in /etc/odbc.ini are lost when the container is recreated; connection strings are stored in the control database. Connection strings that work on Windows generally work here too, with Linux paths for files such as certificates. See Connection strings.
  • Certificates for SSL/TLS connections: put the certificate authority's certificate in /var/sqdr/certs (on the sq-config volume). It's added to the container's trusted certificates when the service starts.
  • Don't install or update drivers in the container: the change is lost when the container is recreated. Ask Stelo Support if you need a driver that isn't included.
  • Test a connection from a login shell with isql -v -k "<connection string>".

Docker commands

Command What it does
docker exec -ti stelo-full bash Opens a shell in the container.
docker ps -a Lists containers and their state.
docker logs stelo-webdrm Shows the Data Replicator Manager's output.
docker images Lists downloaded images.
docker image rm <image ID> Removes an image you no longer need.
docker system prune Removes stopped containers, unused networks and dangling images.