Details
-
Type:
extRequest
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
HD-Enabler:STH-Comet
Description
Hi, I have a problem making STM Comet work, I hope you could give me a hand
cause I don’t know anyone with experience in Fiware to help me and I can’t
find more information about it.
I followed the guide:
https://github.com/Fiware/tutorials.Short-Term-History/tree/b47f51e807465642a790ee1c4607d4d6769f7acc#start-up
I only used the parts of the tutorial which were of my interest, so I did
the following:
1) In a brand new CentOS virtual machine I installed Docker and
Docker-Compose
2) Pulled the images I needed:
sudo docker pull mongo:3.6
sudo docker pull fiware/orion
sudo docker pull fiware/sth-comet
3) Created a sth-comet.yml file (see file attached) based on the tutorial
4) Used the following docker-compose command to start the containers:
sudo docker-compose -f sth-comet.yml -p fiware up -d --remove-orphans
5) Inserted in the orion container a couple of test data, which is attached
in case you wanna give a look to the structure (data.txt)
6) Made the subscription so the STH-Comet received and save the historic
information as it is send by Orion in each data update (you can see the
subscription attached named subscription.txt)
7) Made several updated on the entity Room1 (this is the entity subscribed)
8) The query to get the historical information was made as the following:
*curl -X GET *
- 'http://localhost:8666/STH/v1/contextEntities/type/Room/id/Room1/attributes/temperature?hLimit=7&hOffset=0
<http://localhost:8666/STH/v1/contextEntities/type/Room/id/Room1/attributes/temperature?hLimit=7&hOffset=0>**'
*
And it returned the error:
{"statusCode":400,"error":"Bad Request","message":"error=child
\"fiware-service\"
fails because [fiware-service is required]","
validation":{"source":"headers","keys":[]}}
The error mentioned these 2 headers fiware-service and fiware-service were
required, so I modified the subscription (subscriptionWithHeaders.txt) and
the get query to include these 2 headers
Get query:
*curl -X GET *
*'http://localhost:8666/STH/v1/contextEntities/type/Room/id/Room1/attributes/temperature?hLimit=7&hOffset=0
<http://localhost:8666/STH/v1/contextEntities/type/Room/id/Room1/attributes/temperature?hLimit=7&hOffset=0>'
*
*-H 'fiware-service: default' *
- -H 'fiware-servicepath: /'*
and the response were the following:
*{"contextResponses":[{"contextElement":{"attributes":[
{"name":"temperature","values":[]}],"id":"Room1","isPattern":false,"type":"Room"},"statusCode":{"code":"200","reasonPhrase":"OK"}}]}*
So no value were returned.
So I don’t understand what I’m doing wrong, I swear I read everything
regarding to this subject in the internet, I don’t know what else to do and
I’m desperate. I really hope you can help me, thanks in advance
__________________________________________________________________________________________
You can get more information about our cookies and privacy policies on the following links:
- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE_Privacy_Policy
- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Cookies_Policy_FIWARE
Fiware-lab-help mailing list
Fiware-lab-help@lists.fiware.org
https://lists.fiware.org/listinfo/fiware-lab-help
[Created via e-mail received from: sofia klein <sofiakleinpalermo@gmail.com>]
Dear, I forwarded your request to the specific support for STH-Comet GE