1

I create my Instance on the CLOUD but when try to do a POST the data are not send to the VM, something is wrong with the data I use ?

  • I'm using Rest Client on Firefox.
  • This is the body of the code (Json) :

    {
    "contextElements": [
        {
            "type": "Room",
            "isPattern": "false",
            "id": "Room1",
            "attributes": [
            {
                "name": "temperature",
                "type": "float",
                "value": "23"
            },
            {
                "name": "pressure",
                "type": "integer",
                "value": "720"
            }
            ]
        }
    ],
    "updateAction": "APPEND"
    } 
    

The URL is http://10.0.22x.6x:1026/NGSI10/updateContext and the headers are:

  • Content-Type: application/json
  • Accept: application/json
fgalan
  • 11,732
  • 9
  • 46
  • 89

1 Answers1

0

Note that you are sending your REST request to a private IP (10.0.22x.6x). However, I guess that you run your Firefox REST Client in a PC or laptop computer without direct connectivity to that IP.

The solution would be to allocate a public IP to the VM, then access to that public IP from your external REST Client. Note that you need the port 1026 opened in the security group associated to that VM (otherwise the cloud will block any attemp to connect to it from an external host).

fgalan
  • 11,732
  • 9
  • 46
  • 89
  • I have a big confusion because the region should be changed (spain not work on instances), I was testing various regions but anything is give me public IP's for use the instances. – Francisco Ignacio Vidal Jan 16 '15 at 17:20
  • A public IP should help to solve this problem. However, having one doesn't guarantee that another problems (to deal with outside the scope of this question) don't occur. Regarding lack of public IPs in FIWARE Lab regions, that is a an specific cloud-related issue, so I recommend to use the support channel recommended in http://stackoverflow.com/questions/27946814/instance-vm-creation – fgalan Jan 16 '15 at 17:31