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

FIWARE.Question.Tech.Data.OrionContextBroker.OrionCBOnlyRespondsWhenAskedTwice

    Details

      Description

      Created question in FIWARE Q/A platform on 01-10-2015 at 12:10
      Please, ANSWER this question AT http://stackoverflow.com/questions/32885065/context-broker-only-responds-when-asked-twice

      Question:
      Context Broker only responds when asked twice

      Description:
      So the problem is that when i try to establish a connection with the Context Broker whether i'm trying to update the entity or read the values. It only responds ok when i ask a second time.

      Context Broker Version: 0.24.0 (i updated from 0.20.0 because i thought that was the problem)

      Example:

      python2.7 GetEntity.py entity_1

      Output:

      • Asking to http://188.***.**.***:1026/ngsi10/queryContext
      • Headers: {'Fiware-Service': 'fiwarefinal', 'content-type': 'application/json', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
      • Sending PAYLOAD:
        {
        "entities": [ { "type": "", "id": "entity_1", "isPattern": "false" }

        ],
        "attributes": []
        }

      ...
      Traceback (most recent call last):
      File "GetEntity.py", line 73, in <module>
      r = requests.post(URL, data=PAYLOAD, headers=HEADERS)
      File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 109, in post
      return request('post', url, data=data, json=json, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 50, in request
      response = session.request(method=method, url=url, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
      resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
      r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
      raise ConnectionError(err, request=request)
      requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

      When i do it a second time:

      • Asking to http://188.***.**.***:1026/ngsi10/queryContext
      • Headers: {'Fiware-Service': 'fiwarefinal', 'content-type': 'application/json', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
      • Sending PAYLOAD:
        {
        "entities": [ { "type": "", "id": "entity_1", "isPattern": "false" }

        ],
        "attributes": []
        }

      ...

      • Status Code: 200
      • Response:
        {
        "contextResponses" : [
        {
        "contextElement" :
        Unknown macro: { "type" }

        ,
        "statusCode" :

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

        }
        ]
        }

      Example Nrº 2:

      curl http://188.166.92.124:1026/version

      Output:

      curl: (56) Failure when receiving data from the peer

      And when i do it a second time:

      <orion>
      <version>0.24.0</version>
      <uptime>0 d, 0 h, 41 m, 27 s</uptime>
      <git_hash><deleted for safety reasons></git_hash>
      <compile_time>Mon Sep 14 17:52:44 CEST 2015</compile_time>
      <compiled_by>fermin</compiled_by>
      <compiled_in>centollo</compiled_in>
      </orion>

      Sometimes i even have to restart because when i check the status of the Context Broker it gives me an error. I'm not sure of the error but i think it's something like "the pid file doesn't exist"

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        7d 2h 59m 1 Backlog Manager 08/Oct/15 6:04 PM
        In Progress In Progress Answered Answered
        2h 15m 1 Fermín Galán 08/Oct/15 8:20 PM
        Answered Answered Closed Closed
        1s 1 Fermín Galán 08/Oct/15 8:20 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        mev Manuel Escriche made changes -
        HD-Enabler Orion [ 10875 ]
        HD-Chapter Data [ 10838 ]
        oriondev TID Orion Developer made changes -
        Summary FIWARE.Qestion.Tech.Data.OrionContextBroker.OrionCBOnlyRespondsWhenAskedTwice FIWARE.Question.Tech.Data.OrionContextBroker.OrionCBOnlyRespondsWhenAskedTwice
        oriondev TID Orion Developer made changes -
        Summary FIWARE.Qestion.Tech.Data.OrionContextBroker.Context Broker only responds when asked twice FIWARE.Qestion.Tech.Data.OrionContextBroker.OrionCBOnlyRespondsWhenAskedTwice
        oriondev TID Orion Developer made changes -
        Summary FIWARE.Question.Lab.Context Broker only responds when asked twice FIWARE.Qestion.Tech.Data.OrionContextBroker.Context Broker only responds when asked twice
        fermin Fermín Galán made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fermin Fermín Galán made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-08 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-08 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        mev Manuel Escriche made changes -
        Assignee Fermín Galán [ fermin ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-01 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-01 15:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: