Documentation
Use Primentra
Getting Started
Data Grid
Approvals
Set up
Modeling
Business Rules
Users & Roles
Sign-in & Security
Install and run
Installation
Administration
Integration & API
Architecture
Migrate from MDS
Migrating from MDS
Documentation/Installation/Troubleshooting

Troubleshooting

On this page

Symptoms, causes and fixes for installation problems.

Sign-in through Active Directory or the Windows button does not work? See Active Directory Troubleshooting.

Always run Command Prompt or PowerShell as Administrator. Right-click and choose "Run as administrator". An administrator account alone does not give elevated privileges, and sc, net start and anything that writes to C:\Program Files\ fail with "Access is denied" without it.

Database connection

When a database was configured before but cannot be reached right now — most often because the server restarted before SQL Server finished starting — Primentra shows this screen instead of the sign-in page. It never offers a way to type in a new connection: nobody can prove they are an administrator while signing in itself needs the same database. The page checks again every 5 seconds and opens the sign-in page by itself once SQL Server answers. You can also click Try again, or email the account that was made the first administrator.

The database-not-reachable screen, showing the configured database name, username, a retry button and an email-admin link
The database-not-reachable screen, showing the configured database name, username, a retry button and an email-admin link(click to enlarge)
ErrorSolution
"Database not reachable" screen after a restartWait for SQL Server to finish starting: the page opens by itself when it answers. This is expected right after a reboot and usually clears within 2 minutes. Primentra waits for SQL Server before it runs its startup jobs, so errorlog.txt holds no error from that wait. After 5 minutes without an answer it writes one line, "Primentra cannot reach its database 5 minutes after the start", with the reason
"Database not configured"Open General Settings, enter the connection details, click Test connection and Save
"Cannot connect to SQL Server"Check the server name and instance, and that SQL Server runs. Enable TCP/IP in SQL Server Configuration Manager. Start the SQL Server Browser service for named instances
Certificate or "self-signed certificate in certificate chain" errorLeave Trust server certificate checked. A default SQL Server install uses a self-signed certificate. Uncheck it only when the server has a CA-signed certificate — see Database Connection
"Port for ... not found"You typed the database name in the Instance field. Instance is the SQL Server instance name, such as SQLEXPRESS. If the SSMS title bar shows only SERVER, leave Instance empty
"Login failed for 'primentra_svc'"Check the password against setup-db-and-user.sql. Check that Mixed Mode authentication is enabled
"Named instance not found"SQL Server Browser is not running. Open services.msc, set it to Automatic, and start it

Database setup

ErrorSolution
Port or connection error during setupEnable Named Pipes and TCP/IP in SQL Server Configuration Manager, then restart SQL Server. Start SQL Server Browser for named instances
"Could not create constraint or index"The primentra_svc account lacks REFERENCES permission. Run as sysadmin: USE Primentra; GRANT REFERENCES ON SCHEMA::dbo TO primentra_app; GRANT CREATE SCHEMA TO primentra_app; ALTER ROLE db_ddladmin ADD MEMBER primentra_app;
Setup script fails with a permission errorRun setup-db-and-user.sql as sysadmin first. Setup needs CREATE TABLE, ALTER, REFERENCES and CREATE PROCEDURE
Schema deployed into the wrong databaseThe script refuses to deploy into master, tempdb, model or msdb. Connect to the target database first: sqlcmd -d <database>

Windows service

ErrorSolution
The service will not start after installationRead logs\service.err.log. The usual cause is that the database is not configured yet — open the browser and finish the setup wizard
The service is stuck or keeps restartingRun scripts\repair-service.bat as Administrator. It reinstalls the service with the correct configuration
Port already in useThe installer detects this and suggests a free port. Accept it, or change the port later with scripts\change-port.bat 3002

Installation and upgrade

ErrorSolution
"Access is denied" or "DeleteFile failed"A file is locked. Close services.msc, close any command prompt in the install folder, and exclude C:\Program Files\Primentra\ from antivirus scanning. Last resort: sc delete Primentra, then run the installer again
"DeleteFile failed; code 5" on nssm.exe during an upgradeThe old Primentra process is still running. Keep the installer open and stop that process, as shown under The installer cannot replace nssm.exe. Then click Try again
Locked out of the admin accountOpen Command Prompt or PowerShell as Administrator in the install folder and run node scripts\recover-admin.mjs. Type the full command including node — do not double-click the file. See Account Recovery

The installer cannot replace nssm.exe

The installer stops and removes the Primentra service before it copies the new files. Sometimes the old process keeps running anyway. We saw this right after the server had started. The installer then cannot replace nssm.exe and asks you to choose an action.

  1. Leave the installer window open.
  2. Open PowerShell as Administrator.
  3. Run this line to see the processes of Primentra: nssm.exe from the Primentra folder, and the node.exe it started. Other Node.js programs on the server are not in the list.
$p = @(Get-CimInstance Win32_Process); $n = @($p | Where-Object { $_.Name -eq 'nssm.exe' -and $_.ExecutablePath -like 'C:\Program Files\Primentra\*' }).ProcessId; $p | Where-Object { ($n -contains $_.ProcessId) -or ($_.Name -eq 'node.exe' -and $n -contains $_.ParentProcessId) } | Select-Object ProcessId,Name,ParentProcessId
  1. Stop them. Type the numbers from the ProcessId column, for example:
Stop-Process -Id 4732,172 -Force
  1. Go back to the installer and click Try again. Do not click Skip this file.

Did you install Primentra in another folder? Then change C:\Program Files\Primentra\ in the line of step 3.

License and trial

The 60-day trial is tied to the server it started on, not to the installation. Reinstalling Primentra does not extend it. A fresh installation therefore continues — or immediately ends — a trial that was started earlier on the same machine.

ErrorSolution
"License expired" or read-only mode right after a new installationKnown issue up to and including 1.2026.6.22, fixed in 1.2026.7.28. Saving the database details cleared the license fields from the configuration file while the trial was still running. Run Restart-Service Primentra in an elevated PowerShell and refresh the browser. No reinstall is needed and no days are lost. To confirm first, open http://localhost:3001/api/trial-status on the server itself — it reports "status":"active" with the days left
Existing license key rejected after upgradingKeys are signed with Ed25519 since 1.2026.7.28, and older keys no longer validate. Request a replacement — see Licensing
"Trial expired" on a machine used beforeThe trial is recorded per server, so a reinstall does not start a new one. This also applies to a machine deployed from an image on which Primentra was evaluated. Send us the output of http://localhost:3001/api/trial-status and we will extend the trial or issue a key
Fewer trial days than expectedDays left are counted from the current system time, so a server clock set ahead makes the trial look shorter. Correct the time and the days return. Only the start date is fixed
Read-only and no key on the License tabThe trial ended. Enter a license key under Settings › General Settings › License

Logs and the Windows Event Log

All logs are in logs\ under the installation directory, by default C:\Program Files\Primentra\logs\.

FileContents
errorlog.txtApplication errors — API failures, startup problems, stack traces, a broken mds-config.json, a failed Event Log write
service.logService stdout — normal application output
service.err.logService stderr — crash details, Node.js errors and the [config] lines about mds-config.json
install.logInstaller log — a step-by-step record of the installation

You can also read errors in the application under Settings › Logs, or in Windows Event Viewer under Windows Logs, Application, source Primentra.

Event IDs

Primentra writes these events to the Windows Event Log. Filter the Application log on the source Primentra.

IDLevelWhat it meansWhat to do
100InformationThe service is starting. The text holds the version, the Node.js version and the folderNothing. If 101 does not follow, read logs\service.err.log
101InformationThe service started. The text holds the portNothing
102WarningNode.js is older than 22.15. The service runs, but Active Directory sign-in can failInstall a newer Node.js, then restart the service
103Warningmds-config.json is missing or broken. Primentra runs on the copy mds-config.json.bak, and settings are read-onlyFix the JSON, or copy mds-config.json.bak over the file. No restart needed. See If mds-config.json is broken
201ErrorAn uncaught exception. The service exits and restartsRead logs\errorlog.txt for the stack trace
202ErrorAn unhandled rejection. The service exits and restartsRead logs\errorlog.txt for the stack trace
203ErrorThe server cannot listen on its port. Most often another program uses the portRun scripts\change-port.bat <new-port>, or stop the other program
300ErrorThe service crashed 5 times in 5 minutes and stopped, so it does not loopFix the cause in logs\errorlog.txt, then run net start Primentra
410WarningActive Directory switched off the last active administratorRun node scripts\recover-admin.mjs on the server. See Account Recovery
411WarningThe Active Directory check failed twice in a row. The text holds the last errorOpen Settings › Access Management › Active Directory and click Test connection

If Primentra cannot write an event, it writes the line Event Log write failed to logs\errorlog.txt.

Repair tools

ScriptPurpose
scripts\repair-service.batReinstalls the Windows service — fixes a stuck, paused or failing service
scripts\change-port.bat 3002Changes the port Primentra listens on
node scripts\recover-admin.mjsLists users and resets passwords when you are locked out