-
Notifications
You must be signed in to change notification settings - Fork 28
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
Configured Cygnus with STH-comet, but unable to retrieve data from Mongo DB #519
Comments
We would need more detail about your case, please. In particular:
Thanks! |
curl --location --request GET "http://localhost:8666/STH/v1/contextEntities/type/multiSensor/id/urn:ngsi-ld:70-B3-D5-D7-20-1C-01-A7/attributes/Temperature?lastN=10"
|
Could you also include the fragment of the log that you get in STH when you run that GET request, please? (only the fragment, not the full log). Thanks! |
|
But as you can see, the collection exists in Mongo DB with latest data |
Well... in Mongo DB exists a collection with data but we don't know the collection to which STH is trying to access (or at least I haven't seen in the log fragment you sent... maybe I missed?). Thus, let's try to find the collection to which STH is trying to access, in order to ensure is the same exists in MongoDB. Not sure but maybe log traces in DEBUG level could provide that information. In addition, the |
That could be the problem |
The recommended way of storing data in STH in production is through Cygnus (see https://stackoverflow.com/questions/56461642/sth-comet-raw-insert-in-mongo-database). However, for testing is fine using the /notify endpoint (in fact, in this situation is is even better, to reduce complexity). Thus, let's focus in that case (i.e. using the /notify endpoint). I'd recommend to do a full clean up before continue debugging, I mean to drop all the STH-related databases. Which configuration is STH using (i.e. the content of the config.js file)? As far as I remember there are different ways of structuring collections in STH (specified in the config.js file) and there could be some mismatch in the way data is inserted and retrieved. |
Now seems like cygnus is working properly and persisting data to mongoDB. It returns empty array. |
Ok, let's start from your last comment and forget all the previous history (Cygnus vs. direct notification confusion, connections, problems, etc.) :) Which In addition, do the following to ensure we start from a clean situation:
|
Were you able to solve this problem with STH-Comet? I have the same problem and I have not found a solution. |
@Rosiberto do you mean same problem described in issue #545 ? |
I have configured Cygnus and STH
Cygnus is getting subscribed data from orion and storing it in mongo DB
But I am unable to fetch data from STH
When I try to get data, it returns response with empty values array.
However I can see the data in Mongo DB
The text was updated successfully, but these errors were encountered: