Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:Cygnus
Description
Created question in FIWARE Q/A platform on 30-08-2018 at 23:08
Please, ANSWER this question AT https://stackoverflow.com/questions/52105736/fiware-ngsi-orion-cygnus-hadoop-httpbadrequestexception-fiware-servicepath
Question:
FIWARE [NGSI] Orion-Cygnus-Hadoop HTTPBadRequestException: 'fiware-servicepath' through an Orion subscription
Description:
I want to persist some historical data from my server. So the documentation says that you must first send a subscription to Orion and then Orion will send the notification to Cygnus.
I made the subscription like this:
Entity payload = Entity.json("{\r\n" +
" \"entities\": [
],\r\n" +
" \"attributes\": [],\r\n" +
" \"reference\": \"http://192.168.10.3:5050/notify\",\r\n" +
" \"duration\": \"P4Y\",\r\n" +
" \"notifyConditions\": [
],\r\n" +
" \"throttling\": \"PT0.001S\"\r\n" +
"}");
Response response = client.target("http://192.168.10.3:1026/v1/subscribeContext")
.request(MediaType.APPLICATION_JSON_TYPE)
.post(payload);
And the creation of entities:
Entity payload = Entity.json("{ \"type\": \"Usuario\", \"id\": \"Usuario22\", \"temperature\":
{ \"value\": \"80.0\" }, \"location\": { \"value\": \""latitud", "altitud"\", \"type\": \"geo:point\", \"metadata\": { \"crs\":
{ \"value\": \"WGS84\" } } }}");
Response response = client.target("http://192.168.10.3:1026/v2/entities")
.request(MediaType.APPLICATION_JSON_TYPE)
.post(payload);
Then, Cygnus log tell me:
HTTPBadRequestException: 'fiware-servicepath' header value does not match the number of notified context responses [...]
Do any of you know why this is happening? The creation of the headers should be done by Orion or, failing that, by using the configuration of the Cygnus...
Thank you in advance.
Activity
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
3d 11h 30m | 1 | Andres Muñoz | 03/Sep/18 11:36 AM | |||||
|
1s | 1 | Andres Muñoz | 03/Sep/18 11:36 AM | |||||
|
1s | 1 | Andres Muñoz | 03/Sep/18 11:36 AM |