Skip to content

Steps to Retrieve Logs for Troubleshooting

To enable debug for Apache Spark OLAC, before executing the build_spark_plugin.sh script, update the log4j2.properties file to enable debug logging.

  1. Navigate to the oss-plugin/config plugin directory:

    Bash
    cd ~/privacera-oss-plugin/config
    

  2. Open the log4j2.properties file and update the following property:

    Bash
    1
    2
    3
    vi log4j2.properties
    
    logger.privacera.level = debug
    

  3. Once the pod is up, navigate to the ~/tmp/<user> folder.

    Bash
    cd ~/tmp/<user>
    

  4. Logs will be saved in file privacera.log

  5. Command to get logs on machine:

    Bash
    kubectl cp <SPARK_NAME_SPACE>/<SPARK_PLUGIN_POD_IP>:/tmp/<user>/privacera.log <destination_path>
    

  1. In the portal, open the connector and turn on Enable debug logging. Under Logging, set Privacera log level to DEBUG. The section carries these fields:

    Field Definition Default
    Privacera log level Level for the Privacera plugin classes. INFO, DEBUG or TRACE. INFO
    Ranger log level Level for the Ranger policy engine and audit client. INFO
    Root log level Level for everything else on the cluster. INFO
    Log file size Size at which a log file rolls over. 100MB
    Log file retention How long rolled files are kept. 30d
  2. Save the connector, download the bundle again, and re-run the setup script. The levels only reach the plugin through a freshly downloaded bundle.

  3. Once the pod is up, navigate to the log directory. It defaults to /tmp/<user>:

    Bash
    cd /tmp/<user>
    

  4. Logs are written to privacera.log, rolling at the configured file size and kept for the configured retention.

  5. Command to get logs on machine:

    Bash
    kubectl cp <SPARK_NAME_SPACE>/<SPARK_PLUGIN_POD_IP>:/tmp/<user>/privacera.log <destination_path>