Repository navigation
Doubled slash, a missing comma, and IoT-Agent readiness - #2
Merged
Merged
Conversation
Three unrelated defects that each stop a reader part-way.
1. A request is written as 'http://localhost:1026//ngsi-ld/v1/entities/' - a
doubled slash, from a URL variable that is not there. A strict broker
answers 400 rather than treating it as /ngsi-ld/v1/entities/.
2. A payload is missing a comma:
"unitCode": "CEL"
"observedAt": "2022-03-01T15:00:00.000Z"
so the whole entityOperations/update request is rejected as invalid JSON.
3. waitForIoTAgent loops while the HTTP code is 000, i.e. it stops waiting as
soon as the port answers ANYTHING - including the 503 the agent serves while
still initialising. link-devices then runs against an agent that is not
ready. IoT-Agent, IoT-Agent-JSON and Big-Data-Spark already wait on the
container health status; this brings it into line.
And link-devices itself POSTs several ~30 KB device batches with no retry,
under 'set -e'. The agent intermittently closes the connection without
replying (curl exit 52, 'empty reply from server'), most often on the batch
immediately after provision-devices - and one such reply then kills the
script silently, leaving the tutorial stopped at 'Link Devices to Animal
entities'. Verified intermittent: the identical payload against the same
agent gave exit=52 then exit=0 back to back. Added --retry to those two
calls.
jason-fox
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three unrelated defects, each of which stops a reader part-way.
1. A doubled slash
One request is written as
http://localhost:1026//ngsi-ld/v1/entities/, from a URL variable that isn't there. A strict broker answers400 Invalid URL Pathrather than silently treating it as/ngsi-ld/v1/entities/.2. A missing comma
The whole
entityOperations/update?options=replacerequest is rejected as invalid JSON.3. The tutorial cannot start: IoT-Agent readiness
waitForIoTAgentloops while the HTTP code is000, so it stops waiting as soon as the port answers anything — including the503the agent serves while still initialising.IoT-Agent,IoT-Agent-JSONandBig-Data-Sparkalready wait on the container health status; this brings it into line.And
link-devicesPOSTs several ~30 KB device batches with no retry, underset -e. The agent intermittently closes the connection without replying — curl exit 52, "empty reply from server" — most often on the batch immediately afterprovision-devices. One such reply then kills the script silently, leaving the tutorial stopped at⏳ Link Devices to Animal entitieswith no error shown.⭐ Verified intermittent rather than assumed: the identical payload against the same agent gave exit=52 then exit=0 back to back. A single device is accepted with
201throughout, and 31 KB is nowhere near the agent's 1 MBexpressLimit, so it isn't a size limit.--retry 10 --retry-all-errors --retry-delay 10on those two calls; tested end-to-end, after which the tutorial starts cleanly (servicesexits 0).Found while running all sixteen NGSI-LD tutorials against a different NGSI-LD broker — this was one of four that could never be started.