-
Notifications
You must be signed in to change notification settings - Fork 258
Module deployment issue - The JSON document is invalid. #613
Comments
Hello @StephanBis This looks like it's a duplicate of #611, which was a Azure Portal issue. The deployment schema was changed at the portal, but not on the Edge deployment, which meant we failed to parse the new deployment. Please update your deployment on the Azure Portal, this should regenerate the Edge deployment and the Edge runtime will restart. I'm closing this issue, but if you continue to have trouble, please reopen or open an new issue. |
Thank you for your answer @darobs . I created a new Edge deployment and let it deploy to the Edge, however the same exception gets thrown. I also made sure that the custom modules were removed before I created the new deployment, just to be sure. |
@darobs friendly bump. |
When you get to the final deployment description in the deployment wizard, do you see each module has a description with each of these fields? "modules": {
"<module name>": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "<Image>",
"createOptions": "{}"
} Specifically, the portal issue was the missing "version" field. |
Yes, both my modules have the "version" field.
EDIT: I've completely reinstalled IoT Edge on the VM and created a new IoT Edge device in the Azure Portal. Also created a new Docker image of the "filterModule" and pushed it as 0.0.2 to the container registry. Created a new deployment and let it deploy. Outcome: same exception occuring with the "filterModule" and now $edgeHub keeps hanging on the "Pending Modification" deployment status. |
Another update: used Visual Studio Code to generate a new sample module and deployed that as a completely new module. And again we get the same exception when it tries to deploy..! I don't see any new comments on #611, is the problem completely solved now? |
@darobs I'm still experiencing this issue.. could you please re-open this issue and investigate with me? |
Thank you for your patience, @StephanBis. OK, this filter module is coming from this example? In the C Sharp code, the most likely place you'd run into an uncaught exception in the example code is the call to The other places in that code that might fail a JSON parse are less likely (since the exceptions are caught)
If you drop the filterModule from the deployment and set the routes back to one rule, "FROM /* INTO $upstream", do you see well formatted messages like this? {
"machine" : {
"temperature" : 0.0,
"pressure" : 0.0
},
"ambient" : {
"temperature" : 0.0,
"humidity" : 0.0
},
"timeCreated" : "<UTC datetime>"
} |
Thank you for your reply @darobs! The twin contains valid JSON and messages sent from the TempSensor module are also OK. |
According to this: Azure/iot-edge-v1#613 (comment)
OS version:
Windows 10 Pro x64 (1709) - Running in Azure
Docker version:
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:21:42 2018
OS/Arch: windows/amd64
Experimental: false
IoT Edge version:
1.0-preview
Issue description:
I'm following the quickstart guide for setting up an IoT Edge and how to deploy a custom C# module. The EdgeAgent, EdgeHub and TempSensor are running as they should. But when I deploy the custom module named "filterModule", I get the exception:
"Docker.DotNet.DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"container a9626f22c450983c8ff99d8a4dcf2f2db1e7aab43499935f89b321687ee560e4 encountered an error during Start: failure in a Windows system call: The JSON document is invalid. (0xc037010d"
In the IoT Edge device manager in Azure I get the following runtime status and exit code for the "filterModule": Backoff - Exit code: 128.
Full stack trace:
Things I've already tried:
Can anyone point me in the right direction? Or is this a bug in the agent itself? Thank you.
The text was updated successfully, but these errors were encountered: