Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 06-12-2018 at 16:12
Please, ANSWER this question AT https://stackoverflow.com/questions/53654763/do-i-need-any-proxy-to-make-context-provider-visible-by-fiware-orion-context-bro
Question:
Do I need any proxy to make Context Provider visible by FIWARE Orion Context Broker?
Description:
I cannot get an attribute from registered Context Provider in Orion Context Broker installed from docker. Do I need something more (e.g. special context proxy?)
SETUP
I have whole Orion Context Broker all setup and running after following this commands:
docker pull mongo:3.6
docker pull fiware/orion
docker network create fiware_default
docker run -d --name=mongo-db --network=fiware_default \
--expose=27017 mongo:3.6 --bind_ip_all --smallfiles
docker run -d --name fiware-orion -h orion --network=fiware_default \
-p 1026:1026 fiware/orion -dbhost mongo-db
ENTITIES
I also added one Store entity (from https://github.com/Fiware/tutorials.Getting-Started tutorial) by running:
curl -iX POST \
'http://localhost:1026/v2/entities' \
-H 'Content-Type: application/json' \
-d '
{
"id": "urn:ngsi-ld:Store:001",
"type": "Store",
"address": {
"type": "PostalAddress",
"value":
},
"location": {
"type": "geo:json",
"value":
},
"name":
}'
Moreover I also successfully registered my Context Provider:
curl -iX POST 'http://localhost:1026/v2/registrations' -H 'Content-Type: application/json' -d '{
"description": "Temperature Provider",
"dataProvided": {
"entities": [
],
"attrs": [
"temperature"
]
},
"provider": {
"http":
,
"legacyForwarding": true
}
}'
CONTEXT PROVIDER
I exposed locally my Context Provider (exposed by my SpringBoot application written in Java 10) at http://192.168.xxx.xxx:8080/temperature. The JSON data (returned in html body) is in NSGI v1 format and looks like that:
{
"contextResponses": [
{
"contextElement": {
"attributes": [
],
"id": "urn:ngsi-ld:Store:001",
"isPattern": "false",
"type": "Store"
},
"statusCode":
}
]
}
PROBLEM
When I try to get other entity's attributes (like name) it works fine, but when I try to get temperature attribute with this query:
curl -X GET 'http://192.168.xxx.xxx:1026/v2/entities/urn:ngsi-ld:Store:001/attrs/temperature/value'
I get the following error:
{"error":"NotFound","description":"The entity does not have such an attribute"}Logs in the Context Broker docker:
time=2018-12-07T09:18:02.846Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=AlarmManager.cpp[405]:badInput | msg=Raising alarm BadInput 192.168.115.126: JSON Parse Error: unknown field: /timestamp
time=2018-12-07T09:18:02.847Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=postQueryContext.cpp[196]:queryForward | msg=Internal Error (error parsing reply from prov app: )
Do I need something more in my setup to make this Context Provider work (e.g. special context proxy)?
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Done [ 10000 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
HD-Enabler | Orion [ 10875 ] | |
Description |
Created question in FIWARE Q/A platform on 06-12-2018 at 16:12 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/53654763/do-i-need-any-proxy-to-make-context-provider-visible-by-fiware-orion-context-bro +Question:+ Do I need any proxy to make Context Provider visible by FIWARE Orion Context Broker? +Description:+ I cannot get an attribute from registered Context Provider in Orion Context Broker installed from docker. Do I need something more (e.g. special context proxy?) SETUP I have whole Orion Context Broker all setup and running after following this commands: docker pull mongo:3.6 docker pull fiware/orion docker network create fiware_default docker run -d --name=mongo-db --network=fiware_default \ --expose=27017 mongo:3.6 --bind_ip_all --smallfiles docker run -d --name fiware-orion -h orion --network=fiware_default \ -p 1026:1026 fiware/orion -dbhost mongo-db ENTITIES I also added one Store entity (from https://github.com/Fiware/tutorials.Getting-Started tutorial) by running: curl -iX POST \ 'http://localhost:1026/v2/entities' \ -H 'Content-Type: application/json' \ -d ' { "id": "urn:ngsi-ld:Store:001", "type": "Store", "address": { "type": "PostalAddress", "value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" } }, "location": { "type": "geo:json", "value": { "type": "Point", "coordinates": [13.3986, 52.5547] } }, "name": { "type": "Text", "value": "Bösebrücke Einkauf" } }' Moreover I also successfully registered my Context Provider: curl -iX POST 'http://localhost:1026/v2/registrations' -H 'Content-Type: application/json' -d '{ "description": "Temperature Provider", "dataProvided": { "entities": [ { "id": "urn:ngsi-ld:Store:001", "type": "Store" } ], "attrs": [ "temperature" ] }, "provider": { "http": { "url": "http://192.168.xxx.xxx:8080/temperature" }, "legacyForwarding": true } }' CONTEXT PROVIDER I exposed locally my Context Provider (exposed by my SpringBoot application written in Java 10) at http://192.168.xxx.xxx:8080/temperature. The JSON data (returned in html body) is in NSGI v1 format and looks like that: { "contextResponses": [ { "contextElement": { "attributes": [ { "name": "temperature", "type": "float", "value": "16" } ], "id": "urn:ngsi-ld:Store:001", "isPattern": "false", "type": "Store" }, "statusCode": { "code": "200", "reasonPhrase": "OK" } } ] } PROBLEM When I try to get other entity's attributes (like name) it works fine, but when I try to get temperature attribute with this query: curl -X GET 'http://192.168.xxx.xxx:1026/v2/entities/urn:ngsi-ld:Store:001/attrs/temperature/value' I get the following error: {"error":"NotFound","description":"The entity does not have such an attribute"} Logs in the Context Broker docker: time=2018-12-07T09:18:02.846Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=AlarmManager.cpp[405]:badInput | msg=Raising alarm BadInput 192.168.115.126: JSON Parse Error: unknown field: /timestamp time=2018-12-07T09:18:02.847Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=postQueryContext.cpp[196]:queryForward | msg=Internal Error (error parsing reply from prov app: ) Do I need something more in my setup to make this Context Provider work (e.g. special context proxy)? |
Created question in FIWARE Q/A platform on 06-12-2018 at 16:12
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/53654763/do-i-need-any-proxy-to-make-context-provider-visible-by-fiware-orion-context-bro +Question:+ Do I need any proxy to make Context Provider visible by FIWARE Orion Context Broker? +Description:+ I cannot get an attribute from registered Context Provider in Orion Context Broker installed from docker. Do I need something more (e.g. special context proxy?) SETUP I have whole Orion Context Broker all setup and running after following this commands: docker pull mongo:3.6 docker pull fiware/orion docker network create fiware_default docker run -d --name=mongo-db --network=fiware_default \ --expose=27017 mongo:3.6 --bind_ip_all --smallfiles docker run -d --name fiware-orion -h orion --network=fiware_default \ -p 1026:1026 fiware/orion -dbhost mongo-db ENTITIES I also added one Store entity (from https://github.com/Fiware/tutorials.Getting-Started tutorial) by running: curl -iX POST \ 'http://localhost:1026/v2/entities' \ -H 'Content-Type: application/json' \ -d ' { "id": "urn:ngsi-ld:Store:001", "type": "Store", "address": { "type": "PostalAddress", "value": { "streetAddress": "Bornholmer Straße 65", "addressRegion": "Berlin", "addressLocality": "Prenzlauer Berg", "postalCode": "10439" } }, "location": { "type": "geo:json", "value": { "type": "Point", "coordinates": [13.3986, 52.5547] } }, "name": { "type": "Text", "value": "Bösebrücke Einkauf" } }' Moreover I also successfully registered my Context Provider: curl -iX POST 'http://localhost:1026/v2/registrations' -H 'Content-Type: application/json' -d '{ "description": "Temperature Provider", "dataProvided": { "entities": [ { "id": "urn:ngsi-ld:Store:001", "type": "Store" } ], "attrs": [ "temperature" ] }, "provider": { "http": { "url": "http://192.168.xxx.xxx:8080/temperature" }, "legacyForwarding": true } }' CONTEXT PROVIDER I exposed locally my Context Provider (exposed by my SpringBoot application written in Java 10) at http://192.168.xxx.xxx:8080/temperature. The JSON data (returned in html body) is in NSGI v1 format and looks like that: { "contextResponses": [ { "contextElement": { "attributes": [ { "name": "temperature", "type": "float", "value": "16" } ], "id": "urn:ngsi-ld:Store:001", "isPattern": "false", "type": "Store" }, "statusCode": { "code": "200", "reasonPhrase": "OK" } } ] } PROBLEM When I try to get other entity's attributes (like name) it works fine, but when I try to get temperature attribute with this query: curl -X GET 'http://192.168.xxx.xxx:1026/v2/entities/urn:ngsi-ld:Store:001/attrs/temperature/value' I get the following error: {"error":"NotFound","description":"The entity does not have such an attribute"} Logs in the Context Broker docker: time=2018-12-07T09:18:02.846Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=AlarmManager.cpp[405]:badInput | msg=Raising alarm BadInput 192.168.115.126: JSON Parse Error: unknown field: /timestamp time=2018-12-07T09:18:02.847Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=postQueryContext.cpp[196]:queryForward | msg=Internal Error (error parsing reply from prov app: ) Do I need something more in my setup to make this Context Provider work (e.g. special context proxy)? |
Assignee | Backlog Manager [ backlogmanager ] |
Fix Version/s | 2021 [ 12600 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
3d 2h 59m | 1 | Backlog Manager | 10/Dec/18 3:06 PM | |||||
|
2h 59m | 1 | Backlog Manager | 10/Dec/18 6:06 PM |
2018-12-07 12:06|CREATED monitor | # answers= 0, accepted answer= False