Skip to content

When the audit trail is down

eaxScadaHow-to guideStarterProEnterpriseView as Markdown

In Starter, Pro and Enterprise every action that changes the plant, a safety setting, the project or who may do what writes its audit record first. When the audit trail cannot take that record, the action is refused and nothing changes. This guide tells you why the trail is down, how to bring it back, and how to set a damaged trail file aside.

The server itself keeps running while the trail is down: monitoring, alarms, trends and the actions that record after the fact (an alarm acknowledgement, a stop, a force release) go on. The Free edition has no audit trail, so it is never down (Which editions record).

  • The system alarm ALM-SYS-AUDIT-DOWN (critical): “Audit trail down - actions that need an audit record are refused”. Its metric condition is AuditTrailDown (eaxscada_system_condition).
  • Refused actions. A setpoint or command with a reason or signature, a screen save, a deploy, a configuration change, a recipe action: each is refused with 503 and the code AUDIT_NOT_WRITTEN. The message says “… refused, nothing changed: the audit trail could not be written: …”, with “the audit trail is down” and the cause. Nothing was written to equipment, saved or deployed.
  • System Health > Audit trail shows down with the cause, and the banner at the top says “the audit trail is down: actions that need an audit record are refused (the Audit trail card has the reason)”.
  • Security > Operations audit has a rose note above the grid: “The audit trail is down: every action that needs an audit record is refused until it records again. System Health has the reason.” Under it, the grid is empty and says “The audit trail is down; System Health has the reason.”: never the server’s own message, which names the file and its folder.
  • The licence dialog says “Audit trail: down (…)” with the cause, for an administrator.
  • The server log says AUDIT TRAIL DOWN with the cause and the fix: at start, and each time the trail fails. When the trail is down at start and looks repairable, a second line says “the audit trail may be repairable” and what to run (Repair a trail a checkpoint cut short).

System Health, the Audit trail card of a Pro server whose trail records: Audit trail “recording”, File data\audit\audit.duckdb, Size / records “20 kB / 6”, Last append, Append p50 / p99 “6.30 / 6.77 ms over the last 6 appends”, Encrypted “no”, System requirements “met”. System Health, the Audit trail card of a Pro server whose trail records: Audit trail “recording”, File data\audit\audit.duckdb, Size / records “20 kB / 6”, Last append, Append p50 / p99 “6.30 / 6.77 ms over the last 6 appends”, Encrypted “no”, System requirements “met”.

The Audit trail card while the trail records. When it is down, the first row reads "down" with the cause, in rose.

System Health of a Pro server whose trail is down: the banner says “the audit trail is down: actions that need an audit record are refused (the Audit trail card has the reason)”; the Audit trail card shows “down” in rose with the cause, the file C:\eaxscada-demo\data\audit\audit.duckdb exists but is not a valid DuckDB database file; Size / records “4 kB / 0”, System requirements “met”. System Health of a Pro server whose trail is down: the banner says “the audit trail is down: actions that need an audit record are refused (the Audit trail card has the reason)”; the Audit trail card shows “down” in rose with the cause, the file C:\eaxscada-demo\data\audit\audit.duckdb exists but is not a valid DuckDB database file; Size / records “4 kB / 0”, System requirements “met”.

The trail is down: the banner line and the Audit trail card with the cause, here a damaged audit.duckdb (step 3).

Security > Operations audit while the trail is down: the rose note “The audit trail is down: every action that needs an audit record is refused until it records again. System Health has the reason.”, the chip “Not verified”, 0 records, and the empty grid saying “The audit trail is down; System Health has the reason.” Security > Operations audit while the trail is down: the rose note “The audit trail is down: every action that needs an audit record is refused until it records again. System Health has the reason.”, the chip “Not verified”, 0 records, and the empty grid saying “The audit trail is down; System Health has the reason.”

Operations audit while the trail is down: the rose note and the grid's own text, never the server's message.

The server tries the trail again every 30 seconds, and at an action at most every 5 seconds. When it opens, the trail continues with the record AUDIT_TRAIL_RESUMED (“no record was written while it was down”), and the alarm clears. Nothing was recorded while it was down, because nothing that needed a record was done.

State machineThe four states of the audit trail
The four states of the audit trailAt start, a server with a paid licence records; without one it keeps an earlier trail readable (READ_ONLY) or keeps none (NONE). Installing a paid licence starts recording. A trail that records goes DOWN when a write fails or a requirement is refused, and records again once it can be opened. While it is down every action that records first is refused.NONEno trail kept: no paidlicence, no trail fileREAD_ONLYno paid licence:an earlier trail, readRECORDINGeach record committedDOWNactions refusedNever back to NONEa downgrade or an expiry keeps recording until thenext start; a trail that is down stays down until it recordspaid licencepaid licenceinstalledpaid licenceinstalleda write failsopened again
Once recording, the trail never goes back to NONE: a downgrade or an expiry keeps it recording until the next start, and a trail that is down refuses actions instead of letting them through unrecorded.
Read as text

At start, a server with a paid licence records; without one it keeps an earlier trail readable (READ_ONLY) or keeps none (NONE). Installing a paid licence starts recording. A trail that records goes DOWN when a write fails or a requirement is refused, and records again once it can be opened. While it is down every action that records first is refused.

States

  • NONE (state): no trail kept: no paid licence, no trail file
  • READ_ONLY (state): no paid licence: an earlier trail, read
  • RECORDING (state): each record committed
  • DOWN (state): actions refused

Transitions

  • Start → NONE (transition). At start without a paid licence and without a trail file, no trail is kept.
  • Start → READ_ONLY (transition). At start without a paid licence, an earlier trail file is kept readable and nothing is written to it.
  • Start → RECORDING (transition): paid licence. At start with a paid licence the trail records; it starts DOWN when it cannot be opened or a requirement is refused. Its first record is AUDIT_TRAIL_STARTED.
  • NONE → RECORDING (transition): paid licence installed. AUDIT_TRAIL_RESUMED records the gap when an earlier trail is continued.
  • READ_ONLY → RECORDING (transition): paid licence installed
  • RECORDING → DOWN (transition): a write fails. Also when a requirement of the trail is refused.
  • DOWN → RECORDING (transition): opened again. Tried at the next record, at most every 5 seconds, and every 30 seconds in the background. The first record after it is AUDIT_TRAIL_RESUMED.

Read the cause in System Health’s Audit trail card, or the server log line AUDIT TRAIL DOWN (the cause follows it), then the table:

Cause in the log What it means Fix Comes back
“… is on a network share (…): put security.audit_data_dir on a local disk” The audit folder is on SMB, NFS or a similar share. A sync there may be acknowledged before it is stored. Point security.audit_data_dir at a folder on a local disk, move audit.duckdb and its .wal there with the server stopped, and start it. After the restart.
“… is on a RAM disk (…), which does not survive a power loss” The folder is on tmpfs, ramfs or a RAM disk. As above: a local disk. After the restart.
“… has N GB free, less than the 10 GB the audit trail needs” Less than 10 GB free on the audit folder’s volume. Free space on that volume (or move the folder, as above). Keep 20 GB or more. By itself within 30 seconds.
“… is the historian folder, inside it or around it …” after a licence was installed while the server ran The audit folder is inside or around the historian’s. The server ran Free, which records nothing and so started; the licence needs a trail, and the server never records it there. The log says what to do: “set security.audit_data_dir outside the historian folder and restart eaxScada”. The 30-second retry does not fix it: the setting is read at start. Set security.audit_data_dir to a folder outside the historian’s, and restart. After the restart.
The file is “used by another process”, “Could not set lock”, “conflicting lock” Another process holds audit.duckdb: a second eaxScada on the same folder, an offline command, a backup or antivirus tool, a database tool. The file is not damaged. Stop that process, or exclude the audit folder from it. Never set a held file aside. By itself within 30 seconds.
An open error that names the encryption or its key historian.tde_encryption was switched on or off for an install that already has an audit.duckdb. Converting an existing trail is not supported yet. Turn the setting back to what the trail was made with, and restart. After the restart.
A permission error (“access is denied”, “permission denied”) The server’s account may not write the audit folder. Give the account write access to the folder and its files. By itself within 30 seconds.
A write error while the server ran (the disk full, an I/O error) A record’s commit failed: the action was refused and the trail is reopened. Free space or fix the disk. At the next try.
The database “does not open”: “Corrupt database file”, “not a valid DuckDB database”, an error that stays after a restart audit.duckdb is damaged. Stop the server and run the dry run: repair it when it is offered (a checkpoint cut short), otherwise set it aside: step 3. After the repair or the set-aside and a restart.

Warnings are not a cause: removable media, an SD card or eMMC, less than 20 GB free, and sync times that are implausibly fast or slow are logged and recorded as AUDIT_STORAGE_WARNING, and the trail records. Fix them before they become a refusal (Audit trail system requirements).

The one case that stops the start (Starter, Pro and Enterprise): an audit folder that is the historian’s folder, inside it or around it. The server does not start (“security.audit_data_dir (…) is the historian folder, inside it or around it (…)”). Give the audit trail its own folder outside the historian’s, and start again. A Free server starts with such a folder: it records nothing, and a trail kept there from a paid period is not opened (a warning in the log).

Before it goes down: ALM-SYS-AUDIT-DISK. The medium system alarm “Audit trail disk low - under 10 GB free” is active while the trail records and its volume has less than 10 GB free. The trail still records, until the disk refuses a write. Free space then, before the trail goes down; the alarm clears at 10 GB free. A server started with less than 10 GB free starts with the trail down.

  1. Wait for the alarm ALM-SYS-AUDIT-DOWN to clear (or restart the server when the fix needs it). System Health’s Audit trail card reads recording.
  2. Open Security > Operations audit. The newest record is AUDIT_TRAIL_RESUMED (or, after a set-aside, LEDGER_FILE_SET_ASIDE; after a repair, LEDGER_FILE_REPAIRED).
  3. Click Verify. The chip shows Verified - N records.
  4. Repeat the action that was refused. Nothing was done the first time.

Only for a file that is damaged: one that does not open, is not held by another process, and whose error does not name the encryption key. It is never done automatically. The command renames the file and keeps it; it never deletes it. A trail a checkpoint cut short can be repaired instead, and its chain continues: the dry run says whether it can (below).

You need an administrator account of this server (not the AI co-pilot), its password, a Starter, Pro or Enterprise licence, and the server stopped.

  1. Stop eaxScada. The command refuses while the server answers on its port or holds its data lock.

  2. Run a dry run, from the server’s working folder (or give --workdir and --config). It changes nothing:

    Terminal window
    eaxscada audit-set-aside

    It says which file it would check and what it would do, and whether the trail can be repaired: “Repair: OFFERED. …”, “Repair: not offered (…). Only a set-aside is possible.” or “Repair: the trail opens; there is nothing to repair.” If the repair is offered, repair it (below) rather than set it aside.

  3. Set it aside, with your administrator name and a reason. The password is read from the console (standard input):

    Terminal window
    eaxscada audit-set-aside --confirm --user admin --reason "audit.duckdb damaged after the disk failure of 11 Nov"

    The password is checked as an electronic signature against the security store: the check is recorded as ESIG_VERIFIED in the sign-in trail, and a wrong password counts towards the account lockout.

  4. Read the result. For example:

    The audit trail did not open (… Corrupt database file …).
    It was set aside unchanged as ./data/audit/audit.broken-20261111T091500Z.duckdb (7864320 bytes, SHA-256 3f…a9); a new audit trail starts and records the set-aside.
  5. Start eaxScada, and check as in step 2.

What the set-aside does:

  • audit.duckdb becomes audit.broken-<UTC time>.duckdb, and its write-ahead log audit.duckdb.wal becomes audit.broken-<UTC time>.duckdb.wal. Both or neither: if the log cannot be renamed, the file is put back and nothing changed.
  • A new trail starts: its genesis record, then LEDGER_FILE_SET_ASIDE with the old file’s name, size and SHA-256, who set it aside and why, and the sentence “The records in the old file are not part of this chain.”
  • The tip anchor in the security store is reset, so the new trail is not taken for a cut one.

Keep the broken file. It holds the records written before it broke. It is evidence for your quality or IT security lead; eaxScada never deletes it.

If the audit trail does not open because a checkpoint was cut short (a power loss or a killed process during a checkpoint), eaxscada audit-set-aside (without --confirm) also says whether it can be repaired: it checks a copy in a temporary folder and verifies every table, the hash chain from the start and the tip anchor, then removes the copy. Nothing in the audit folder changes. The server log says so too: while the trail is down at start, a second AUDIT TRAIL DOWN line says “the audit trail may be repairable” and what to run. Nothing is ever repaired automatically, and an encrypted trail is never repaired.

When the dry run says “Repair: OFFERED”, repair it, signed like a set-aside (the same administrator, password and reason; the text signed is “audit-repair of <file>: <reason>”):

Terminal window
eaxscada audit-set-aside --repair --confirm --user admin --reason "audit.duckdb torn by the power cut of 11 Nov"

The command checks a copy again in the audit folder, writes a journal, puts the verified copy in place and keeps the original as audit.torn-<UTC time>.duckdb. It says, for example:

The audit trail did not open (… computed checksum … does not match stored checksum … in block at location …).
It was repaired: metadata block <id> (location <offset>) had a wrong checksum after a checkpoint cut short; the repaired copy verified (…) and is in place (SHA-256 …).
The original is kept unchanged as ./data/audit/audit.torn-20261118T091500Z.duckdb (SHA-256 …); journal ./data/audit/audit.torn-20261118T091500Z.duckdb.repair.json. The trail continues and records the repair.

Then start eaxScada and check as in step 2.

What the repair does:

  • audit.duckdb becomes audit.torn-<UTC time>.duckdb, and its .wal is kept with it; the verified copy and its .wal take their place. Nothing is deleted or overwritten. The journal audit.torn-<UTC time>.duckdb.repair.json (both SHA-256, the block, the verification) is written before the swap.
  • The trail continues its chain: its write-ahead log replays, and the next record, LEDGER_FILE_REPAIRED, names the block, the verification, who repaired it and why, and both files’ SHA-256. No new trail starts: the copy was verified to reach the tip anchor, so no record the server stored as its last is missing.

Keep the original (audit.torn-<UTC time>.duckdb, its .wal and its .repair.json) as evidence; eaxScada never deletes it.

The repair is refused, and nothing changed, when the trail is not a checkpoint cut short, is encrypted (“an encrypted audit trail is not repaired (set it aside)”), is held by another process or opens, or when the copy does not verify (for example “the repaired trail ends before its tip anchor”). The command says “audit-set-aside –repair refused, nothing changed: …” and “Without –repair the trail is set aside and a new one starts.”: set it aside as above.

Message What to do
“this edition has no audit trail (Starter, Pro and Enterprise)” The licence is Free (or not valid): there is no trail to set aside.
“eaxScada is running” (or the data lock is held) Stop the server first.
“the audit trail opens: there is nothing to set aside” The file is fine. Look for the cause in step 1: the folder, the disk, another process.
“the audit trail is held by another process (is eaxScada running?)” Stop that process. A held file is not damaged.
“the audit trail does not open with this encryption key: it is not set aside” The file may be fine and the key or the setting wrong. Check historian.tde_encryption and its key.
“signature: invalid username or password”, “… is not an administrator”, “the AI co-pilot account cannot sign” Use an administrator account and its own password.
“… does not exist: nothing to set aside” There is no audit.duckdb in the folder: check security.audit_data_dir.