Running Network Agent

Nomatron is in early access. Some advanced workflows may not be covered in the public docs.

Running the Network Agent directly is the simplest way to prove private-cluster connectivity before moving to a long-lived service manager such as Docker or Nomad.

If you are already troubleshooting a broken or unstable agent, see Troubleshooting Network Agent .

This page assumes that you have already:

  • installed the nomatron-connectivity-agent binary;
  • created a working agent configuration file;
  • created or retrieved a Network Agent token from Nomatron and saved it to a root-only file such as /etc/nomatron/agent-token; and
  • confirmed that the private network can reach the Nomad API and the Nomatron server gRPC endpoint.

What must already exist

Before starting the agent, confirm all of the following:

  • a Nomatron server is already running and reachable from the private network;
  • the agent can make outbound connections to the Nomatron server gRPC endpoint on port 4650;
  • the agent can make outbound HTTP requests to the Nomatron server API on port 4649;
  • the agent host can reach the private Nomad API for every configured cluster; and
  • the config file contains a valid agent_id, an agent_token_file path (or the token is supplied through NOMATRON_CONNECTIVITY_AGENT_TOKEN), and at least one cluster block.

In most environments, the Network Agent opens outbound connections only. That means the Nomatron server does not need direct network access back into the private cluster network.

Start The Agent

The normal startup path is:

bash
nomatron-connectivity-agent --config /etc/nomatron/agent.hcl

If the config file is stored elsewhere, point --config at that path instead. The file is HCL (or JSON), so its name must end in .hcl or .json; a .yaml file fails with unrecognized file format suffix ".yaml", even though the v0.1.7 --config help text says “YAML config”.

Example:

bash
nomatron-connectivity-agent --config ./agent.hcl

The Network Agent reads most runtime settings from the config file. That includes:

  • the Nomatron control-plane endpoints;
  • the path to the Network Agent token file (agent_token_file);
  • the private Nomad cluster addresses; and
  • Nomad TLS and ACL settings.

Override With Environment Variables

If you need to override a few values at runtime, the agent also accepts environment variables.

Example:

bash
export NOMATRON_AGENT_CONFIG=/etc/nomatron/agent.hcl
export NOMATRON_AGENT_LOG_LEVEL=debug

nomatron-connectivity-agent

The most useful environment overrides are:

  • NOMATRON_AGENT_CONFIG
  • NOMATRON_AGENT_SERVER_ADDR
  • NOMATRON_AGENT_HTTP_BASE_URL
  • NOMATRON_AGENT_ID
  • NOMATRON_CONNECTIVITY_AGENT_TOKEN (NOMATRON_AGENT_TOKEN is accepted as a fallback alias)
  • NOMATRON_AGENT_LOG_LEVEL
  • NOMATRON_AGENT_LOG_FORMAT
  • NOMATRON_AGENT_HEARTBEAT_INTERVAL

The agent token is read from the first of these that is set:

  1. --agent-token-file, then agent_token_file in the config file;
  2. NOMATRON_CONNECTIVITY_AGENT_TOKEN;
  3. NOMATRON_AGENT_TOKEN;
  4. --agent-token (deprecated: it puts the token on the command line and logs a warning); and
  5. inline agent_token in the config file (lowest; avoid it).

Prefer agent_token_file or NOMATRON_CONNECTIVITY_AGENT_TOKEN injected from your secret store.

Use overrides sparingly. The config file should remain the main source of truth for the agent and the private Nomad cluster configuration.

What The Agent Does At Startup

When the process starts successfully, it:

  1. parses and validates the configuration;
  2. connects to one of the configured Nomatron server gRPC endpoints;
  3. authenticates with the Network Agent token;
  4. completes the control-plane handshake;
  5. validates the configured clusters against the Nomatron control plane;
  6. starts the long-lived gRPC session; and
  7. begins sending regular heartbeats and cluster-backed job event traffic.

If multiple control-plane endpoints are configured, the agent tries them in rotation. If the active connection drops, it reconnects automatically with backoff until a server becomes available again.

Example Startup Logs

With the default text log format, a healthy v0.1.7 startup looks similar to:

text
==> Nomatron Agent 0.1.7 (aca164ae349b3fbab9cffa1cad52efe2e9309878) 2026-11-14
==> Configuration:
     Agent ID            = 00000000-0000-0000-0000-000000000000
     Nomatron Servers    = nomatron.example.internal:4650
     HTTP Base URLs      = https://nomatron.example.internal:4649
     Config File         = /etc/nomatron/agent.hcl
     Clusters            = 1
[INFO]  nomatron-connectivity-agent: starting Agent: id=00000000-0000-0000-0000-000000000000
[INFO]  nomatron-connectivity-agent: build metadata: version=0.1.7 commit=aca164ae... build_date=2026-11-13T18:50:00Z
[INFO]  nomatron-connectivity-agent: log configured: level=info format=text
[INFO]  nomatron-connectivity-agent: control plane endpoints configured: count=1 servers=["nomatron.example.internal:4650"] http_base_urls=["https://nomatron.example.internal:4649"]
[INFO]  nomatron-connectivity-agent: cluster registry configured: count=1
[INFO]  nomatron-connectivity-agent: agent connected to server: agent_id=00000000-0000-0000-0000-000000000000 server=nomatron.example.internal:4650 http_base_url=https://nomatron.example.internal:4649 cluster_count=1

The important signals are:

  • the configuration banner shows the expected agent ID, servers, config file, and cluster count;
  • control plane endpoints configured and cluster registry configured appear; and
  • agent connected to server appears, which means the handshake, cluster validation, and event publishers are all up.

If the connection fails you will see failed to connect agent session to server (WARN, once per server tried) and agent session ended; reconnecting with a backoff= value (WARN). Backoff grows from 1s to a 30s maximum. On shutdown the agent logs nomatron-connectivity-agent stopped. A config with no cluster block exits with build agent runtime: at least one cluster is required.

Confirm That The Agent Is Working

After startup, verify the runtime from both sides:

On the agent host

  • the process stays running;
  • the logs show a successful connection instead of repeated reconnect attempts; and
  • there are no cluster validation failures.

In Nomatron

  • the Network Agent appears as connected;
  • the expected private cluster is associated with that agent; and
  • cluster-backed actions no longer fail due to missing private-network reachability.

If you are using this as an initial connectivity test, keep the log output visible while you validate the cluster from the Nomatron UI or CLI.

Common Failure Modes

Invalid agent token

If the token is wrong or has been rotated, the gRPC session will fail during authentication.

Check:

  • the token source the agent is actually using (agent_token_file, NOMATRON_CONNECTIVITY_AGENT_TOKEN, or NOMATRON_AGENT_TOKEN; see the precedence list above);
  • that the token file is readable by the agent user and contains only the token; and
  • whether the token was rotated after the token file was written.

gRPC endpoint unreachable

If the private network cannot reach the Nomatron server on port 4650, the agent cannot establish the control-plane session.

Check:

  • outbound firewall rules;
  • load balancer listeners;
  • DNS resolution; and
  • whether the Nomatron server gRPC listener is actually enabled and reachable.

HTTP base URL mismatch

The agent uses HTTP base URLs alongside the gRPC endpoints. If you configure multiple servers, the number of http_base_urls entries must match the number of server_addrs entries.

Cluster validation failed

The agent validates configured clusters after connecting to the control plane. If the cluster ID or cluster-facing settings are wrong, startup will fail even though the control-plane connection succeeded.

Check:

  • cluster_id;
  • the Nomad API address;
  • Nomad ACL token settings; and
  • Nomad TLS material.

Nomad API unreachable from the private network

The Network Agent must be able to reach the Nomad API for each configured cluster. If it cannot, proxy operations and event collection will fail.

Control-plane TLS mismatch

If Nomatron uses TLS on the control-plane endpoints, the agent must trust the CA and, when needed, use the correct TLS server name.

When To Use A Service Manager Instead

Direct binary execution is a good fit for:

  • local validation;
  • proof-of-connectivity work;
  • debugging control-plane reachability; and
  • simple long-lived hosts managed by systemd or another init system.

If you are standardizing the agent as infrastructure, the next deployment models to consider are: