Observability
Error “An item with the same key has already been added.” when accessing My Deployment page after upgrade to SolarWinds Platform 2025.x
This article provides information about an issue where the My Deployment page fails to load and displays the error “An item with the same key has already been added.” after upgrading the SolarWinds Platform to version 2025.x.
First published date
Last published date
Overview
After upgrading to SolarWinds Platform 2025.x, users may encounter an error message when opening the My Deployment page, particularly on the Servers or Pools tab.
Symptoms:
- Navigating to My Deployment > Servers or Pools results in a blank page.
Sample log snippet
{
"message": "An error has occurred.",
"exceptionMessage": "An item with the same key has already been added.",
"exceptionType": "System.ArgumentException",
"stackTrace": " at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)\r\n at SolarWinds.Orion.HA.WebApi.DataAccess.HAPoolRepository.GetListOfOrionServers(Boolean isAllServers)\r\n ..."
}
This error causes the Servers and Pools tabs on the Deployment Summary page to fail completely and may also impact other HA-related sections.
Product section
Cause
This issue occurs when a duplicate entry exists in the Websites table for the same ServerName, where one entry is defined as primary and another as additional.
The duplication may occur after running the Configuration Wizard during an upgrade or reconfiguration process.
For example, querying the Websites table may show identical entries for the same ServerName, such as:
|
WebsiteID |
ServerName |
IPAddress |
Port |
SSLEnabled |
Type |
FQDN |
|
1 |
Primary-Poller |
(All Unassigned) |
443 |
1 |
primary |
primary-poller.corp.local |
|
4 |
Primary-Poller |
(All Unassigned) |
443 |
1 |
additional |
primary-poller.corp.local |
When duplicate ServerName entries exist (e.g., both primary and additional types for the same host), the product fails while converting the Websites data collection into a dictionary, resulting in the error:
“An item with the same key has already been added.”
Another cause of the issue is if there are duplicate entries of the SolarWinds Server in the NodesData table (same caption but different IP addresses):
| NodeID | ObjectSubType | IP_Address | Caption |
| 1 | WMI | 192.168.1.1 | Primary-Poller |
| 2 | WMI | 192.168.1.2 | Primary-Poller |
Resolution
Resolution 1:
To resolve the issue, remove the duplicate entry from the Websites table.
Important: Before performing any direct SQL changes, create a full backup of your SolarWinds database.
- Open Database Manager or SQL Server Management Studio (SSMS) and connect to the SolarWindsOrion database.
- Run the following query to identify duplicate entries:
-- 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. SELECT * FROM Websites ORDER BY ServerName - Locate the duplicate ServerName entries (usually for the same primary server, where one is marked as additional).
- Delete the duplicate row using the following query, replacing X with the duplicate WebsiteID:
-- 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. DELETE FROM [dbo].[Websites] WHERE WebsiteID = X - Once the duplicate entry is removed, refresh the My Deployment page. The error should no longer appear.
Resolution 2:
- Check Manage Nodes page if there are duplicate entries of their SolarWinds Servers (duplicate entries with same hostname but different IP addresses)
Alternatively, check the NodesData table for the same
- Delete the incorrect entry either via Manage Nodes page or the NodesData table
- There may be instances wherein the duplicate entry was a result of a migration and the hostname was changed from the device-level but not updated on the database. If both servers need to be monitored, correct the Caption of the node