Network Management

SolarWinds Cortex Service will not start in SolarWinds Platform

This article describes an issue that prevents the SolarWinds Cortex Service from starting on a server hosting NPM 12.2 and above. When this issue occurs, no files are assigned to the "CORTEX_DOCUMENTS" file group. In version of npm higher than 12.3 Cortex may not crash but it may still be necessary to perform some of these steps depending on the errors in the Cortex logs after a database migration. Also An error "There was an error retrieving data from SolarWinds Information Service. Error: A query to the SolarWinds Information Service failed." occurs when logging in to the SolarWinds Platorm web console.

First published date

11/1/2018 6:59 PM

Last published date

3/21/2025 8:49 PM

Overview

The SolarWinds Cortex Service will not start.

The SolarWinds Cortex Service is a feature first introduced in SolarWinds Orion 2017.3.

Product section

Orion Platform

Cause

Cause #1

The four Cortex file groups are missing in the SolarWinds Platform database. No files are assigned to the "CORTEX_DOCUMENTS" filegroup.

For example, if the SolarWinds Platform database is installed on the D drive, the following should be visible:

'D:\DATA\SolarWindsOrion.mdf'

'D:\LOG\SolarWindsOrion_LOG.ldf'

'D:\DATA\SolarWindsOrion_Cortex_documents1.ndf'

'D:\DATA\SolarWindsOrion_Cortex_documents2.ndf'

'D:\DATA\SolarWindsOrion_Cortex_documents3.ndf'

'D:\DATA\SolarWindsOrion_Cortex_documents4.ndf'

Additionally, the following error message is displayed in the Cortex.log file:

FATAL SolarWinds.Cortex.Hosting.SubsystemManager - Error starting Cortex subsystems.
System.AggregateException: One or more errors occurred. ---> System.Data.SqlClient.SqlException: The filegroup "CORTEX_DOCUMENTS" has no files 
assigned to it.
Tables, indexes, text columns, ntext columns, and image columns cannot be populated on this filegroup until a file is added. Line 4


Cause #2

Platform:Cortex v1; NPM 12.2 (deprecated)

The type 'cortex_BigIntIdTableType' already exists.

Logfile: C:\ProgramData\Solarwinds\Logs\Cortex\cortex.log

Version 2023.2.1

cortex_BigIntIdTableType exists already,
issues after upgrade from 2020.2.6 HF5 to 2023.2.1
(Fix, review resolution 2)
 

Error:

ERROR SolarWinds.Cortex.Persistence.Sql.SqlSchemaUpgrader - System.Data.SqlClient.SqlException (0x80131904): The type 'cortex_BigIntIdTableType' 
already exists, or you do not have permission to create it.

Similar error on version 2023.2.1
ERROR Persistance.SolarWinds.Cortex.Internal.Persistance.SQL.SqlSchemeUpgrader - Upgrade failed due to an unexpected exeption: System.Data.SQLClient.SQLException (0X80131904): The type 'cortex.bigIntIDTableType' already exists, or you do not have permission to create it.


Resolution

Resolution #1:

Recreate the CORTEX file groups. Run the configuration wizard on the Main Poller first. If this does not help, run SQL to create the file groups.

The following example shows a database named SolarWindsOrion installed on a D drive on the SQL server.

Remove the first line if this query results in the error message: "Filegroup 'CORTEX_DOCUMENTS' already exists in this database. Specify a different name or remove the conflicting filegroup if it is empty."

-- 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.

ALTER DATABASE [SolarWindsOrion] ADD FILEGROUP [CORTEX_DOCUMENTS];

ALTER DATABASE [SolarWindsOrion] ADD FILE 
(
NAME = 'Cortex_documents1',
FILENAME = 'D:\DATA\SolarWindsOrion_Cortex_documents1.ndf',
SIZE = 5 MB,
FILEGROWTH = 1024 MB
), 
(
NAME = 'Cortex_documents2',
FILENAME = 'D:\DATA\SolarWindsOrion_Cortex_documents2.ndf',
SIZE = 5 MB,
FILEGROWTH = 1024 MB
), 
(
NAME = 'Cortex_documents3',
FILENAME = 'D:\DATA\SolarWindsOrion_Cortex_documents3.ndf',
SIZE = 5 MB,
FILEGROWTH = 1024 MB
), 
(
NAME = 'Cortex_documents4',
FILENAME = 'D:\DATA\SolarWindsOrion_Cortex_documents4.ndf',
SIZE = 5 MB,
FILEGROWTH = 1024 MB
) TO FILEGROUP [CORTEX_DOCUMENTS];

When you are finished, check the CORTEX logs on the SolarWinds Platform server or use the diagnostics. The results of the following query can help to verify that the filegroup was created successfully.

-- 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 sys.database_files sdf
INNER JOIN sys.filegroups fg ON sdf.data_space_id = fg.data_space_id

Resolution #2:

  1. Stop SolarWinds Platform Services before completing the script
  2. Run the following query to determine if the type cortex_BigIntIdTableType exists
    -- 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 sys.types WHERE name = 'cortex_BigIntIdTableType'
  3. If the type does exist, run the following to drop it off the table:

    -- 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.
    
    
    DROP type cortex_BigIntIdTableType
  4. Restart Cortex services or All Services, and check if type cortex_BigIntIdTableType is rebuilt. and validate if Performance analyzer is presenting the charts.
  5. If it is not rebuilt, proceed to the next step.
  6. Run Configuration Wizard. This will rebuild type cortex_BigIntIdTableType.

Resolution #3: 

    1. Stop Cortex Services on all pollers

    2. Run the following query on the SQL Studio Management Console to drop the current Cortex_Document and re-create those needed files:

-- 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.

DROP TABLE [dbo].[Cortex_Documents]
DROP TABLE [dbo].[Cortex_DocumentTypes]
DROP TABLE [dbo].[Cortex_ExternalDocumentTypes]

CREATE TABLE [dbo].[Cortex_Documents](
[ElementId] [bigint] NOT NULL,
[DocTypeId] [int] NOT NULL,
[OwnerPartitionId] [int] NOT NULL,
[LastWriteTime][datetime2](7) NOT NULL,
[DeletedDate] [datetime2](7) NULL,
[Data] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Cortex_Documents] PRIMARY KEY CLUSTERED (
[ElementId] ASC,
[DocTypeId] ASC
) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Cortex_DocumentTypes](
[DocTypeId] [int] IDENTITY(1,1) NOT NULL,
[DocType] [nvarchar](250) NOT NULL,
CONSTRAINT [PK_Cortex_DocumentTypes] PRIMARY KEY CLUSTERED (
[DocTypeId] ASC
) ON [PRIMARY],
CONSTRAINT [IX_Cortex_DocumentTypes] UNIQUE NONCLUSTERED (
[DocType] ASC
) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Cortex_ExternalDocumentTypes](
[DocTypeId] [int] IDENTITY(1,1) NOT NULL,
[DocType] [nvarchar](250) NOT NULL,
CONSTRAINT [PK_Cortex_ExternalDocumentTypes] PRIMARY KEY CLUSTERED (
[DocTypeId] ASC
) ON [PRIMARY],
CONSTRAINT [IX_Cortex_ExternalDocumentTypes] UNIQUE NONCLUSTERED (
[DocType] ASC
) ON [PRIMARY]
) ON [PRIMARY]

  3. Start the Cortex Service back up, wait for a few minutes to see if it still not running.

Resolution #4:

  1. Go to Programs and Features.
  2. Right Click on SolarWinds Platform XXXX (XXXX is the version) and choose Repair.
  3. Run the Configuration Wizard.