Troubleshooting
In this section, you can find solutions for common issues with MetaDefender Software Supply Chain.
Running behind a proxy
If you need to deploy MetaDefender Software Supply Chain behind a proxy please consider the following:
*.docker.io needs to be accessible in order to download the code
activation.dl.opswat.com needs to be accessible in order to activate the license
the service unit you plan to integrate with needs to be accessible such that MetaDefender Software Supply Chain can access its APIs for different operations (e.g. file discovery, user listing, file download, file upload, file deletion, file renaming, etc.)
You will need to edit /etc/mdssc/customer.env and add the following environment variables to use a proxy server:
If a proxy is required to access to docker hub in order to pull MDSSC images, then this guide should be followed: https://docs.docker.com/network/proxy/
The following section contain detailed instructions on how to troubleshoot or generate a support package based on your Unix operating system type.
Collecting diagnostics
Run these commands as root, from any directory. The archives are written to /etc/mdssc/. For all commands, see mdssc command line.
Situation | Command | Output |
|---|---|---|
Quick health check |
| Screen |
Check the image versions |
| Screen |
First look at a problem |
| Screen |
Recent logs for a support ticket |
|
|
Full package for engineering |
|
|
Reproduce a problem with more detail |
| Debug-level logs |
The example outputs below come from a test system. The names, sizes and times on your system are different.
1. Health check
Shows each container with its state, its restart count and a note if it was killed because it ran out of memory. It also shows disk use for /etc/mdssc, /var/log and the Docker data directory, and marks a disk above 90% used. For the full readiness check, run sudo mdssc -c status.
Example output:
What to look for:
A service that is not
Up.mdssc_pgmigrationsis the exception: it applies the database migrations and then stops withExited (0).restarts: <n>in the NOTE column. The service stopped and Docker started it again.killed: out of memoryin the NOTE column. The host does not have sufficient memory for the load.above 90% usedfor a disk.debug until HH:MM. Debug logs are on for the service. See step 6.
2. Image versions
Shows the expected image and the running image of each service. A note marks a service whose running image differs from the expected one, a tag that is not a release, and a tag that customer.env overrides, with its line number.
Example output:
What to look for:
differs from expected. The container runs an image other than the installed version. This can occur after an update that did not complete.set in customer.env:<line>. A line incustomer.envoverrides the image tag, for example for a hotfix. Make sure that the override is still necessary.not a release. The tag is not a release version. In version 4.3.0, themdss_platformimage always shows this note. You can ignore it formdss_platform.
3. Support report
Prints the status, the versions, the database size, the RabbitMQ queues (the total and the 10 fullest queues) and the number of errors per service in the last 24 hours. Secrets are masked, so you can paste the output into a support ticket. Start with this command.
Example output, after the status and version sections shown in steps 1 and 2:
What to look for:
A queue with many messages. Run the command again after some minutes. If the number does not go down, the service that reads the queue does not process messages.
A service with errors. Collect the logs of that service with step 4.
4. Recent logs
--sincesets the time window, for example30m,6hor2d. The default is24h.--servicekeeps only the services whose name contains the value.
The archive holds the container logs, the service log files, .env, customer.env and appsettings.json. Passwords, keys, tokens and connection-string passwords are masked. Only root can read the archive. The command stops if the disk does not have about twice the size of the logs free.
Example output:
If the disk is too full, the command stops with a message like this:
5. Full support package
This command is the same as sudo mdssc -u support_package. The package holds the logs, host information, product settings, the environment files, and the state of RabbitMQ queues, PostgreSQL tables and Redis keys. The default size limit is 5 GB.
-msets a smaller size limit, for example500Mor1G.-sskips the Redis key dump.
The last line of the output shows where the package is:
The environment files in the package are not masked. Send the package through a secure channel.
If the export fails because the logs are too large, set a lower LOGS_PER_SERVICE value in customer.env (default 14), or use -m. No restart is necessary.
6. Debug logs
Turn on debug logs for one service.
--foraccepts values such as30s,30m,2hor1d. The default is1h.Reproduce the problem.
Collect the logs of that service.
Turn debug logs off, or let them turn off by themselves when the time ends.
You can turn on debug logs for api, sourcecode, binaries, containers, notifications and processing. Platform services are not included. The command recreates the service container, so the service stops for a short time. While debug logs are on, mdssc status shows "debug until HH:MM" for the service.
Example output of sudo mdssc debug api --for 30m:
Example output of sudo mdssc debug off:
7. Quick error scan
peek_todays_logs scans today's logs for problems. peek_logs scans all logs.
Older commands
These commands still work:
-u export_logs is the same as mdssc logs. -u export_info collects host information. In addition, we offer the option to export your database if you need to use it for migration or debugging purposes. See PostgreSQL advanced setup.
Installation issues
In order to troubleshoot please run LOG_LEVEL=7 [command] where command is the command that has an issue. For example, if MetaDefender Software Supply Chain cannot be started please run the following command:
To check the containers and the disk after a start, run sudo mdssc status.
Unable to remove the network
If you encounter some message regarding your network ( similar to network mdssc_stack id xxx has active endpoints ) while you tried to remove or update MDSSC, please try to restart docker:
"Permission denied" while uninstalling
On some Linux distributions that have SELinux enabled by default you may encounter a "Permission denied" message when uninstalling MDSSC. The uninstall still completes successfully and only some docker containers might still be left running if mdssc -u clean was not executed before the uninstall. This is due to SELinux policies and can be avoided by disabling SELinux temporarily before uninstalling by running: