Submit a ticketCall us

AnnouncementsChange Is Inevitable

Get valuable help when it comes to tracking and monitoring changes. SolarWinds® Server Configuration Monitor (SCM) is designed to help you: detect, track, and receive alerts when changes occur, correlate system performance against configuration changes, compare server and application configuration against custom baselines, and verify application and system changes.

Learn more.

Home > Success Center > Network Performance Monitor (NPM) > NPM - Knowledgebase Articles > Solarwinds Cortex Service will not start

Solarwinds Cortex Service will not start

Created by Kevin Twomey, last modified by Kim Do on Sep 20, 2018

Views: 1,517 Votes: 0 Revisions: 16

Updated February 14, 2018

Overview

In NPM 12.2, the SolarWinds Cortex Service will not start.

The SolarWinds Cortex Service is a new feature in Core 2017.3 and higher.

Environment

  • Core 2017.3 or higher
  • NPM 12.2 or higher

Cause 

Cause #1

The four Cortex file groups are missing in the Orion database. No files are assigned to the "CORTEX_DOCUMENTS" file group.

For example, if the Orion 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 displays in the Cortex.log file:

2017-11-20 09:52:07,270 [5] 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

The type 'cortex_BigIntIdTableType' already exists.

 

Log file: C:\ProgramData\Solarwinds\Logs\Cortex\cortex.log

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.

Resolution

Resolution #1:

Recreate the CORETEX 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."

 

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 Orion server or use the diagnostics. The results of the following query can help to verify that the file group was created successfully.

 

SELECT *
FROM sys.database_files sdf
INNER JOIN sys.filegroups fg ON sdf.data_space_id = fg.data_space_id

 

Resolution #2:

  1. Run the following query to determine if type cortex_BigIntIdTableType exists
    SELECT * FROM sys.types WHERE name = 'cortex_BigIntIdTableType'
  2. If the type does exist, run the following to drop it off the table:
    DROP type cortex_BigIntIdTableType

  3. Restart Cortex services, and check if type cortex_BigIntIdTableType is rebuilt. If it is not rebuilt, proceed to the next step (4).
  4. 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 Mangement Consoleto drop the current Cortex_Document and re-create those needed files:

 

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 minute to see if it still not running.

 

Suggested Tags:  Cortex

 

A reason for rework or Feedback from Technical Content Review:

 

 

Last modified

Tags

Classifications

Public