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

[fiware-stackoverflow] No JSON object could be decoded- orion context broker

    Details

      Description

      Created question in FIWARE Q/A platform on 14-04-2015 at 15:04
      Please, ANSWER this question AT https://stackoverflow.com/questions/29628587/no-json-object-could-be-decoded-orion-context-broker

      Question:
      No JSON object could be decoded- orion context broker

      Description:
      I am trying out orion context broker comunication on two CentOS 6.6 machines. On the target machine I did:

      ./accumulator-server.py 1028 /accumulate mywebpage.lan on

      And on my local machine I did:

      [DevF12@localhost ~]$ (curl mywebpage.lan:1028/v1/updateContext s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @ | python -mjson.tool ) <<EOF
      > {
      > "contextElements": [
      > {
      > "type": "Room",
      > "isPattern": "false",
      > "id": "Room2",
      > "attributes": [
      >

      { > "name": "temperature", > "type": "float", > "value": "777" > }

      ,
      >

      { > "name": "pressure", > "type": "integer", > "value": "711" > }

      > ]
      > }
      > ],
      > "updateAction": "APPEND"
      > }
      > EOF

      The result on the target machine is:

      POST http://mywebpage.lan:1028/v1/updateContext
      Content-Length: 456
      User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
      Host: mywebpage.lan:1028
      Accept: application/json
      Content-Type: application/json

      { "contextElements": [ { "type": "Room", "isPattern": "false", "id": "Room2", "attributes": [

      { "name": "temperature", "type": "float", "value": "777" }

      ,

      { "name": "pressure", "type": "integer", "value": "711" }

      ] } ], "updateAction": "APPEND"}=======================================

      192.168.1.11 - - [14/Apr/2015 15:07:36] "POST /v1/updateContext HTTP/1.1" 200 -

      And the message I get from the local machine is:

      No JSON object could be decoded

      So, what does this all mean?

      1. Is the 200 code saying that it is successfully creating Room2?

      2. Why am I getting the could not decode JSON then?

      3. All of this brings up another question, does this mean that the weather station described in my previous post also has to run on CentOS in order to send context broker messages?

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 00:05|CREATED monitor | # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 00:05|CREATED monitor | # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 03:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 03:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-23 06:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-23 06:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

          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: