Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-14575

FIWARE.Question.Tech.FIWARE Orion-Cygnus-Hadoop HTTPBadRequestException: 'fiware-servicepath' through an Orion subscription.

    Details

      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" + " \"type\": \"Usuario\",\r\n" + " \"isPattern\": \"true\",\r\n" + " \"id\": \"Usuario*\"\r\n" + " }

      ],\r\n" +
      " \"attributes\": [],\r\n" +
      " \"reference\": \"http://192.168.10.3:5050/notify\",\r\n" +
      " \"duration\": \"P4Y\",\r\n" +
      " \"notifyConditions\": [

      {\r\n" + " \"type\": \"ONCHANGE\",\r\n" + " \"condValues\": [\r\n" + " \"speed\"\r\n" + " ]\r\n" + " }

      ],\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
        Open Open In Progress In Progress
        3d 11h 30m 1 Andres Muñoz 03/Sep/18 11:36 AM
        In Progress In Progress Answered Answered
        1s 1 Andres Muñoz 03/Sep/18 11:36 AM
        Answered Answered Closed Closed
        1s 1 Andres Muñoz 03/Sep/18 11:36 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        HD-Enabler Cygnus [ 11304 ]
        Description
        Created question in FIWARE Q/A platform on 30-08-2018 at 23:08
        {color: red}Please, ANSWER this question AT{color} 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" +
                        " \"type\": \"Usuario\",\r\n" +
                        " \"isPattern\": \"true\",\r\n" +
                        " \"id\": \"Usuario*\"\r\n" +
                        " }],\r\n" +
                        " \"attributes\": [],\r\n" +
                        " \"reference\": \"http://192.168.10.3:5050/notify\",\r\n" +
                        " \"duration\": \"P4Y\",\r\n" +
                        " \"notifyConditions\": [{\r\n" +
                        " \"type\": \"ONCHANGE\",\r\n" +
                        " \"condValues\": [\r\n" +
                        " \"speed\"\r\n" +
                        " ]\r\n" +
                        " }],\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.
        Created question in FIWARE Q/A platform on 30-08-2018 at 23:08
        {color: red}Please, ANSWER this question AT{color} 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" +
                        " \"type\": \"Usuario\",\r\n" +
                        " \"isPattern\": \"true\",\r\n" +
                        " \"id\": \"Usuario*\"\r\n" +
                        " }],\r\n" +
                        " \"attributes\": [],\r\n" +
                        " \"reference\": \"http://192.168.10.3:5050/notify\",\r\n" +
                        " \"duration\": \"P4Y\",\r\n" +
                        " \"notifyConditions\": [{\r\n" +
                        " \"type\": \"ONCHANGE\",\r\n" +
                        " \"condValues\": [\r\n" +
                        " \"speed\"\r\n" +
                        " ]\r\n" +
                        " }],\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.
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] FIWARE [NGSI] Orion-Cygnus-Hadoop HTTPBadRequestException: 'fiware-servicepath' through an Orion subscription FIWARE.Question.Tech.FIWARE Orion-Cygnus-Hadoop HTTPBadRequestException: 'fiware-servicepath' through an Orion subscription.
        andres.munoza Andres Muñoz made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        andres.munoza Andres Muñoz made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        andres.munoza Andres Muñoz made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        andres.munoza Andres Muñoz made changes -
        Assignee Joaquín Salvachúa [ joaquin.salvachua ] Andres Muñoz [ andres.munoza ]
        veronika Veronika Vlnkova made changes -
        Assignee Joaquín Salvachúa [ joaquin.salvachua ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-08-31 00:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-08-31 00:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            andres.munoza Andres Muñoz
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: