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

[fiware-stackoverflow] FIWARE Cygnus can't persist in HDFSink

    Details

      Description

      Created question in FIWARE Q/A platform on 29-08-2018 at 20:08
      Please, ANSWER this question AT https://stackoverflow.com/questions/52083773/fiware-cygnus-cant-persist-in-hdfsink

      Question:
      FIWARE Cygnus can't persist in HDFSink

      Description:
      I want to persist information in Hadoop through Cygnus.
      I'm testing the services, but in Cygnus log I receive this:

      msg=org.apache.http.client.protocol.ResponseProcessCookies[129] : Invalid cookie header: "Set-Cookie: hadoop.auth="u=hduser&p=hduser&t=simple&e=1535600601906&s=PBVO9ijLyamz6JCcTEohe76tgl0="; Path=/; Expires=jue, 30-ago-2018 03:43:21 GMT; HttpOnly". Unable to parse expires attribute: jue, 30-ago-2018 03:43:21 GMT

      [NGSIRestHandler] Bad HTTP notification (GET method not supported)
      time=2018-08-29T17:53:25.008Z | lvl=WARN | corr=50e71d08-183d-4181-835a-09c5935adec4 | trans=50e71d08-183d-4181-835a-09c5935adec4 | srv=user_activity | subsrv=/user_activity | comp=cygnus-ngsi | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[192] : Deserializer threw unexpected exception.
      org.apache.http.MethodNotSupportedException: GET method not supported

      But in the console, I receive that everything is ok.

      My notification.sh is like that:

      !/bin/sh
      URL=$1

      if [ "$2" != "" ]
      then
      SERVICE=$2
      else
      SERVICE=default
      fi

      if [ "$3" != "" ]
      then
      SERVICE_PATH=$3
      else
      SERVICE_PATH=/
      fi

      curl $URL v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @ <<EOF
      {
      "subscriptionId": "51c0ac9ed714fb3b37d7d5a8",
      "originator": "localhost",
      "contextResponses": [{
      "contextElement": {
      "attributes": [

      { "name": "temperature", "type": "centigrade", "value": "26.5" }

      ],
      "type": "Room",
      "isPattern": "false",
      "id": "Room1"
      },
      "statusCode":

      { "code": "200", "reasonPhrase": "OK" }

      }]
      }
      EOF

      The NGSI is not supposed to be intended to receive HTTP notifications as it is a REST API?

      Can anyone help me? It's my first time using this kind of services and I am absolutely lost.

      For more information, I am using Cygnus version 1.6.0.

      Thank you.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        14d 14h 52m 1 Andres Muñoz 13/Sep/18 11:58 AM
        In Progress In Progress Answered Answered
        6s 1 Andres Muñoz 13/Sep/18 11:58 AM
        Answered Answered Closed Closed
        1s 1 Andres Muñoz 13/Sep/18 11:58 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        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 ]
        Show
        andres.munoza Andres Muñoz added a comment - Answered at https://stackoverflow.com/questions/52083773/fiware-cygnus-cant-persist-in-hdfsink
        joaquin.salvachua Joaquín Salvachúa made changes -
        Assignee Joaquín Salvachúa [ joaquin.salvachua ] Andres Muñoz [ andres.munoza ]
        fla Fernando Lopez made changes -
        HD-Enabler Cygnus [ 11304 ]
        Description
        Created question in FIWARE Q/A platform on 29-08-2018 at 20:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/52083773/fiware-cygnus-cant-persist-in-hdfsink


        +Question:+
        FIWARE Cygnus can&#39;t persist in HDFSink

        +Description:+
        I want to persist information in Hadoop through Cygnus.
        I'm testing the services, but in Cygnus log I receive this:

        msg=org.apache.http.client.protocol.ResponseProcessCookies[129] : Invalid cookie header: "Set-Cookie: hadoop.auth="u=hduser&amp;p=hduser&amp;t=simple&amp;e=1535600601906&amp;s=PBVO9ijLyamz6JCcTEohe76tgl0="; Path=/; Expires=jue, 30-ago-2018 03:43:21 GMT; HttpOnly". Unable to parse expires attribute: jue, 30-ago-2018 03:43:21 GMT

            [NGSIRestHandler] Bad HTTP notification (GET method not supported)
        time=2018-08-29T17:53:25.008Z | lvl=WARN | corr=50e71d08-183d-4181-835a-09c5935adec4 | trans=50e71d08-183d-4181-835a-09c5935adec4 | srv=user_activity | subsrv=/user_activity | comp=cygnus-ngsi | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[192] : Deserializer threw unexpected exception.
        org.apache.http.MethodNotSupportedException: GET method not supported


        But in the console, I receive that everything is ok.

        My notification.sh is like that:

        !/bin/sh
        URL=$1

        if [ "$2" != "" ]
        then
               SERVICE=$2
           else
                  SERVICE=default
              fi

          if [ "$3" != "" ]
          then
                 SERVICE_PATH=$3
         else
                SERVICE_PATH=/
            fi

            curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @- &lt;&lt;EOF
        {
                    "subscriptionId": "51c0ac9ed714fb3b37d7d5a8",
                    "originator": "localhost",
                    "contextResponses": [{
                        "contextElement": {
                            "attributes": [{
                                "name": "temperature",
                                "type": "centigrade",
                                "value": "26.5"
                            }],
                            "type": "Room",
                            "isPattern": "false",
                            "id": "Room1"
                        },
                        "statusCode": {
                            "code": "200",
                            "reasonPhrase": "OK"
                        }
                    }]
                }
        EOF


        The NGSI is not supposed to be intended to receive HTTP notifications as it is a REST API?

        Can anyone help me? It's my first time using this kind of services and I am absolutely lost.

        For more information, I am using Cygnus version 1.6.0.

        Thank you.
        Created question in FIWARE Q/A platform on 29-08-2018 at 20:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/52083773/fiware-cygnus-cant-persist-in-hdfsink


        +Question:+
        FIWARE Cygnus can&#39;t persist in HDFSink

        +Description:+
        I want to persist information in Hadoop through Cygnus.
        I'm testing the services, but in Cygnus log I receive this:

        msg=org.apache.http.client.protocol.ResponseProcessCookies[129] : Invalid cookie header: "Set-Cookie: hadoop.auth="u=hduser&amp;p=hduser&amp;t=simple&amp;e=1535600601906&amp;s=PBVO9ijLyamz6JCcTEohe76tgl0="; Path=/; Expires=jue, 30-ago-2018 03:43:21 GMT; HttpOnly". Unable to parse expires attribute: jue, 30-ago-2018 03:43:21 GMT

            [NGSIRestHandler] Bad HTTP notification (GET method not supported)
        time=2018-08-29T17:53:25.008Z | lvl=WARN | corr=50e71d08-183d-4181-835a-09c5935adec4 | trans=50e71d08-183d-4181-835a-09c5935adec4 | srv=user_activity | subsrv=/user_activity | comp=cygnus-ngsi | op=doPost | msg=org.apache.flume.source.http.HTTPSource$FlumeHTTPServlet[192] : Deserializer threw unexpected exception.
        org.apache.http.MethodNotSupportedException: GET method not supported


        But in the console, I receive that everything is ok.

        My notification.sh is like that:

        !/bin/sh
        URL=$1

        if [ "$2" != "" ]
        then
               SERVICE=$2
           else
                  SERVICE=default
              fi

          if [ "$3" != "" ]
          then
                 SERVICE_PATH=$3
         else
                SERVICE_PATH=/
            fi

            curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @- &lt;&lt;EOF
        {
                    "subscriptionId": "51c0ac9ed714fb3b37d7d5a8",
                    "originator": "localhost",
                    "contextResponses": [{
                        "contextElement": {
                            "attributes": [{
                                "name": "temperature",
                                "type": "centigrade",
                                "value": "26.5"
                            }],
                            "type": "Room",
                            "isPattern": "false",
                            "id": "Room1"
                        },
                        "statusCode": {
                            "code": "200",
                            "reasonPhrase": "OK"
                        }
                    }]
                }
        EOF


        The NGSI is not supposed to be intended to receive HTTP notifications as it is a REST API?

        Can anyone help me? It's my first time using this kind of services and I am absolutely lost.

        For more information, I am using Cygnus version 1.6.0.

        Thank you.
        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-29 21:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-08-29 21: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:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: