Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

BrokerGateway TLS issue

Solved177 views14th October 2025BrokerGateway
4
Philip Argent [DevOps Enabler]944 7th October 2025 0 Comments

I've migrated a new cluster over to using the BrokerGateway and have been getting notice alarms from all the DMAs of 'Could not connect to the local NATS endpoint on '<IP>'. Please make sure that the nats service is running without issues.', doing some digging I found we were getting 'TLS handshake error: remote error: tls: bad certificate' errors in the nats-server log file, so threw together the following powershell script to to install the root ca.pem cert generated in 'C:\ProgramData\Skyline Communications\DataMiner Security' to all the DMAs machine trusted root certificate authorities, which has resolved the issue and stopped the alarms.

Can the root cert get added to the trusted root certificate authorities as part of the package installation?

$Servers = Get-Content "C:\scripts\servers.txt" | Where-Object { $_ -notmatch '^#' }

foreach ($server in $Servers) {
Write-Host ("Processing " + $server + "...")

try {
Invoke-Command -ComputerName $server -ScriptBlock {
$pemPath = "C:\ProgramData\Skyline Communications\DataMiner Security\ca.pem"

if (-not (Test-Path $pemPath)) {
Write-Warning ("[" + $env:COMPUTERNAME + "] PEM file not found at " + $pemPath)
return
}

# Read the PEM file and extract Base64
$certPem = Get-Content -Raw -Path $pemPath
$base64Lines = $certPem -split "`r?`n" | Where-Object {
($_ -notmatch "-----BEGIN CERTIFICATE-----") -and ($_ -notmatch "-----END CERTIFICATE-----")
}
$base64 = ($base64Lines -join "")
$certBytes = [Convert]::FromBase64String($base64)

# Create certificate object
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @(,$certBytes)
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("Root", "LocalMachine")
$store.Open("ReadWrite")

# Check if already installed
if ($store.Certificates | Where-Object { $_.Thumbprint -eq $cert.Thumbprint }) {
Write-Host ("[" + $env:COMPUTERNAME + "] Certificate already installed: " + $cert.Subject)
}
else {
$store.Add($cert)
Write-Host ("[" + $env:COMPUTERNAME + "] Installed certificate: " + $cert.Subject)
}

$store.Close()
}
}
catch {
Write-Warning ("Failed to install certificate on " + $server + " - " + $_.Exception.Message)
}
}

Philip Argent [DevOps Enabler] Selected answer as best 14th October 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Pieter Lust [SLC] [DevOps Advocate]160 Posted 7th October 2025 3 Comments

Hi,

This step is not necessary as NATS reads the certificate file directly instead of going through the Certificate Store.
This should be configured here:
C:\Program Files\Skyline Communications\DataMiner BrokerGateway\nats-server\nats-server.config
Check if the following is present.

"tls": {
"key_file": "C:\\ProgramData\\Skyline Communications\\DataMiner Security\\cert_key.pem",
"cert_file": "C:\\ProgramData\\Skyline Communications\\DataMiner Security\\cert.pem",
"ca_file": "C:\\ProgramData\\Skyline Communications\\DataMiner Security\\ca.pem"
}

If this is present, It could be that you accidently activated the old service(s) NAS and NATS instead of nats-server. Make sure this is the case.

Philip Argent [DevOps Enabler] Selected answer as best 14th October 2025
Pieter Lust [SLC] [DevOps Advocate] commented 7th October 2025

The old services are still present to make migrating back and forth between the versions faster.
These services will be removed completely in a later version of DataMiner.

Philip Argent [DevOps Enabler] commented 7th October 2025

NAS and NATS are both stopped and set to manual, <BrokerGateway>true</BrokerGateway> is set in MaintenanceSettings.xml.

Those tls tags are all set in the nats-server.config file in the root and the cluster sections, but I'm still getting the errors in the log file and warning alarms without the root certificate being trusted.

Pieter Lust [SLC] [DevOps Advocate] commented 9th October 2025

It's odd that nats server doesn't load in the certificate in via file.
We'd like to investigate why this isn't the case. Can you create a ticket and include a logpackage so we can check what happened?

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin