Skip to main content

The JAMS NATS Server Service

The JAMS installer adds one Windows service to host the message broker.

Service Identity​

PropertyValue
Service nameJAMSNATSServer
Display nameJAMS NATS Server
DescriptionThe JAMS NATS server provides messaging services.
Startup typeAutomatic
AccountLocalSystem, the same as the other JAMS services
RecoveryRestart on the first and second failure after 60 seconds. The failure count resets daily.
Removed on uninstallYes

Use the service name in PowerShell:

Get-Service JAMSNATSServer
Restart-Service JAMSNATSServer -Force

The service runs the bundled broker with the JAMS configuration file:

"C:\Program Files\MVPSI\JAMS\Scheduler\NATS\jams-nats-server.exe" -c "C:\Program Files\MVPSI\JAMS\Scheduler\NATS\nats-server.conf"

The JAMS Services Depend on It​

The JAMS Scheduler, JAMS Server, and JAMS Executor services have a Windows service dependency on JAMSNATSServer, the same relationship they had with MSMQ.

caution

Windows enforces the dependency, so the JAMS services cannot start until the NATS service is running. If all three JAMS services fail to start after an install, upgrade, or configuration change, check JAMSNATSServer first. See Troubleshooting NATS.

Windows starts and stops the services in dependency order. Stopping JAMSNATSServer by hand prompts you to stop the dependent JAMS services with it.

Installed Files​

The installer creates a NATS folder inside the Scheduler folder. By default that is C:\Program Files\MVPSI\JAMS\Scheduler\NATS.

Three files come from the installer:

FilePurpose
jams-nats-server.exeThe NATS broker. This is the stock nats-server, version 2.14.1.
nats.exeThe NATS administration CLI, version 0.4.0. See Using the NATS Admin CLI.
LICENSEThe NATS license.

The rest are generated on the machine during setup:

FilePurpose
nats-server.confYour configuration file. Kept across upgrades.
nats-server-defaults.confDefaults maintained by JAMS. Regenerated. Do not edit.
nats-server-cert.pemThe server's TLS certificate.
nats-server-key.pemThe private key for that certificate.
nats-ca.pemThe JAMS root CA certificate, used to verify clients.
nats-server.logThe broker's log, written once the service runs.

See Configuring the NATS Server and NATS TLS Certificates.

note

Setup removes BUILTIN\Users access from the NATS folder so that standard users cannot read the unencrypted private key.

Uninstall leaves the generated files behind

Uninstalling JAMS removes the service and the three installed files. The configuration files, the log, the three .pem files (including the unencrypted private key), and the message store under C:\ProgramData\JAMS\NATS stay on disk. Remove them by hand if you are decommissioning the machine. See NATS TLS Certificates.

Message Store​

Reliable messages are stored outside the program folder so they survive an upgrade:

C:\ProgramData\JAMS\NATS

Setup creates this folder and removes BUILTIN\Users access, because it holds message payloads. Exclude it from real-time antivirus scanning, along with your other JAMS data folders.

tip

The folder grows while reliable messages wait to be processed and shrinks as they are acknowledged. On a healthy system it stays small. Sustained growth means the Scheduler is not keeping up, or is not consuming at all. See Monitoring the NATS Server.

Service Account​

There is normally no reason to change the account. The NATS service needs no database or network credentials. It only listens for connections. If you do move it to a dedicated Windows account, that account needs:

  • Read access to the three .pem files in the NATS folder.
  • Read and write access to C:\ProgramData\JAMS\NATS.

Both folders have restricted permissions, so grant the access explicitly. The same applies to any other account that must read the certificates, such as a SCOM RunAs account. See SCOM Integration with NATS.

One Instance per Machine​

Only one NATS server can bind the client port. If a second copy is started, for example a hand-launched jams-nats-server.exe, it fails and records the reason in nats-server.log.