Troubleshooting¶ This is a non-exhaustive list of troubleshooting strategies. If you need help, please email us at firstname.lastname@example.org or contact us through our web chat. Increase log verbosity¶ The Sqreen microagent logs messages to a text file. These messages contain warnings about possible abnormal behavior and describe some actions the microagent is executing. Increase the verbosity of these messages to help you troubleshoot issues with the Sqreen microagent. Use two environment variables to configure Sqreen's log verbosity: Env variable name Role Default value Options SQREEN_LOG_LOCATION Specifies a custom file to which the microagent writes logs. the terminal custom file path SQREEN_LOG_LEVEL Sets the microagent logging level. WARN or CRITICAL INFO, DEBUG Use INFO level in production environments. Use DEBUG only for short periods of time due to the amount of data it generates. Require Sqreen first¶ Problem: Many issues stem from the same root cause: the Sqreen microagent is not first in your application. If the Sqreen microagent does not execute first in your application, the microagent cannot instrument the modules/agents that exist before it. Symptoms of this problem include: The database driver is not protected by Sqreen logic. The request context lost; the microagent cannot be determine which HTTP request the code relates to. Solution: Ensure that the Sqreen microagent executes first in your application. Deprecated application tokens¶ Problem: There is a problem with my application token. Solution: Sqreen microagents used to use application tokens. These tokens were unique to an application. Sqreen has deprecated application tokens. Sqreen now uses organization tokens. These tokens are available throughout the organization to which your account belongs. While Sqreen continues to support application tokens for backward compatibility in the short term, we encourage you to convert your applications to use organization tokens. Expired tokens¶ Problem: My organization token is not working. The error message reads 401 Unauthorized. Solution: If your Sqreen plan expires, the microagent and the organization tokens remain in your app, but the microagent cannot authenticate with the Sqreen Platform anymore. To resolve the issue, you can uninstall the Sqreen microagent from your app, or you can contact Sqreen to renew your plan subsciption. With a renewed subscription, your microagent will be able to authenticate with the Sqreen Platform using the same organization tokens. Sqreen exceptions on New Relic dashboard¶ Problem: Sqreen microagent exceptions are displayed on my New Relic dashboard. Solution: By default the Sqreen microagent prevents its own exceptions from displaying on New Relic dashboard. However, if you enable your own server-side configuration for filtering issues, it disables this default behavior. To filter Sqreen microagent exceptions from the New Relic dashboard, follow the New Relic tutorial that explains how to ignore errors using server-side configuration in the UI. Add Sqreen exceptions that the microagent uses to block a request. sqreen.exceptions:RequestBlocked sqreen.exceptions:AttackBlocked sqreen.exceptions:ActionBlock sqreen.exceptions:ActionRedirect No user authentication¶ Problem: The Sqreen Dashboard does not show any attempts at user authentication. Solution: By default, the microagent uses the Django authenticate function to automatically detect user context in an app. However, if you did not use the CLI launcher to install the microagent, this feature may not work. If you are experiencing this issue, use the CLI launcher to start the microagent. Refer to Compatibility for further details.