[Backlogmanager] [FIWARE-JIRA] (HELP-16025) [fiware-stackoverflow] FIWARE Orion error ' Couldn' t connect to server' forwarding ' Query' to providing application

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Thu Jul 18 13:03:00 CEST 2019


     [ https://jira.fiware.org/browse/HELP-16025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez updated HELP-16025:
----------------------------------
    Description: 
Created question in FIWARE Q/A platform on 16-07-2019 at 12:07
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/57055166/fiware-orion-error-couldnt-connect-to-server-forwarding-query-to-providing


+Question:+
FIWARE Orion error 'Couldn't connect to server' forwarding 'Query' to providing application

+Description:+
I am trying to provision a device and send actuation commands back using 2 components Orion and LoRaWAN IoT Agent.

I am running Orion and other components on docker-compose file, and the IoT Agent using node bin/iotagent-lora

I have successfully provisioned the device using :

curl -iX POST \
  'http://localhost:4061/iot/devices' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: agriculture' \
  -H 'fiware-servicepath: /irrigation' \
  -d '{
  "devices": [
    {
      "device_id": "pycom1",
      "entity_name": "urn:ngsi-ld:tempHumid:001",
      "entity_type": "tempHumid",
      "transport": "MQTT",

      "attributes": [
        {
    "object_id": "temperature",

          "name": "deviceState",
          "type": "Text"
        }],
      "commands": [
        {  

          "name": "on",
        "type": "command"
      },
        {       
          "name": "off"
        ,"type": "command"
      }
       ],
        "internal_attributes": {
        "lorawan": {
          "application_server": {
            "host": "10.8.244.180",
            "username": "admin",
            "password": "admin",
            "provider": "loraserver.io"
          },
          "dev_eui": "0097da62c6b67443",
          "app_eui": "70B3D57ED000985F",
          "application_id": "1",
          "application_key": "2b043fb00af7c6ac4075a35b8a18fc9c",
          "data_model":"application_server"
        }}}]}'


an automatic registrations is created in Orion after provisioning the device:

{
    "id": "5d2d9f4f795d881c2355ab7c",
    "expires": "2020-07-16T09:56:31.00Z",
    "dataProvided": {
        "entities": [{
            "id": "urn:ngsi-ld:tempHumid:001",
            "type": "tempHumid"
        }],
        "attrs": ["on", "off"]
    },
    "provider": {
        "http": {
            "url": "http://localhost:4061"
        },
        "supportedForwardingMode": "all",
        "legacyForwarding": true
    },
    "status": "active"
}


Following this tutorial I have created another registration for actuation commands like the following:

curl -iX POST \
  'http://localhost:1026/v2/registrations' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: agriculture' \
  -H 'fiware-servicepath: /irrigation' \
  -d '{
  "description": "Pump Commands",
  "dataProvided": {
    "entities": [
      {
        "id": "urn:ngsi-ld:tempHumid:001", 

        "type": "tempHumid"
      }
    ],
    "attrs": [ "on", "off" ]
  },
  "provider": {
    "http": {"url": "http://localhost:1026/v1"},
    "legacyForwarding": true
  }
}'


I have tried to use the proposed solution to an issue similar to the one I am facing, and after trying, I have obtained this error:

{"error":"NotFound","description":"The requested entity has not been found. Check type and id"}


while Orion reported 


  fiware-orion Starting transaction to http://localhost:4061//updateContext


I don't know if it is linked to this issue but a similar bug was already reported in here

fiware-orion   | INFO at 10:16:34  logMsg.h[1844]: Starting transaction to http://localhost:4061//updateContext
fiware-orion   | INFO at 10:16:34  httpRequestSend.cpp[592]: Sending message 4 to HTTP server: sending message of 447 bytes to HTTP server
fiware-orion   | ERROR at 10:16:34  postUpdateContext.cpp[190]: Runtime Error (error 'Couldn't connect to server' forwarding 'Update' to providing application)
fiware-orion   | INFO at 10:16:34  logMsg.h[1874]: Transaction ended


Thank you in advance


  was:

Created question in FIWARE Q/A platform on 16-07-2019 at 12:07
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/57055166/fiware-orion-error-couldnt-connect-to-server-forwarding-query-to-providing


+Question:+
FIWARE Orion error 'Couldn't connect to server' forwarding 'Query' to providing application

+Description:+
I am trying to provision a device and send actuation commands back using 2 components Orion and LoRaWAN IoT Agent.

I am running Orion and other components on docker-compose file, and the IoT Agent using node bin/iotagent-lora

I have successfully provisioned the device using :

curl -iX POST \
  'http://localhost:4061/iot/devices' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: agriculture' \
  -H 'fiware-servicepath: /irrigation' \
  -d '{
  "devices": [
    {
      "device_id": "pycom1",
      "entity_name": "urn:ngsi-ld:tempHumid:001",
      "entity_type": "tempHumid",
      "transport": "MQTT",

      "attributes": [
        {
    "object_id": "temperature",

          "name": "deviceState",
          "type": "Text"
        }],
      "commands": [
        {  

          "name": "on",
        "type": "command"
      },
        {       
          "name": "off"
        ,"type": "command"
      }
       ],
        "internal_attributes": {
        "lorawan": {
          "application_server": {
            "host": "10.8.244.180",
            "username": "admin",
            "password": "admin",
            "provider": "loraserver.io"
          },
          "dev_eui": "0097da62c6b67443",
          "app_eui": "70B3D57ED000985F",
          "application_id": "1",
          "application_key": "2b043fb00af7c6ac4075a35b8a18fc9c",
          "data_model":"application_server"
        }}}]}'


an automatic registrations is created in Orion after provisioning the device:

{
    "id": "5d2d9f4f795d881c2355ab7c",
    "expires": "2020-07-16T09:56:31.00Z",
    "dataProvided": {
        "entities": [{
            "id": "urn:ngsi-ld:tempHumid:001",
            "type": "tempHumid"
        }],
        "attrs": ["on", "off"]
    },
    "provider": {
        "http": {
            "url": "http://localhost:4061"
        },
        "supportedForwardingMode": "all",
        "legacyForwarding": true
    },
    "status": "active"
}


Following this tutorial I have created another registration for actuation commands like the following:

curl -iX POST \
  'http://localhost:1026/v2/registrations' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: agriculture' \
  -H 'fiware-servicepath: /irrigation' \
  -d '{
  "description": "Pump Commands",
  "dataProvided": {
    "entities": [
      {
        "id": "urn:ngsi-ld:tempHumid:001", 

        "type": "tempHumid"
      }
    ],
    "attrs": [ "on", "off" ]
  },
  "provider": {
    "http": {"url": "http://localhost:1026/v1"},
    "legacyForwarding": true
  }
}'


I have tried to use the proposed solution to an issue similar to the one I am facing, and after trying, I have obtained this error:

{"error":"NotFound","description":"The requested entity has not been found. Check type and id"}


while Orion reported 


  fiware-orion Starting transaction to http://localhost:4061//updateContext


I don't know if it is linked to this issue but a similar bug was already reported in here

fiware-orion   | INFO at 10:16:34  logMsg.h[1844]: Starting transaction to http://localhost:4061//updateContext
fiware-orion   | INFO at 10:16:34  httpRequestSend.cpp[592]: Sending message 4 to HTTP server: sending message of 447 bytes to HTTP server
fiware-orion   | ERROR at 10:16:34  postUpdateContext.cpp[190]: Runtime Error (error 'Couldn't connect to server' forwarding 'Update' to providing application)
fiware-orion   | INFO at 10:16:34  logMsg.h[1874]: Transaction ended


Thank you in advance


     HD-Enabler: Orion

> [fiware-stackoverflow] FIWARE Orion error 'Couldn't connect to server' forwarding 'Query' to providing application
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HELP-16025
>                 URL: https://jira.fiware.org/browse/HELP-16025
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Fermín Galán
>              Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 16-07-2019 at 12:07
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/57055166/fiware-orion-error-couldnt-connect-to-server-forwarding-query-to-providing
> +Question:+
> FIWARE Orion error 'Couldn't connect to server' forwarding 'Query' to providing application
> +Description:+
> I am trying to provision a device and send actuation commands back using 2 components Orion and LoRaWAN IoT Agent.
> I am running Orion and other components on docker-compose file, and the IoT Agent using node bin/iotagent-lora
> I have successfully provisioned the device using :
> curl -iX POST \
>   'http://localhost:4061/iot/devices' \
>   -H 'Content-Type: application/json' \
>   -H 'fiware-service: agriculture' \
>   -H 'fiware-servicepath: /irrigation' \
>   -d '{
>   "devices": [
>     {
>       "device_id": "pycom1",
>       "entity_name": "urn:ngsi-ld:tempHumid:001",
>       "entity_type": "tempHumid",
>       "transport": "MQTT",
>       "attributes": [
>         {
>     "object_id": "temperature",
>           "name": "deviceState",
>           "type": "Text"
>         }],
>       "commands": [
>         {  
>           "name": "on",
>         "type": "command"
>       },
>         {       
>           "name": "off"
>         ,"type": "command"
>       }
>        ],
>         "internal_attributes": {
>         "lorawan": {
>           "application_server": {
>             "host": "10.8.244.180",
>             "username": "admin",
>             "password": "admin",
>             "provider": "loraserver.io"
>           },
>           "dev_eui": "0097da62c6b67443",
>           "app_eui": "70B3D57ED000985F",
>           "application_id": "1",
>           "application_key": "2b043fb00af7c6ac4075a35b8a18fc9c",
>           "data_model":"application_server"
>         }}}]}'
> an automatic registrations is created in Orion after provisioning the device:
> {
>     "id": "5d2d9f4f795d881c2355ab7c",
>     "expires": "2020-07-16T09:56:31.00Z",
>     "dataProvided": {
>         "entities": [{
>             "id": "urn:ngsi-ld:tempHumid:001",
>             "type": "tempHumid"
>         }],
>         "attrs": ["on", "off"]
>     },
>     "provider": {
>         "http": {
>             "url": "http://localhost:4061"
>         },
>         "supportedForwardingMode": "all",
>         "legacyForwarding": true
>     },
>     "status": "active"
> }
> Following this tutorial I have created another registration for actuation commands like the following:
> curl -iX POST \
>   'http://localhost:1026/v2/registrations' \
>   -H 'Content-Type: application/json' \
>   -H 'fiware-service: agriculture' \
>   -H 'fiware-servicepath: /irrigation' \
>   -d '{
>   "description": "Pump Commands",
>   "dataProvided": {
>     "entities": [
>       {
>         "id": "urn:ngsi-ld:tempHumid:001", 
>         "type": "tempHumid"
>       }
>     ],
>     "attrs": [ "on", "off" ]
>   },
>   "provider": {
>     "http": {"url": "http://localhost:1026/v1"},
>     "legacyForwarding": true
>   }
> }'
> I have tried to use the proposed solution to an issue similar to the one I am facing, and after trying, I have obtained this error:
> {"error":"NotFound","description":"The requested entity has not been found. Check type and id"}
> while Orion reported 
>   fiware-orion Starting transaction to http://localhost:4061//updateContext
> I don't know if it is linked to this issue but a similar bug was already reported in here
> fiware-orion   | INFO at 10:16:34  logMsg.h[1844]: Starting transaction to http://localhost:4061//updateContext
> fiware-orion   | INFO at 10:16:34  httpRequestSend.cpp[592]: Sending message 4 to HTTP server: sending message of 447 bytes to HTTP server
> fiware-orion   | ERROR at 10:16:34  postUpdateContext.cpp[190]: Runtime Error (error 'Couldn't connect to server' forwarding 'Update' to providing application)
> fiware-orion   | INFO at 10:16:34  logMsg.h[1874]: Transaction ended
> Thank you in advance



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy