Network Management

Error alert "condition evaluation failed, invalid username or password" in Orion

This article helps you to address the error "condition evaluation failed, invalid username or password" in Orion

First published date

5/8/2019 9:06 PM

Last published date

5/22/2025 8:31 AM

Overview

The account of the user who last modified the alert is deleted or disabled, resulting in the following error, which can be seen in the Alerting.Service.V2.log

WARN  SolarWinds.Orion.Core.Alerting.Plugins.Conditions.Swql.ConditionEvaluatorSwql - Condition evaluation failed : Invalid username or password.
ERROR SolarWinds.Orion.Core.Alerting.Service.ConditionsStateEvaluator - Condition 'AlertId: AlertID, AlertLastEdit: DD/MM/YYYY HH:MM:SS AM/PM, ConditionIndex: 0, Type: Trigger' Evaluator failed - Condition evaluation failed for query = (SWQL QUERY) - System.ServiceModel.FaultException`1[SolarWinds.InformationService.Contract2.InfoServiceFaultContract]: Invalid username or password. (Fault Detail is equal to InfoServiceFaultContract [ SolarWinds.Data.AccessDeniedException: Invalid username or password. ] ).

And if you check SWIS logs, you can see which username

WARN  SolarWinds.Data.Providers.Orion.OrionAccountValidator - (null) (null)	 Invalid username for user 'domain\username'.
WARN  SolarWinds.Orion.Web.DAL.MembershipAccountDAL - (null) (null)	 Unable to load settings for user "'domain\username'"

Once you identify the username, find out if that user exists in the Accounts table; most likely, it will not be there.

Product section

Orion Platform

Cause

The user who last modified the alert is no longer in the Orion DB.

Resolution

Resolving the issue on the per-account basis

  1. RDP to the Orion Server
  2. Open Database Manager (default location: C:\Program Files\SolarWinds\Orion\)
  3. Connect to the Orion database.
  4. Execute the following query to change the alert creator (last editor) from the account that no longer exists to the Admin account. 
    -- Scripts are not supported under any SolarWinds support program or service.
    -- Scripts are provided AS IS without warranty of any kind. SolarWinds further
    -- disclaims all warranties including, without limitation, any implied warranties
    -- of merchantability or of fitness for a particular purpose. The risk arising
    -- out of the use or performance of the scripts and documentation stays with you.
    -- In no event shall SolarWinds or anyone else involved in the creation,
    -- production, or delivery of the scripts be liable for any damages whatsoever
    -- (including, without limitation, damages for loss of business profits, business
    -- interruption, loss of business information, or other pecuniary loss) arising
    -- out of the use of or inability to use the scripts or documentation.
    -- DECLARE @FailingAlertID AS INT = AlertID DECLARE @FailingAlertUser AS VARCHAR(MAX) = (SELECT TOP 1 [CreatedBy] FROM [AlertConfigurations] WHERE [AlertID] = @FailingAlertID) UPDATE [AlertConfigurations] SET [CreatedBy] = 'Admin' WHERE [CreatedBy] = @FailingAlertUser
    Note: Replace the AlertID with the value seen in the Alerting.Service.V2.log

 

Resolving the issue for all alerts

  1. RDP to the Orion Server
  2. Open Database Manager (default location: C:\Program Files\SolarWinds\Orion\)
  3. Connect to the Orion database.
  4. Execute the following query to change the alert creator (last editor) from the account that no longer exists to the Admin account.
    -- Scripts are not supported under any SolarWinds support program or service.
    -- Scripts are provided AS IS without warranty of any kind. SolarWinds further
    -- disclaims all warranties including, without limitation, any implied warranties
    -- of merchantability or of fitness for a particular purpose. The risk arising
    -- out of the use or performance of the scripts and documentation stays with you.
    -- In no event shall SolarWinds or anyone else involved in the creation,
    -- production, or delivery of the scripts be liable for any damages whatsoever
    -- (including, without limitation, damages for loss of business profits, business
    -- interruption, loss of business information, or other pecuniary loss) arising
    -- out of the use of or inability to use the scripts or documentation.
    -- UPDATE [AlertConfigurations] SET [CreatedBy] = 'Admin' WHERE [AlertID] IN (SELECT [AlertID] FROM [AlertConfigurations] WHERE [CreatedBy] NOT IN (SELECT [AccountID] FROM [Accounts]))
    Note: This will not update the alerts that have CreatedBy set as NULL, and these alerts should not be updated.