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
Last published date
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
Cause
The user who last modified the alert is no longer in the Orion DB.
Resolution
Resolving the issue on the per-account basis
- RDP to the Orion Server
- Open Database Manager (default location:
C:\Program Files\SolarWinds\Orion\) - Connect to the Orion database.
- 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.
Note: Replace the AlertID with the value seen in the
-- 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] = @FailingAlertUserAlerting.Service.V2.log
Resolving the issue for all alerts
- RDP to the Orion Server
- Open Database Manager (default location:
C:\Program Files\SolarWinds\Orion\) - Connect to the Orion database.
- 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.
Note: This will not update the alerts that have CreatedBy set as NULL, and these alerts should not be updated.
-- UPDATE [AlertConfigurations] SET [CreatedBy] = 'Admin' WHERE [AlertID] IN (SELECT [AlertID] FROM [AlertConfigurations] WHERE [CreatedBy] NOT IN (SELECT [AccountID] FROM [Accounts]))