Operations
This page is for the engineer who installs the service and keeps it running. It names every property, every startup check and the answer to each failure. The service reads the schema of the Auto Configuration Server (ACS) and needs a grant for it.
Configuration reference
Core properties
Every property below has an environment variable of its own.
| Property | Default | Meaning |
|---|---|---|
|
60s |
How long the service waits for an acknowledgement before it republishes the command. See The acknowledgement timeout. |
|
30m |
After this delay a late acknowledgement no longer starts the run. The run fails with the reason |
|
15m |
One property with three uses. It bounds how long a run stays in the stopping state. It also defines the window after a stop: a measurement arriving later is parked as late. Every activate command carries the value to the ACS, so both sides hold in-flight results for the same window. A change reaches the next run only. Not the same property as the finish grace. See The two graces are two settings. |
|
20000 |
The device limit, per configuration and not per campaign. One configuration is one run with one device list, so a campaign of several may name more devices in total. |
|
10 |
How many configurations one campaign may carry. It bounds the save and not the ACS: each configuration becomes its own run, and the ACS serves them unchanged. The save resolves one fleet per configuration in one transaction, and an unbounded number of configurations would exhaust the service during that save. |
|
100 |
Rows the dispatcher claims per tick. |
|
10 |
Publication attempts before the outbox row is abandoned. An abandoned row also fails its run in the same transaction. |
|
dev |
The cluster name. |
|
empty |
A fallback member list, read only when the |
|
60000 |
The connection timeout of the client. |
|
true |
The startup check over the ACS schema. The local profile disables it. |
|
true |
Gates a feature, not a check. With the feature off, a configuration naming a saved condition is refused with an explanatory HTTP 400, and the other three device sources work. |
|
true |
The startup check over the two portal tables. It warns instead of failing. See The iotw grant check. |
|
true |
Gates the ClickHouse migration and its runner. |
|
10s |
How long a health answer is cached. It is also the interval of the scheduled probe, so the degraded state is bounded in staleness even with nobody polling. While ClickHouse is known to be down, that probe backs off to one attempt per minute. |
|
3 |
The timeout of the probe query. |
|
5m |
How often a healthy ClickHouse is asked whether migrations are pending. Much longer than the cache lifetime on purpose: the answer cannot change without a restart or a successful migration. Once something is pending, the check runs on every probe instead, so a fix is noticed within the cache lifetime. |
|
60s |
How often the runner retries the migration while the status is not healthy. The tick does nothing while it is. |
|
|
Where the migrations live. |
|
|
Never the default name. See The migration history table. |
|
10m |
Not an FCC property, and the one framework setting the report export cannot leave at its default. The export answers with a stream. That makes the request asynchronous, and the container aborts such a request after 30 seconds. The abort arrives after the status line, so the operator would get a truncated file with no error. See [export-truncated]. |
Scheduling and buffering
| Property | Default | Meaning |
|---|---|---|
|
5s |
How often the dispatcher claims and offers pending rows. |
|
30s |
How often the service re-checks sent rows without an acknowledgement, and on the same tick looks for stalled runs. |
|
100 |
The same environment variable as the flat property above. One knob, two binding paths. |
|
100 |
Rows per ClickHouse insert. |
|
5s |
The result buffer flushes at the batch size or at this interval, whichever comes first. |
|
10000 |
The bound of the in-memory result buffer. That is also the retry queue. An exhausted buffer turns the service degraded and parks the rows it cannot hold. |
|
1h |
The lifetime of one de-duplication entry. See De-duplication is one atomic call. |
Poller, watchdog and dead letter
| Property | Default | Meaning |
|---|---|---|
|
30s |
How often the scheduler ticks. One tick, two passes: due campaigns and due planned runs. They share a cadence, because both only answer is anything due, and a run picked up half a minute late is invisible next to a window of hours. |
|
100 |
Rows claimed per tick, per pass. It bounds the work of one tick and not the backlog. A full claim means the interval is too long for the installation, not that this value is too low. The service caps it at 1000 internally, because the claimed ids become an Oracle list. |
|
60s |
How often the watchdog ticks. Slower than the scheduler on purpose, because it closes work instead of starting it. |
|
100 |
Runs claimed per tick, per pass. The same cap applies. |
|
15m |
How long past the end of its window a running run may still report its own finish. A separate knob from the stop grace. See The two graces are two settings. |
|
500 |
Parked measurements read per resend call. It is both the default and the ceiling, because one call must not pull an unbounded backlog into the result buffer and trigger the overflow the dead letter absorbs. It is far above the insert batch on purpose: a dead letter is written after an outage, so the backlog is a burst of thousands. |
Device selection and uploads
| Property | Default | Meaning |
|---|---|---|
|
100 |
The page size of the device resolve endpoint when the caller names none. It sizes the grid the operator looks at, not the fleet. |
|
10MB |
The largest accepted |
|
10MB |
The largest whole request. One environment variable feeds both properties, so a change stays coherent. |
Two notes on the 10 MB limit:
-
A serial list never needs it. 20000 lines of 20 characters are about 400 KB.
-
A full campaign export is about 720 KB, so about fourteen of them fill the limit, and the service would refuse a document it produced itself. Split a large export into several imports. Raising the value would raise the denial-of-service ceiling of the upload endpoints by the same amount.
|
There is deliberately no maximum page size for the device resolve. The ceiling on a page is the device limit of a campaign. The wizard asks for the whole fleet in one call, because the save needs it. The device limit already bounds that read. A second limit could only be set too low. The operator would then find out when the campaign does not save. |
The three multipart answers
| Mistake | Answer | Note |
|---|---|---|
An upload above the limit |
413 with FT code 9413 |
The message names the configured maximum in bytes. |
No |
400 with FT code 9400 |
The message states that the |
A part with an unsupported content type |
415 with FT code 9415 |
Most often the optional JSON part sent without a content type of its own. That is the default of |
None of the three handlers is redundant. The service has a handler for every failure. Without the three handlers below, the general handler would answer first. Without the three handlers the catch-all would answer HTTP 500 with no hint of what the caller sent wrong.
The byte figure comes from the configuration and not from the exception. The failure itself carries no byte figure, so the message would read the upload exceeds the configured maximum of -1 bytes. The configured value is also the better number, because it is the one an operator can change.
|
A limit neither source knows is left out of the message instead of printed. A remedy without a number beats a remedy with a wrong one. Do not parse the byte figure out of the message. It is prose, it may be absent, and the machine-readable part of the answer is the FT code. |
The legacy import
None of these properties makes the import run. There is no poller and no schedule: the import starts from its own endpoint only.
| Property | Default | Meaning |
|---|---|---|
|
true |
Whether a start is allowed at all. A disabled import answers HTTP 400 on a start, and the status endpoint keeps answering. It hides nothing already in ClickHouse. |
|
10000 |
Rows per read, per insert and per cursor commit. The three bracket the same rows, because together they are the two-phase commit that makes a crash recoverable. A smaller value means more commits and a smaller range to re-check, at the cost of throughput. This is a default and not a ceiling: a start may raise or lower it for one run, bounded at 100000 because the batch is held in memory. |
|
empty |
The zone the legacy timestamps are read in. An empty value means the zone of the Java virtual machine (JVM), never UTC. Set it to the zone the ACS wrote them in whenever this service runs elsewhere. An unparseable value is HTTP 400 on a start and never a silent fallback. |
|
1h |
The grace after a day window closes before its measurements count as complete. It is not the whole lag: a pass reads up to one day plus this value before its own start. See Expect about 25 hours of lag. |
|
5m |
How long a running import may go without a heartbeat before another start may take its row over. This is the takeover window after a killed process. A live import heartbeats between batches and over the slow work that is not a batch, so it never approaches the limit. A lower value than one batch would let a second start claim a kind still being imported. |
The five pollers
| Poller | Every | What it claims and does |
|---|---|---|
The outbox dispatcher |
5s |
Pending outbox rows that are due. It offers each payload to the command queue and marks the row as sent only after a successful offer. |
The acknowledgement-timeout poller |
30s |
Sent rows without an acknowledgement, republished with the same key and number. On the same tick it fails dispatching runs older than the maximum delay, with a defensive stop. Planned runs are deliberately excluded. |
The scheduler, first pass |
30s |
Scheduled campaigns that are due. It starts the campaign through the ordinary path, with no user identity, so the audit row says the service did it. |
The scheduler, second pass |
30s |
Planned runs whose window has opened. It dispatches the daily run and re-takes the settings snapshot on the way out. That is what makes an edit apply from the next run. A refused row is closed in the same transaction instead of staying planned, or every later tick would claim it again. |
The watchdog, two passes |
60s |
Running runs past their window plus the finish grace, closed as finished. Stopping runs past the stop grace, closed as stopped. |
Four more scheduled methods claim no rows.
-
the result flush, every 5 seconds
-
the ClickHouse health probe, every 10 seconds
-
the metrics sampler, every 15 seconds
-
the ClickHouse migration retry, every 60 seconds, and a no-op while the store is healthy
Every poller claims its due rows and holds the claim and its writes in one transaction. See Scheduled work.
A failing tick is caught, counted and throttled. The first occurrence of a failure is logged in full, repetitions at debug level, and the failure is logged again after five minutes. A recovery resets the throttle, so the next outage is loud from its first tick. An unreachable database therefore produces about twelve log lines in an hour, not a hundred and twenty.
Nothing drains the dead letter table on a schedule. That is an operator action.
Hazelcast structures
| Structure | Kind | Role |
|---|---|---|
|
Queue, produced to |
The service offers commands here, and the ACS consumes them. |
|
Queue, consumed |
One dedicated thread. |
|
Queue, consumed |
One dedicated thread. The measurements. |
|
Queue, consumed |
One dedicated thread. One upsert batch per message, plus the drain recount. |
|
Queue, consumed |
One dedicated thread. The control channel. |
|
Map |
The de-duplication keys. Unlike the queues, this map is internal to this service and carries no prefix. |
|
The de-duplication map needs a maximum size with an eviction policy. Configure both in the Hazelcast cluster, next to the queue sizes. This service sets the lifetime of one entry and nothing else. A lifetime per entry bounds how long an entry lives. It does not bound how many entries a burst of results creates. |
Datasources
Four connection pools, each configured under its own prefix. Do not cross-wire the pool prefixes: a mismatch of exactly that kind is a live bug in a sibling service.
| Datasource | Access | Pool notes |
|---|---|---|
|
Read and write, primary |
A maximum of 20 connections by default, with 5 idle. |
|
Read-only |
Read-only in the pool configuration and in code. A maximum of 10 connections by default. |
|
Read and write, lazy |
The pool is created even with ClickHouse down. The idle minimum is 0 on purpose, so an outage-tolerant pool does not hammer an unreachable server. |
|
Read-only, lazy |
Two tables of the portal schema. A small pool, 4 connections by default, because it is consulted only when a configuration names a saved condition. Lazy all the way through, and there is deliberately no transaction manager for it. |
An Oracle URL on any pool gets the session time zone set to UTC automatically. On Oracle the portal pool also gets its current schema set. The two portal tables belong to their own user there, and no query names the schema.
Profile groups
| Group | Composition |
|---|---|
|
The common profile and the MySQL profile: the MySQL dialect and URLs for both schemas. |
|
The common profile and the Oracle profile. Both schemas live in the same Oracle service under different users. |
|
The common profile, MySQL and a local profile. It also disables the ACS schema check, points the Hazelcast client at the local host and raises the log level. |
Health
The actuator exposes three endpoints: health, info and the metrics. The status order and the HTTP mapping are stated explicitly in the configuration and replace the framework defaults.
| Status | HTTP |
|---|---|
|
503 |
|
200 |
|
200 |
|
The degraded status maps to HTTP 200 on purpose. Left unmapped it would fall back beside the down status and answer 503. The service would then report a failure for a condition it is designed to survive, and the orchestration would restart a useful instance. |
The aggregate endpoint also carries the two probe states, and it can answer 503 during a graceful shutdown. That is a different status and it is deliberate. See Two traps on the health endpoint.
The three ClickHouse states
The degraded status means the ClickHouse state is not healthy. That state has three values, because the result store cannot be used has two causes with two different remedies.
| State | Meaning | Your next action |
|---|---|---|
|
Reachable, and every migration of this build is applied. |
None. |
|
Reachable, and migrations are pending. The connecting user may lack the rights on the shared database, or a startup migration failed and its retry has not succeeded. |
Grant the missing right, or investigate the failing retry. A restart alone does not help, because the migration is retried on a timer anyway. |
|
Not reachable at all. The probe or an insert failed. |
Check that ClickHouse is up and reachable from the network of this service. |
Both unhealthy states report the same aggregate status and close the same gate. Only the reason tells them apart, so read the reason first. A restart does nothing for a pending migration. A grant cannot be applied to a server nobody can reach.
|
The reason never contains the state names. The reason is built from what the migration tool reports pending, for example The two fixed sentences about the result store belong to the refusal body of an activation or a report, not to the health answer. Grepping the health output for a state name finds nothing. |
{"status": "DEGRADED",
"components": {"clickhouse": {"status": "DEGRADED",
"details": {"reason": "1 clickhouse migration(s) pending: 3"}}}}
Three places write the state: the health probe, the migration runner, and the ingest path after a failed insert or a full buffer. The ingest path and the runner only ever report an unreachable store, because neither knows why a write failed. A guess from driver wording would be wrong the first time the wording changes. Only the probe can ask the migration tool, so only the probe reports a pending schema. Its next run corrects an earlier unreachable reading.
Campaign management keeps working, because it touches one schema only. Every operation that depends on the result store is refused with HTTP 503 and FT code 9503. Those are the activation, the four report endpoints, the dead letter resend and the legacy import start.
The generic database contributor probes the two relational schemas only. ClickHouse is deliberately outside it and is reported through its own indicator, so an outage there does not drag the aggregate status down. The Hazelcast indicator is disabled, because the client starts asynchronously and not connected yet is an expected state during startup.
Startup checks
The ftacs schema check
One runner checks the ACS schema at startup. It detects the vendor and asks the catalog for every column this service reads. A missing table or column fails the startup, and the message lists every missing entry. The alternative is a broken query in the middle of a campaign.
The check lists only columns a statement names. That is a rule: the check aborts the startup, so every entry is a reason the service refuses to come up. A column no query reads would turn a harmless schema difference into an outage.
| Table | Read by | Columns |
|---|---|---|
|
Device selection, legacy fleet snapshot |
|
|
Device selection, catalog |
|
|
Device selection, catalog |
|
|
Catalog, device grid |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
Legacy import |
|
|
The read-only account needs That table is not in the grant list of the shared contract. The catalog and the device grid both read a manufacturer name from it. An account provisioned for an earlier release does not have it, because nothing read it before. The service fails at startup with this message:
The runner cannot tell a missing grant from a missing table. Both are absent from the catalog for that account. Check the grant before you conclude the table is absent. Extend the grant first, then deploy. A deployment first produces an instance that will not start. |
The check is skipped in the local profile and can be switched off. Use that switch for an emergency rollout, and never for a permanent installation. It converts a startup failure into a broken query in the middle of a campaign.
|
The service requires ACS 6.4.12 or later. Know this before you install, not from a failed startup. The check requires the two measurement instants on the legacy speed table, and an ACS changelog of that version introduced them. An older ACS does not have them, and the service does not start:
The requirement is real. Those two columns are the only genuine device-side timestamps an imported row has. Without them an imported measurement has no device timing at all. Here the cause is almost always a missing column and not a missing grant, because that table is in the grant list already. Check the ACS version first. The last option is to switch the check off. The legacy import then fails on the first batch instead of at startup, and that is a worse failure. |
The iotw grant check
The second runner checks the two portal tables. It differs from the first runner in one point: it does not stop the startup.
The ACS schema holds every device and every result, so a service that cannot read it can do nothing. The portal schema is borrowed for one of four device sources. An installation that never uses saved conditions works without the grant, and a startup failure would turn an unused feature into an outage.
The check exists because the pool is lazy and the alternative is silence. Without it the first person to learn about a missing grant is an operator in the middle of the wizard. The warning is in the startup output an installer already reads. It names every missing column at once. It also tells a missing grant from a wrong schema and from an unreachable server.
WARN c.f.fcc.startup.IotwSchemaCheckRunner : iotw schema check FAILED: missing columns
[iotw_view_column_condition.logic]. Campaign configurations that name a conditionId
(configs[].sourceType=Condition) will be refused with a 400; every other device source
type is unaffected. Grant this service SELECT on the two iotw tables, or set
ft.fcc.iotw.enabled=false to refuse the source type by configuration and silence this check.
| Situation | What the runner does |
|---|---|
The grant is complete |
One info line. |
A column or a table is missing |
The warning above, with the full list. The service starts, and the saved condition source is refused with an explanatory HTTP 400. |
The schema is unreachable |
The same warning with the connection failure in it. This is the one place that opens the lazy pool at startup, so an unreachable portal database is noticed early. |
The feature is disabled |
One info line, and the pool is not touched at all. The source is refused by configuration. |
The check is disabled |
The runner is not registered. The feature still works, for an installation that wants the pool closed until the first read. |
The required set is the two tables of the grant and nothing more. The same rule applies as for the ACS check, for a different reason. A grant narrowed to exactly what this service needs must pass without a warning.
The ClickHouse migration
The service migrates ClickHouse while it starts. A failed migration marks the store unavailable and the service starts degraded. The service does not refuse to start.
Four migrations ship today: two create the result tables, and two add columns. All of them are recorded in the own history table.
|
The shared database is never empty, because QoE monitoring already owns two tables there. An earlier build found that schema with no history table. It took version 1 as the baseline and then counted the first migration as applied. The speed result table was never created, nothing said so, and every insert failed from the first campaign. The configuration now baselines at version 0, below every migration this service owns. Read the history table to confirm that an installation has the fix.
A healthy node shows a baseline row at version 0 and then every migration in order. A node with the old defect shows a baseline at version 1 with no first migration under it. |
The migration is also retried on a timer while the status is not healthy. Without the retry, an instance that started during an outage stayed without a schema for the life of the process. The tick does nothing once the status is healthy.
Two instances retrying at the same moment is safe and deliberately unguarded. ClickHouse has no lock table, so the safety comes from the migrations themselves, and all of them are idempotent. The worst outcome of a race is a duplicated history row and a second run of statements that change nothing.
A failed attempt reports an unreachable store without inspecting the exception, and the probe refines that reading later.
A node that missed a migration runs its campaigns perfectly well and fails only on the insert. That surfaces as a failure counter and as parked rows in the dead letter table. The failure self-heals once its cause is fixed, usually a missing grant, and needs no restart.
The legacy import runbook
What the import does is in Legacy FCC import. Its endpoints are in The legacy import endpoints, and its properties are above. This section is your sequence.
Before the first start
| Check | Why |
|---|---|
ACS 6.4.12 or later |
The startup check requires two columns of that version. An older ACS means the service does not start at all, so this is a check before an installation and not before an import. See [acs-minimum-version]. |
|
|
The ClickHouse indicator reports a healthy store |
A start runs through the same gate as an activation and answers HTTP 503 while the store is unhealthy. See What a 9503 means. |
The zone property matches the zone the ACS wrote its timestamps in |
An empty default is correct only when this service runs in that zone. A wrong zone displaces every imported measurement by a fixed offset, in silence. A change afterwards moves no imported row, and a resumed pass keeps its own zone. This is the one property to get right first. |
Expect about 25 hours of lag
A pass does not read up to the present, and a cut-over plan has to know by how much it falls short.
One pass covers one interval of the start date.
cutoff = the start instant of the pass - ft.fcc.legacy-import.window-settle - 24h
With the default settle time, a measurement taken now is first eligible for a pass started about 25 hours from now. A higher settle time raises the lag by the same amount.
The extra day is not padding. A day window is at most 24 hours long, and its start hour differs from campaign to campaign. A full day of margin makes the cutoff correct for every start hour. One cutoff per pass therefore serves every campaign.
The trade is a day of lag for a watermark that cannot skip a row. On a store without a delete and without a back-fill, a skipped row is skipped permanently.
Two consequences follow:
-
The import completed and yesterday is missing is normal. A later pass picks those measurements up, and completed never meant caught up to now.
-
The final catch-up pass of a migration must run at least 25 hours after the old feature is switched off, or it will not cover the last day.
Start the import
Measure first. A dry run claims nothing and writes nothing. It is safe at any time, and also during an import.
POST /FCC/admin/legacy-import/start
X-FT-Domain-Scope: ALL
{"kinds": ["SPEED"], "dryRun": true}
The answer is the ordinary status body with the row estimate filled in. Then start for real:
POST /FCC/admin/legacy-import/start
X-FT-Domain-Scope: ALL
{"kinds": ["SPEED", "LATENCY"]}
An omitted list of kinds means both. One worker imports them one after the other, and each kind carries its own cursor. Starting one kind alone is therefore a legitimate way to retry a failed kind without disturbing the other.
A batch size in the request overrides the property for this run only. Lower it on a slow ClickHouse.
The call returns as soon as the kinds are claimed. The import runs on its own worker thread, and you watch it through the status endpoint.
Watch the progress
The status endpoint returns one entry per kind.
| Field | How to read it |
|---|---|
|
|
|
The progress fraction, and only that. The denominator was taken at the start and the source keeps growing, so it is stale by design. |
|
Refreshed between batches and over the slow work that is not a batch. A running row with a frozen heartbeat is a dead run. See Restart after an interruption. |
The six cursor fields |
One position, read together. The cursor id alone says nothing, because the traversal order is not the id order. The campaign id is the useful one for which campaign is it on. The direction field is the raw legacy number as text. |
|
What is complete. Every measurement with an earlier start date is imported. It moves only when a pass completes. |
|
The highest legacy id a completed pass covered. A diagnostic mark that bounds no read. |
The three pending fields |
A value means a batch is with ClickHouse right now, or a previous run died inside one. Both are normal, and the next start re-checks exactly that range. |
|
Measurements that arrived after their window was imported. The import deliberately does not add them later. A non-zero value is a known limitation made visible, and another pass produces the same number. |
|
Source rows that cannot become a cursor position. One of them halts the pass, and the error field names the campaign and the row. This one needs action: fix the source row and start again. |
The five data-quality counters |
None of them is an error to act on during the run, because every one of those rows was imported. A large unresolved-device count predicts thin model-filtered reports, and a large tier-failure count means many rows carry a tier of 0. |
|
The zone this run uses. For a resumed pass it may differ from the configured one. The top-level field of the answer is what a new pass would use. |
|
Why the run stopped, when nobody asked it to. |
The counters describe the current or the last run. A fresh pass zeroes them, and a resumed one continues them. The metrics carry the same figures across restarts of a pass.
Log lines worth a search: fcc legacy import pass started, pass completed, pass halted, pass failed, pass evicted, fcc legacy import group done, fcc legacy anchor created, fcc legacy fleet snapshot, fcc legacy import late arrivals skipped and fcc legacy import row cannot be a cursor position.
Two numbers have no metric: the late arrivals and the invalid rows. You see them on the status endpoint and in the log.
Stop the import
POST /FCC/admin/legacy-import/stop
X-FT-Domain-Scope: ALL
{"kinds": ["SPEED"]}
The stop is cooperative and returns at once. The service records the flag, the worker notices it between two batches, and the row ends idle on a committed cursor. Expect the stopping state in between: it exists so you can see the request was recorded instead of pressing stop again.
There is deliberately no forced variant. A kill inside a batch is what the pending range survives, and not something to offer a button for.
A stop of an import that is not running is not an error. The next start clears the flag.
A shutdown of the service does the same by itself. It requests a stop on every claimed kind and waits up to 10 seconds.
Restart after an interruption
Call the start endpoint again with the same kinds. That is the whole procedure, and nothing has to be reset or reconciled by hand.
Four things happen under it:
-
The kind resumes instead of starting again. That happens when its cursor is intact, or when a pending range is open. The counters continue, the start instant is kept, and the traversal picks up after the committed position.
-
With a pending range, the run first re-reads exactly that id range from ClickHouse and skips whatever is already there. This read happens at most once per resumed run.
-
A kind with a running state and a stale heartbeat is taken over, because that is what a killed process leaves. One with a fresh heartbeat is refused. See What a 409 means.
-
The takeover is safe even when the old worker is still alive. Every statement of a run carries its run id, so the evicted run stops without touching the row again. The service does not mark it as failed, because the row belongs to the new worker.
|
Never edit the import row by hand to restart a stuck import. Nothing can be deleted from the result store. The cursor, the watermark and the pending range are the only record of what is already written there. Clearing the watermark re-imports every measurement below it, and every duplicate is permanent. |
What a 409 means
FT code 9409. A run with a fresh heartbeat already holds the kind. That run may be on another service instance, because the claim is a database statement.
It is a 409 and not a lock status, because the request is valid and will succeed as soon as the other run ends. The message names the holding run and its last heartbeat.
Two remedies, in order: stop the other run and retry, or wait out the staleness limit when the holder is genuinely dead.
A start that names two kinds and can claim only one answers 409 and releases the one it took. A refused start must not leave half an import running.
What a 9503 means
The same gate every activation and every report goes through: the result store is not healthy. Read the reason in the health answer to tell the two causes apart. See The three ClickHouse states.
It appears in two places, and they are different events:
-
On a start, refusing to begin. A start would read millions of rows, fail every insert, and leave a cursor past rows nothing wrote.
-
During a run, where an outage ends the pass cleanly on its last committed cursor. Nothing is lost and nothing is duplicated.
Neither case needs a restart of the service. A dry run is not gated and keeps working during an outage, because it writes nothing.
Deployment
Installing the service with Docker Compose is on its own page: Installation & Deployment.
|
Never publish container port 8080 outside the cluster network. The service has no authentication of its own, and its only access control is that nothing outside the network can reach it. An exposed port gives anyone full control over the campaigns of every domain. |
Troubleshooting
| Symptom | Cause and action |
|---|---|
A run is stuck in the dispatching state |
The outbox row was sent and no acknowledgement arrived, or one arrived and did not match. Check the state, the attempts and the next attempt instant of the row. Check whether the command consumer of the ACS is switched on, because with it off no acknowledgement of any kind arrives. |
Outbox rows stay pending |
Hazelcast is unreachable, or the offer times out because the queue is full. Check the connection state of the client and the member list. |
Outbox rows reach the abandoned state |
Every publication attempt failed. The same transaction fails the run, moves the campaign to the error state and writes a fresh stop. The age-based check normally fires first with the shipped defaults. An abandoned row therefore means the ACS or Hazelcast has been unreachable for a long time. Check the ACS and whether the acknowledgement queue is consumed at all. |
An activation is refused with HTTP 503 |
The gate saw an unhealthy result store for the whole request, so nothing was processed. Check the reason in the health answer, and the counters for parked, lost and failed results. The ingest path can report an unreachable store on its own after a failed insert, even while the probe still succeeds. |
The same gate. Read the reason in the health answer: a migration count means a pending schema, so grant the missing rights or investigate the failing retry. A driver error means ClickHouse is down, so check connectivity. Neither case needs a restart, because both resume once the cause clears. |
|
Almost always the asynchronous request timeout, or a client timeout below five minutes. After the status line a failure cannot become an HTTP error any more, so a timeout, a dropped connection and a hiccup in the store all look the same. Search the log for |
|
An exported spreadsheet does not open |
Confirm first that the download is complete, because a truncated archive is the most common cause. For a complete file, compare the row count with the measurement list for the same filter, and check the description values of the offending rows for control characters from the device. The writer drops the characters the format forbids and keeps everything else. |
Results arrive and no rows appear in the speed table |
Three normal causes. The rows may still be buffered, for up to the flush interval. The natural key may still be marked in the de-duplication map from an earlier delivery, so check the skip counter. The row may be parked or excluded, so check the parked, late and failed counters. For a latency campaign, confirm you are looking at the latency table. |
The health answer reports a degraded status |
ClickHouse is unreachable, its migration failed, or the ingest path could not write a batch. Campaign CRUD keeps working, and activations are refused until the store recovers. |
The migration that adds the time-based columns is purely additive and idempotent, and it applies cleanly to an installation at an older version. Confirm it in the history table. A run with a speed and no breakdown is not a fault: the device reported the full-loading figures and no interval table, either because the interval was never set or because its model has no such table. The intervals are index-aligned arrays in the same row and not extra rows, so a breakdown is an array expansion. An empty array means the device returned no table. A run with no full-loading block at all reports other with no speed, by design. |
|
The configurations migration moves every row that describes what is measured from the campaign down to the configuration. It is the one changelog in this schema that is not purely additive. The settings tables and the fleet table gain a configuration column, back-filled from the configuration table. The settings tables then drop the campaign column, and the campaign table drops its type column. Orphan rows are deleted, not carried: a row whose owner is gone describes nothing, no endpoint can reach it, and the mandatory constraints cannot be asserted while it exists. A campaign that comes back without its settings was therefore already orphaned, and the upgrade made that visible. A fresh database is not affected, and every changeset is a no-op on a re-run. |
|
A save or the import fails with a cannot be null error on the recurrence period |
A development database ran an early version of that changeset. It created the column as mandatory with a default. A default does not apply to an explicit empty value, and the framework puts every mapped column into the insert. The changeset now creates the column nullable, and its precondition leaves an existing column exactly as it was. Fix such a database by hand, once: [source,sql] ---- — MySQL ALTER TABLE fcc_test MODIFY reactivation_repeat_every INT NULL; — Oracle ALTER TABLE fcc_test MODIFY (reactivation_repeat_every NUMBER NULL); ---- A fresh database needs nothing, because it creates the column nullable from the start. |
The service will not start, with missing manufacturer columns |
The read-only account lacks the |
Every request answers HTTP 403 |
The scope header is missing or has an unknown value, almost always a proxy misconfiguration, because this service trusts the header and never falls back to a default. Also check a list scope with an empty domain list. That is refused the same way. Both answer FT code 9401. A 403 with FT code 9403 is an ordinary authorization refusal and means the headers were fine. |
The device count of the wizard is lower than expected, with no error |
Work through the three silent narrowings in order. First the domain scope: a caller who named domains outside their visible set gets an empty result by design. Second the protocol filter: without TR-069 in the list, every legacy device is correctly excluded, because it carries an empty protocol column. Third a model condition and a device without a product class: such a device is found by id or serial and excluded by every model condition. It appears in the per-model counts under the empty key. That is the quickest way to count them. The flag for unsupported protocols is not a narrowing: those devices are included and only marked. |
A campaign refuses to save over a connection ceiling |
Not a bug and not clampable. The capability table records a lower ceiling for at least one model of the fleet, and the message names those models. Lower the value or split the fleet. An administrator may correct or remove the capability row. It needs the scope |
A log line reports a raced administration upsert |
Benign, and it means the retry did its job. Two writers saved the same row at the same moment, both found none, both inserted, and the unique index refused the loser. The service calls the handler again, where the row now exists. The caller saw a normal answer. The first attempt rolled back, so it left no audit row: one accepted write is one audit entry. What is not benign is an integrity failure reaching the error handler on these endpoints, because that is a constraint nobody expected rather than contention. |
The resolved device count no longer appears in the log at info level |
Deliberate, and do not raise it back. That line comes from the shared resolve path, and the wizard re-issues the count while the operator is still typing. At info level one operator writes a line per keystroke. Raise the level for that one class when you need it. The line for a saved fleet stayed at info level, one per campaign, and it carries the duplicate figure recorded nowhere else. Refusals are unaffected and are always logged with their message and code. |
A per-domain default changed and existing campaigns still use the old one |
Working as designed. The chain is walked once, when a campaign is saved. A campaign with a recurrence keeps the values it froze. The audit row for the domain setting is the record of the change, and the campaign settings rows hold what each campaign froze. To apply a new default, export the campaign, delete the element whose default you want to inherit, and import the file back. |
A campaign is stuck in the stopping state |
The in-flight count has not reached zero and the stop grace has not elapsed. This is the normal state for up to that grace. The figure is recounted from the device states, so group those by state: devices still in the sent state are the ones being waited for. With a count that does not fall, suspect the device state consumer and check its three counters. Past the grace the watchdog closes the run regardless, and if it has not, the watchdog tick itself is failing. Note that its message is throttled, so an absence of repeats does not mean recovery. |
Measurements land in the dead letter table |
Read the reason first, because the two are different incidents. An unavailable store means the store was unreachable or the buffer overflowed, so correlate with the parked and failed counters and the health answer. Drain the backlog with the resend endpoint once ClickHouse is back, because nothing drains it on a schedule. A late reason means the measurement arrived after the stop grace and was excluded on purpose. Those are never resent. A steady stream of them means a stop grace too short for the diagnostic duration of the fleet, or an ACS that keeps measuring long after a stop. A lost counter above zero is the genuinely bad signal, because such a row could not even be parked. |
A reactivation did not fire |
Work from the campaign outward. Does the campaign still owe a run? Is it in the reactivation state with a planned row? If the previous run never finished, nothing planned one, so check whether it is still running or already closed. Is the window of the planned row in the future? Missed slots are skipped and not fired, so a campaign down for two days resumes tomorrow. With a due planned row still present, the scheduler tick is failing or the dispatch is skipping it, and the skip line names the reason. |
A latency campaign runs and the latency table is empty |
Most likely the migration that creates it never ran on this node. A failed migration degrades the startup instead of killing it, so the failure is a log line and not a crash. Verify against the own history table, never the default one. A missing row means the migration never ran, and an unsuccessful row means it ran and failed. The insert failure surfaces on the result path, so check the dead letter table too. Also confirm the campaign is a latency one and its results carry the ping direction, because an empty direction is routed to the speed table on purpose. |
Latency results stop and speed results keep landing, with an unknown-column error |
The migration that adds the two ping columns has not been applied on this node, while the service writes the full column list. This state is self-healing and visible: the runner retries on a timer, and the probe reports a pending schema instead of a healthy store. What is left for you is the cause, because a retry cannot grant itself a right. Plausible triggers: ClickHouse unreachable at startup, a missing right on the shared database, or a failed history row. ClickHouse cannot roll back a schema change. A failure partway through a file leaves a failed row. Every later migration then fails until somebody repairs that row. Confirm the applied version in the history table. Check the startup log for a migration failure. Verify the right, repair a failed row and restart the instance. The two statements are idempotent and metadata-only, so a re-run is safe. This failure is asymmetric, and that is why it matters more than a plain missing migration: the speed insert succeeds while the latency insert throws. The two halves now sit in separate attempts, so the speed rows commit and only the latency half is returned. Both halves still share one retry delay. The healthy speed rows therefore arrive on that delay and not at once. That is a delay and not a loss. |
The import says it is running and nothing moves |
The worker is gone: the process was killed, or the pass threw somewhere unexpected. Do not edit the import row. Wait out the staleness limit and call the start endpoint again with the same kinds. The claim takes the row over and the run resumes from its committed cursor. An earlier start is a 409 naming the stale run. |
A start of the import answers HTTP 409 |
The kind is held by a run with a fresh heartbeat, possibly on another instance. Stop that run or wait out the staleness limit. |
An import endpoint answers HTTP 403 |
All three endpoints require the scope |
A report filtered by model returns nothing for an imported campaign |
Two causes, in this order. There may be no fleet snapshot or a thin one, so check the snapshotted and unresolved device counts: a serial without a live device row is not snapshotted, and its measurements are reachable only by an unfiltered report. The model is also the model at import time, so a device re-provisioned since the run answers to its current model. Neither is fixable by another pass. |
An imported campaign is invisible to an operator and visible with the scope |
Working as designed. Its anchor carries the domain 0. That is the super domain, and a 0 is in nobody list of visible domains. Changing the domain of the anchor is an operator decision about a campaign this service did not author. |
The import reports many tier failures or byte overflows |
Neither drops a measurement and neither needs action during the run. A tier failure means the tier could not be reconstructed and the row carries a tier of 0. A byte overflow means the legacy counter had wrapped and the row stores an empty value instead of a number four gigabytes wrong. Both are properties of the source data, so another pass produces the same tallies. The lossless tier string is still in the legacy table, and the import never touches it. |
The import stopped idle and the error names a campaign and a row |
A source row with an empty key column, counted as invalid. Such a row cannot become a cursor position, and a cursor with an empty component matches nothing. The pass therefore halts with its cursor unmoved and its watermark unadvanced, so nothing was declared imported that was not. Fix the named row and start again. |
A pass completed and the late counter is above zero |
Measurements reached the ACS schema after their window was imported and ranked. The import deliberately does not add them later, because an insert into a closed window would duplicate a position in a store nothing can delete from. The warning line names the campaign. There is no remedy and no pass that changes it. Running the import before the old feature finished writing a day is what produces it. |
The import completed and the last day or two is missing from a report |
Expected. A pass reads only up to about 25 hours before its own start, so the newest measurements are picked up by a later pass. Completed does not mean caught up to now. |
A dashboard shows an empty value on a queue or outbox series |
Read Where NaN appears before you assume a bug. Several of these are structural rather than a scrape problem. A missing series, as opposed to a present one without a value, usually means the sample tick has not run yet or the Hazelcast connection flag is 0. |
An import of a configuration document is refused and the operator asks what was created |
Nothing. That endpoint creates nothing: it parses the document and answers the campaign form. The operator then saves that form. A document with more than one campaign is refused outright, and every other refusal is a plain HTTP 400. |
An import of a configuration document answers HTTP 500 |
A defect to report, not a document to fix. An internal failure means a programming error and not a mistake of the caller. Everything about the document itself answers HTTP 400, at whatever point in the parse the service notices it. |
The two graces are two settings
| Setting | Bounds | It is a property of |
|---|---|---|
|
A stopping run draining its devices |
How fast the ACS reacts to a command |
|
A running run overrunning its window |
How long a single diagnostic takes |
The finish grace exists because the end of the window and the end of the last iteration are different instants. The ACS finishes the diagnostic it started and then reports. A close on the window boundary alone would relabel a normal completion as a watchdog kill.
One setting for both would mean that a longer stop also delays every watchdog close. Both default to 15 minutes, and that is a coincidence of the defaults.
There is no scheduler thread pool
A property for a scheduler pool size does not exist in this service, and the chart refuses FCC_SCHEDULING_POOL_SIZE.
Every scheduled tick gets a thread of its own instead of a slot in a fixed pool.
A tick stuck in a connection timeout therefore delays no other tick.
|
Do not configure a concurrency limit for the scheduled work. An incident response that reaches for raise the scheduling pool changes nothing here. A limit puts every later tick in a queue behind a slow one. That is the starvation a pool size is meant to prevent. |
Eight ticks run in this service. Those are the outbox dispatcher, the result flush, the health probe and the metrics sampler. The other four are the acknowledgement poller, the scheduler, the watchdog and the migration retry. The three campaign ticks are not short. Each one claims up to a hundred rows, then applies transitions, plans runs and writes commands in one transaction.
What the schema check requires
The startup check over the ftacs schema requires the exact column pairs the service selects, joins or filters on.
It does not require every column of a table it reads.
A surplus entry would refuse startup on an installation with everything this service needs.
The two legacy measurement instants are in the set. The service reads them, so they make the minimum ACS version a hard prerequisite. See [acs-minimum-version].
|
The check has one surplus entry.
It also requires one column of the product class group table, and no statement of this service reads that column.
An installation whose grant misses only that one column fails startup over a column the service does not need.
Grant |
How the Hazelcast members are resolved
The environment variable HZ_MEMBERS wins over the property ft.fcc.hazelcast.members.
That is the Compose convention shared with the ACS and the UI Backend.
A bare host without a port gets the default port appended. With neither source set, the client falls back to the local host.