Open Rosiberto opened 4 years ago
This is the same case described in SOF question https://stackoverflow.com/questions/62327070/consult-raw-data-with-sth-comet?noredirect=1#comment110984866_62327070 ?
Yes, @fgalan. It is the same question
.
Let's continue the debug in SOF. Please have a look to my last comment there (I have requested a full detail of the config.js being used).
I have Orion, Cygnus and STH-Comet(installed and configured in formal mode). Each component is in a container docker. I implemented the infrastructure with docker-compose.yml.
The Cygnus container is configured as follows:
Obs: In the multisink_agent.conf file I changed the service and the servicepath:
And the STH-Comet container looks like this:
In the STH-Comet config.js file I enabled CORS:
config.cors = { enabled: 'true', ... };
and I changed the defaultService totese
and the defaultServicePath to/iot
.I use Cygnus to persist historical data. STH-Comet is used only to query raw and aggregated data.
Cygnus' signature on Orion did this:
The headers used for fiware-service and fiware-servicepath are:
Fiware-service: tese
Fiware-servicepath: /iot
The entities data are stored in orion-tese. I have the collection:
entities
The raw and aggregated data are stored in sth_tese. I have the collections:
sth_/iot_Tank1_Tank.aggr
andsth_/iot_Tank1_Tank
The sth_/iot_Tank1_Tank raw data is in mongoDB:
When I run:
http://localhost:8666/STH/v1/contextEntities/type/Tank/id/Tank1/attributes/temperature?aggrMethod=sum&aggrPeriod=minute
or
http://localhost:8666/STH/v2/entities/Tank1/attrs/temperature?type=Tank&aggrMethod=sum&aggrPeriod=minute
I have the result: "sum": 279 and "sum": 0.333. I can recover ALL the aggregated data, max, min, sum, sum2.
The difficulty is with the STH-Comet when I try to retrieve the raw data, the return code is 200 and the value returns empty.
I've tried with APIs v1 and v2, to no avail.
request with v2:
http://sth:8666/STH/v2/entities/Tank1/attrs/temperature?type=Tank&lastN=10
Return
request with v1:
http://sth:8666/STH/v1/contextEntities/type/Tank/id/Tank1/attributes/temperature?lastN=10
Return
The STH-Comet log shows that it is online and connects to the correct database:
The STH-Comet log with the api v2 request:
According to the log, it establishes the connection to recover the raw data:
msg=Getting access to the raw data collection for retrieval....
Confirms that the raw data exists:msg=The raw data collection for retrieval exists
. But, it cannot recover this data and generates the message that the raw data is not available and does not return any points:msg=No raw data available for the request
andmsg=Responding with no points
.I already read the configuration part in the documentation. I've reinstalled everything, several times. I combed all settings and I can't find anything to justify this problem.
What could it be? Could someone with expertise in STH-Comet give any guidance?
Thanks!