Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create entities or devices for IoT-Agent JSON v1.19.0 with FiLiP v0.2.5 #206

Closed
msc-d1s7fa1eza opened this issue Oct 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@msc-d1s7fa1eza
Copy link
Collaborator

msc-d1s7fa1eza commented Oct 20, 2023

Describe the bug
In our current cluster setup, which is running the following versions

  • iotagent-json:1.19.0
  • mongodb:6.0.9-debian-11-r5
  • orion:3.7.0

we are able to create service group, entities and devices using API requests via Postman, however, we are unable to create any of these using the FiLiP library. The only thing possible is reading the version.

Going through the logs, we identified the following two errors in this process:
time=2023-10-19T14:51:04.356Z | lvl=DEBUG | corr=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | trans=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | op=IoTAgentNGSI.RestUtils | srv=PerformanceTestsDebuggingTest | subsrv=/PerformanceTestsDebuggingTest | msg=Errors found validating request: {"valid":false,"errors":[{"attribute":"additionalProperties","property":"devices.0.attributes.1.metadata","actual":{},"message":"must not exist"},{"attribute":"additionalProperties","property":"devices.0.attributes.0.metadata","actual":{},"message":"must not exist"}]} | comp=IoTAgent
time=2023-10-19T14:51:04.356Z | lvl=DEBUG | corr=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | trans=9b6f9b8d-a609-4253-bc0d-6cf208c887fc | op=IoTAgentNGSI.GenericMiddlewares | srv=PerformanceTestsDebuggingTest | subsrv=/PerformanceTestsDebuggingTest | msg=Error [WRONG_SYNTAX] handling request: Wrong syntax in request: Errors found validating request. | comp=IoTAgent

To Reproduce
You can find a script for the device creation including the current configuration for our cluster in our internal git repository https://git-ce.rwth-aachen.de/ebc/projects/EBC0391_BMWi_PL-Reg_GES/communication/datamodelsforsemanticnetworking/-/tree/BoosterDatamodelsStresstests/datamodels/BES?ref_type=heads. The main.py will try to create service group, entities, devices, subscriptions and grafana dashboards to cover a full check of the FIWARE setup. For checking if the process was successful, you can either request the created objects or check within the cluster components directly. However, for the latter, you will require the credentials.

Expected behavior
We expect the entity and device creation etc. via FiLiP to behave the same as via API request from Postman. So, after the creation, they should appear as stored objects in the mongodb.

Environment (please complete the following information):

  • OS [Windows 10 Education]
  • pydantic: [1.8.2]
  • filip [0.2.5]
@msc-d1s7fa1eza msc-d1s7fa1eza added the bug Something isn't working label Oct 20, 2023
@msc-d1s7fa1eza msc-d1s7fa1eza changed the title Cannot create devices for IoT-Agent JSON v1.19.0 with FiLiP v Cannot create entities or devices for IoT-Agent JSON v1.19.0 with FiLiP v0.2.5 Oct 20, 2023
@djs0109
Copy link
Contributor

djs0109 commented Oct 20, 2023

@msc-d1s7fa1eza can you search for 9b6f9b8d-a609-4253-bc0d-6cf208c887fc in logs? Then, you can see which device caused the problem. Please try to provision this device via Filip. And it not works, please post your code below

@msc-d1s7fa1eza
Copy link
Collaborator Author

@djs0109 Please excuse the delayed reply. We already discussed the background to this issue in person. For the record and history, I would like to share the insights here:

In fact, the issue was caused with the version 1.14.0 of the IoT Agent. This version seems to not be compatible with the current FiLiP version any more, which resulted in not being able to create any devices or service groups etc. As we are using Kubernetes for the FIWARE deployment, there are currently only HELM charts available for the version 1.14.0 of the IoT Agent json, for reference, see our issue here. Due to a change of the mountPath from /opt/iotajson/config.js to /opt/iotagent-json/config.js, when switching the image version to 1.19.0, the IoT Agent was not able to connect to the mongoDB correctly, consequently, again resulting in not being able to use the IoTA API. Fixing the mountPath allows for installing the latest IoTA version, which is working just fine with the current FiLiP version so far. Therefore, if you could add a hint that version 1.14.0 is no longer supported, this would probably help in finding potential incompatibilities in the setup. We also have tested the 1.19.0 version of the IoT Agent, which seemed also to be working just fine, so I would close the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants