Troubleshooting

In this article, there are suggested solutions to common situations that can cause trouble during the usage of the BGuardian plugin.

Log files and debug

The plugin supports a debug parameter and produces internal log files with details of what is happening. Increasing the debug parameter to a higher number will produce a more detailed output inside the plugin debug logs.

The location of the logs are controlled by the log parameter, by default they are placed in the working directory, inside ‘bguardian’ directory.

The internal plugin logging framework rotates log files automatically. Currently, each file can be 50Mb at maximum and the plugin will keep 25 files.

The “.err” file that can be found close to the log files, can show contents even if no real error happened in the jobs. It can show contents too even if debug is disabled. This file is not rotated, but it is expected to be a small file in general. If you still need to rotate it, you can include it in a general rotating tool like ‘logrotate’.

Out of Memory

If you ever face OutOfMemory errors from the Java daemon (you will find them in the bguardian-debug.err file), you have probably a large environment with a large catalog and/or many different daemons to connect to.

To overcome this situation you can increase JVM memory, you will need to create the following file:

Memory parameters file
/opt/bacula/etc/bguardian_backend.conf'

Then, add the following parameters to the file:

Memory parameters
BGUARDIAN_JVM_MIN=2G
BGUARDIAN_JVM_MAX=8G

Those values will define the MIN (BGUARDIAN_JVM_MIN) and MAX (BGUARDIAN_JVM_MAX) memory values assigned to the JVM Heap size. In this example we are setting 2Gb for the minimum, and 8Gb for the maximum. In general, those values should be more than enough to handle every situation.

The ‘/opt/bacula/etc/bguardian_backend.conf’ won’t be modified through package upgrades, so your memory settings will be persistent.

Go back to the BGuardian plugin main page.