Troubleshooting
These are the problems people meet on a first run: a build that fails, a broker that won't start, and the first refusals. Each entry says what is wrong and links to the page that covers it in full.
Building
-
The compiler rejects a
-Zoption, or says it needs nightlyCargo isn't using the toolchain the repository names. Build inside the checkout, with the
cargothatrustupprovides, and runrustup toolchain installthere if the pinned nightly is missing. Acargofrom another package manager ignoresrust-toolchain.toml. -
The build fails in
aws-lc-sys, or asks for CMakeThe TLS library compiles native code. Install
cmakeand a C compiler, then build again.
Starting the broker
-
The broker stops right after it starts, with a database error
It couldn't connect within
database.acquire_timeout. Start the database first, and checkdatabase.connection. With Docker Compose,docker compose psshould showpostgresqlas healthy. -
The broker stops with
loading configuration failed:and namesconnectionNo configuration layer names the database. Set
database.connectionin the file, orANDROMEDA__DATABASE__CONNECTIONin the environment. It is the one setting without a default, so the broker can't start without it. -
The broker stops with
invalid configuration:A setting is out of range, or two settings contradict each other. The message names them.
andromeda configuration validatereports the same without starting anything, and Configuration lists every key. -
The broker stops because its port is taken
Another process listens on
1056or1086. Stop it, or move the broker with--portormanagement.port. -
The log shows
database_connection_capacity_exceededat warnThe broker's pools could hold more connections than PostgreSQL allows. The published PostgreSQL image allows 200, which fits the defaults, but a stock PostgreSQL allows 100. Raise
max_connectionson your server, or shrink the pools. That is harmless with a few tenants, and the Deployment planner sizes them for a real deployment. -
Every request to a tenant gets
500InternalError, and the log saystenant schema contract:The database server lacks something the schema needs, and the rest of the log line names it. It is usually a PostgreSQL, PostGIS or TimescaleDB older than the minimum, an extension the server doesn't ship, or a database encoding other than UTF-8. The published PostgreSQL image meets all of these. With a server of your own, PostgreSQL lists what the broker checks. A line about a schema version or a migrations digest means something else, which Upgrades covers.
Requests
-
The request has no
Content-Type, or one the operation doesn't take. Sendapplication/jsonorapplication/ld+json. -
An
application/jsonbody can't carry a@context, and anapplication/ld+jsonbody must carry one and can't also have a contextLinkheader. JSON-LD@contexthas the rules. -
400on a query that names nothingA query must narrow: a
type,attrs,q, a geoquery,idorlocal=true. A bareGET /ngsi-ld/v1/entitiesis refused. -
400on anidor a Relationship targetBoth must be URIs, such as
urn:ngsi-ld:Building:townhall. A bare name is refused. -
The broker couldn't fetch the
@contextthe request names. Check that its URL is reachable from the broker, or store it in the broker first, as the Quickstart does. -
404or405on a path or method you expectedIt may belong to an extension, and extensions are off by default. With one off, its paths answer
404and its methods405, as if the broker had never had them. Extensions lists them. -
The broker runs with
tenancy.mode = "disabled", so it refuses any request withNGSILD-Tenant. Leave the header out, or turn tenancy on. -
A connection pool is full, or the database can't be reached. The
detailsays which. Store outages covers every503. -
500InternalErrorafter a long waitThe request ran past
request_limits.timeout, 30 seconds by default. Ask for less in one request, or raise the timeout. -
The request body hadn't fully arrived when
request_limits.timeoutran out. Check that the client sends the whole body it announces inContent-Length. Over HTTP/1.1 the broker also closes the connection.
Notifications
-
Nothing arrives at the endpoint
Read the subscription back.
timesFailedandlastFailureshow whether the broker tried and failed. The endpoint must be reachable from where the broker runs, which isn't the same as your machine when the broker is in a container. Inside a container,localhostis the container itself, and the Quickstart shows how to reach your machine instead. The endpoint must also answer with a2xx, because the broker never follows a redirect. -
Nothing arrives, and the subscription shows no failures either
The write didn't raise one of its triggers. By default, a subscription hears about attributes being created or updated, not deleted, and a write that changes nothing notifies nobody. Subscriptions and notifications has the rules.