Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVICE_GROUP_NOT_FOUND when I provision service group #320

Closed
karaleina opened this issue Jan 4, 2019 · 16 comments
Closed

DEVICE_GROUP_NOT_FOUND when I provision service group #320

karaleina opened this issue Jan 4, 2019 · 16 comments

Comments

@karaleina
Copy link

What can be the reason that I receive DEVICE_GROUP_NOT_FOUND when I provision a service group?

I am going through the tutorial and my setup is the same as in https://github.com/Fiware/tutorials.IoT-over-MQTT (I cloned repository and then ./services create ./services start).

When I look at IoT Agent logs (docker logs <iot_agent> --follow):

time=2019-01-04T10:59:41.633Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.GenericMiddlewares | srv=openiot | subsrv=/ | msg=Request for path [/iot/services] from [localhost:4041] | comp=IoTAgent
time=2019-01-04T10:59:41.634Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.GenericMiddlewares | srv=openiot | subsrv=/ | msg=Body:
{
    "services": [
        {
            "apikey": "4jggokgpepnvsb2uv4s40d59ov",
            "cbroker": "http://orion:1026",
            "entity_type": "Thing",
            "resource": ""
        }
    ]
}
 | comp=IoTAgent
time=2019-01-04T10:59:41.637Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.DeviceGroupService | srv=openiot | subsrv=/ | msg=Creating new set of 1 services | comp=IoTAgent
time=2019-01-04T10:59:41.637Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.DeviceGroupService | srv=openiot | subsrv=/ | msg=validateGroup {"apikey":"4jggokgpepnvsb2uv4s40d59ov","cbroker":"http://orion:1026","resource":"","type":"Thing","service":"openiot","subservice":"/"} | comp=IoTAgent
time=2019-01-04T10:59:41.637Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.MongoDBGroupRegister | srv=openiot | subsrv=/ | msg=Looking for group params ["resource","apikey"] with queryObj {"apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-04T10:59:41.647Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-04T10:59:41.647Z | lvl=ERROR | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.Alarms | srv=n/a | subsrv=n/a | msg=Raising [MONGO-ALARM]: {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group","code":404} | comp=IoTAgent
time=2019-01-04T10:59:41.647Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceGroupService | srv=n/a | subsrv=n/a | msg=generateDuplicateHander error [object Object] and foundGroup undefined | comp=IoTAgent
time=2019-01-04T10:59:41.655Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Storing device group with id [5c2f3c9d29eeb70011b40a74], type [Thing], apikey [4jggokgpepnvsb2uv4s40d59ov] and resource [] | comp=IoTAgent
time=2019-01-04T10:59:41.671Z | lvl=ERROR | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.Alarms | srv=n/a | subsrv=n/a | msg=Releasing [MONGO-ALARM] | comp=IoTAgent
time=2019-01-04T10:59:41.671Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.IOTAMService | srv=n/a | subsrv=n/a | msg=Looking for bindings for the function [configurationHandler] and protocol [null] | comp=IoTAgent
time=2019-01-04T10:59:41.673Z | lvl=DEBUG | corr=054a31d7-a532-442a-bb37-3ed3c739970d | trans=054a31d7-a532-442a-bb37-3ed3c739970d | op=IoTAgentNGSI.DomainControl | srv=openiot | subsrv=/ | msg=response-time: 69 | comp=IoTAgent
  1. Is this a problem? (On the other hand I receive 201 created status) and also when I make get on http://localhost:4041/iot/services this service is found as below:
{
    "count": 1,
    "services": [
        {
            "commands": [],
            "lazy": [],
            "attributes": [],
            "_id": "5c2f3c9d29eeb70011b40a74",
            "resource": "",
            "apikey": "4jggokgpepnvsb2uv4s40d59ov",
            "service": "openiot",
            "subservice": "/",
            "__v": 0,
            "static_attributes": [],
            "internal_attributes": [],
            "entity_type": "Thing"
        }
    ]
}
  1. Unfortunately, I get the same DEVICE_GROUP_NOT_FOUND also when I provision my sensor (making curl from mentioned tutorial):
`curl -iX POST \
  'http://localhost:4041/iot/services' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: openiot' \
  -H 'fiware-servicepath: /' \
  -d '{
 "services": [
   {
     "apikey":      "4jggokgpepnvsb2uv4s40d59ov",
     "cbroker":     "http://orion:1026",
     "entity_type": "Thing",
     "resource":    ""
   }
 ]
}'

Logs:

time=2019-01-04T11:43:12.915Z | lvl=DEBUG | corr=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | trans=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | op=IoTAgentNGSI.GenericMiddlewares | srv=openiot | subsrv=/ | msg=Request for path [/iot/devices] from [localhost:4041] | comp=IoTAgent
time=2019-01-04T11:43:12.915Z | lvl=DEBUG | corr=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | trans=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | op=IoTAgentNGSI.GenericMiddlewares | srv=openiot | subsrv=/ | msg=Body:
{
    "devices": [
        {
            "device_id": "motion001",
            "entity_name": "urn:ngsd-ld:Motion:001",
            "entity_type": "Motion",
            "protocol": "PDI-IoTA-UltraLight",
            "transport": "MQTT",
            "timezone": "Europe/Berlin",
            "attributes": [
                {
                    "object_id": "c",
                    "name": "count",
                    "type": "Integer"
                }
            ],
            "static_attributes": [
                {
                    "name": "refStore",
                    "type": "Relationship",
                    "value": "urn:ngsi-ld:Store:001"
                }
            ]
        }
    ]
}
 | comp=IoTAgent
time=2019-01-04T11:43:12.916Z | lvl=DEBUG | corr=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | trans=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | op=IoTAgentNGSI.DeviceProvisioning | srv=openiot | subsrv=/ | msg=Handling device provisioning request. | comp=IoTAgent
time=2019-01-04T11:43:12.916Z | lvl=DEBUG | corr=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | trans=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=openiot | subsrv=/ | msg=Looking for group params ["service","subservice","type"] with queryObj {"service":"openiot","subservice":"/","type":"Motion"} | comp=IoTAgent
time=2019-01-04T11:43:12.920Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["service","subservice","type"]] not found: [{"service":"openiot","subservice":"/","type":"Motion"}] | comp=IoTAgent
time=2019-01-04T11:43:12.920Z | lvl=ERROR | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.Alarms | srv=n/a | subsrv=n/a | msg=Raising [MONGO-ALARM]: {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group","code":404} | comp=IoTAgent
time=2019-01-04T11:43:12.920Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.BidirectionalPlugin | srv=n/a | subsrv=n/a | msg=Extracting attribute list | comp=IoTAgent
time=2019-01-04T11:43:12.920Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.BidirectionalPlugin | srv=n/a | subsrv=n/a | msg=Sending bidirectionality subscriptions for device [motion001] | comp=IoTAgent
time=2019-01-04T11:43:12.921Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.IOTAMService | srv=n/a | subsrv=n/a | msg=Looking for bindings for the function [deviceProvisioningHandler] and protocol [null] | comp=IoTAgent
time=2019-01-04T11:43:12.921Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.IOTAMService | srv=n/a | subsrv=n/a | msg=Binding found for function [deviceProvisioningHandler] and protocol [null] | comp=IoTAgent
time=2019-01-04T11:43:12.921Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Looking for device with id [motion001]. | comp=IoTAgent
time=2019-01-04T11:43:12.923Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Device [motion001] not found. | comp=IoTAgent
time=2019-01-04T11:43:12.924Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["service","subservice","type"] with queryObj {"service":"openiot","subservice":"/","type":"Motion"} | comp=IoTAgent
time=2019-01-04T11:43:12.925Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["service","subservice","type"]] not found: [{"service":"openiot","subservice":"/","type":"Motion"}] | comp=IoTAgent
time=2019-01-04T11:43:12.926Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=deviceData: {"id":"motion001","type":"Motion","name":"urn:ngsd-ld:Motion:001","service":"openiot","subservice":"/","active":[{"object_id":"c","name":"count","type":"Integer"}],"staticAttributes":[{"name":"refStore","type":"Relationship","value":"urn:ngsi-ld:Store:001"}],"timezone":"Europe/Berlin","protocol":"PDI-IoTA-UltraLight","transport":"MQTT","internalId":null,"subscriptions":[]} | comp=IoTAgent
time=2019-01-04T11:43:12.927Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=deviceData2: {"id":"motion001","type":"Motion","name":"urn:ngsd-ld:Motion:001","service":"openiot","subservice":"/","active":[{"object_id":"c","name":"count","type":"Integer"}],"staticAttributes":[{"name":"refStore","type":"Relationship","value":"urn:ngsi-ld:Store:001"}],"lazy":null,"commands":[],"timezone":"Europe/Berlin","protocol":"PDI-IoTA-UltraLight","transport":"MQTT","internalId":null,"subscriptions":[]} | comp=IoTAgent
time=2019-01-04T11:43:12.928Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Registering device into NGSI Service:
{
    "id": "motion001",
    "type": "Motion",
    "name": "urn:ngsd-ld:Motion:001",
    "service": "openiot",
    "subservice": "/",
    "active": [
        {
            "object_id": "c",
            "name": "count",
            "type": "Integer"
        }
    ],
    "staticAttributes": [
        {
            "name": "refStore",
            "type": "Relationship",
            "value": "urn:ngsi-ld:Store:001"
        }
    ],
    "lazy": null,
    "commands": [],
    "timezone": "Europe/Berlin",
    "protocol": "PDI-IoTA-UltraLight",
    "transport": "MQTT",
    "internalId": null,
    "subscriptions": []
} | comp=IoTAgent
time=2019-01-04T11:43:12.931Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=No Context Provider registrations found for unregister | comp=IoTAgent
time=2019-01-04T11:43:12.932Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Creating initial entity in the Context Broker:
 {
    "url": "http://orion:1026/v1/updateContext",
    "method": "POST",
    "json": {
        "contextElements": [
            {
                "type": "Motion",
                "isPattern": "false",
                "id": "urn:ngsd-ld:Motion:001",
                "attributes": [
                    {
                        "name": "count",
                        "type": "Integer",
                        "value": " "
                    },
                    {
                        "name": "refStore",
                        "type": "Relationship",
                        "value": "urn:ngsi-ld:Store:001"
                    },
                    {
                        "name": "TimeInstant",
                        "type": "ISO8601",
                        "value": " "
                    }
                ]
            }
        ],
        "updateAction": "APPEND"
    },
    "headers": {
        "fiware-service": "openiot",
        "fiware-servicepath": "/",
        "fiware-correlator": "16a153ce-7f56-4716-b34b-0a80132b8d31"
    }
} | comp=IoTAgent
time=2019-01-04T11:43:12.935Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=executeWithSecurity | comp=IoTAgent
time=2019-01-04T11:43:12.936Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"Motion"} | comp=IoTAgent
time=2019-01-04T11:43:12.939Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"Motion"}] | comp=IoTAgent
time=2019-01-04T11:43:12.940Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group","code":404} in get group device | comp=IoTAgent
time=2019-01-04T11:43:12.980Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Initial entity created successfully. | comp=IoTAgent
time=2019-01-04T11:43:12.983Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Storing device with id [motion001] and type [Motion] | comp=IoTAgent
time=2019-01-04T11:43:13.010Z | lvl=ERROR | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.Alarms | srv=n/a | subsrv=n/a | msg=Releasing [MONGO-ALARM] | comp=IoTAgent
time=2019-01-04T11:43:13.010Z | lvl=DEBUG | corr=16a153ce-7f56-4716-b34b-0a80132b8d31 | trans=16a153ce-7f56-4716-b34b-0a80132b8d31 | op=IoTAgentNGSI.DeviceProvisioning | srv=n/a | subsrv=n/a | msg=Device provisioning request succeeded | comp=IoTAgent
time=2019-01-04T11:43:13.013Z | lvl=DEBUG | corr=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | trans=5d95adfc-9e2d-4b6d-8616-67370c5248b4 | op=IoTAgentNGSI.DomainControl | srv=openiot | subsrv=/ | msg=response-time: 98 | comp=IoTAgent

@fgalan
Copy link
Member

fgalan commented Jan 8, 2019

Appart from the [MONGO-ALARM] message you get in the logs, is the IOTA working as expected? Or something else is not working?

@karaleina
Copy link
Author

karaleina commented Jan 9, 2019

Well, yes, I think that implies a problem with the next steps from the tutorial.

After steps described above, I make publish to Mosquito:

docker run -it --rm --name mqtt-publisher --network \
  fiware_default efrecon/mqtt-client pub -h mosquitto -m "c|1" \
  -t "/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs" 

I receive this logs:

time=2019-01-09T11:43:02.115Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:43:02.117Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:43:02.117Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs] | comp=IoTAgent

Then, I make a query to Context Broker to obtain entity with actualizated context from IoT Agent:

curl -X GET 'http://localhost:1026/v2/entities/urn:ngsi-ld:Motion:001?type=Motion' -H 'fiware-service: openiot' -H 'fiware-servicepath: /'

Despite what is said in the tutorial, I don't get actualizated count value. Recieved JSON:

{
  "id": "urn:ngsi-ld:Motion:001",
  "type": "Motion",
  "TimeInstant": {
    "type": "ISO8601",
    "value": " ",
    "metadata": {}
  },
  "count": {
    "type": "Integer",
    "value": " ",
    "metadata": {}
  },
  "refStore": {
    "type": "Relationship",
    "value": "urn:ngsi-ld:Store:001",
    "metadata": {}
  }
}

Logs:

time=2019-01-09T11:47:58.585Z | lvl=DEBUG | corr=85367ddf-5603-4f33-ab06-04a23de059d5 | trans=85367ddf-5603-4f33-ab06-04a23de059d5 | op=IoTAgentNGSI.GenericMiddlewares | srv=n/a | subsrv=n/a | msg=Request for path [/iot/about] from [localhost:4041] | comp=IoTAgent
time=2019-01-09T11:47:58.586Z | lvl=DEBUG | corr=85367ddf-5603-4f33-ab06-04a23de059d5 | trans=85367ddf-5603-4f33-ab06-04a23de059d5 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 1 | comp=IoTAgent
time=2019-01-09T11:48:04.777Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:04.780Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:04.781Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp001/attrs] | comp=IoTAgent
time=2019-01-09T11:48:06.786Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:06.788Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:06.788Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp002/attrs] | comp=IoTAgent
time=2019-01-09T11:48:08.789Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:08.792Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:08.792Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp003/attrs] | comp=IoTAgent
time=2019-01-09T11:48:10.775Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:10.778Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:10.778Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp004/attrs] | comp=IoTAgent
time=2019-01-09T11:48:12.784Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:12.787Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:12.787Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs] | comp=IoTAgent
time=2019-01-09T11:48:14.773Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:14.777Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:14.777Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion002/attrs] | comp=IoTAgent
time=2019-01-09T11:48:16.771Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:16.774Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:16.774Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion003/attrs] | comp=IoTAgent
time=2019-01-09T11:48:18.768Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:48:18.772Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:48:18.773Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion004/attrs] | comp=IoTAgent
time=2019-01-09T11:48:28.746Z | lvl=DEBUG | corr=c15bb9e8-eb9a-44ea-ae3b-ccd17437f399 | trans=c15bb9e8-eb9a-44ea-ae3b-ccd17437f399 | op=IoTAgentNGSI.GenericMiddlewares | srv=n/a | subsrv=n/a | msg=Request for path [/iot/about] from [localhost:4041] | comp=IoTAgent
time=2019-01-09T11:48:28.747Z | lvl=DEBUG | corr=c15bb9e8-eb9a-44ea-ae3b-ccd17437f399 | trans=c15bb9e8-eb9a-44ea-ae3b-ccd17437f399 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 1 | comp=IoTAgent
time=2019-01-09T11:48:58.890Z | lvl=DEBUG | corr=1ba217fc-91bb-4390-8c9d-6b1f9634fc7f | trans=1ba217fc-91bb-4390-8c9d-6b1f9634fc7f | op=IoTAgentNGSI.GenericMiddlewares | srv=n/a | subsrv=n/a | msg=Request for path [/iot/about] from [localhost:4041] | comp=IoTAgent
time=2019-01-09T11:48:58.891Z | lvl=DEBUG | corr=1ba217fc-91bb-4390-8c9d-6b1f9634fc7f | trans=1ba217fc-91bb-4390-8c9d-6b1f9634fc7f | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 1 | comp=IoTAgent
time=2019-01-09T11:49:04.779Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:04.782Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:04.782Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp001/attrs] | comp=IoTAgent
time=2019-01-09T11:49:06.786Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:06.790Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:06.790Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp002/attrs] | comp=IoTAgent
time=2019-01-09T11:49:08.790Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:08.794Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:08.795Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp003/attrs] | comp=IoTAgent
time=2019-01-09T11:49:10.776Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:10.779Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:10.779Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/lamp004/attrs] | comp=IoTAgent
time=2019-01-09T11:49:12.784Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:12.788Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:12.788Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs] | comp=IoTAgent
time=2019-01-09T11:49:14.774Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:14.778Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:14.778Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion002/attrs] | comp=IoTAgent
time=2019-01-09T11:49:16.771Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:16.774Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:16.775Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion003/attrs] | comp=IoTAgent
time=2019-01-09T11:49:18.767Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:18.771Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:18.771Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion004/attrs] | comp=IoTAgent
time=2019-01-09T11:49:21.964Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"} | comp=IoTAgent
time=2019-01-09T11:49:21.965Z | lvl=DEBUG | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"4jggokgpepnvsb2uv4s40d59ov"}] | comp=IoTAgent
time=2019-01-09T11:49:21.966Z | lvl=ERROR | corr=62605862-d446-4d1d-a9ea-5b2d68e80e47 | trans=62605862-d446-4d1d-a9ea-5b2d68e80e47 | op=IOTAUL.Common.Binding | srv=n/a | subsrv=n/a | msg=MEASURES-005: Error before processing device measures [/4jggokgpepnvsb2uv4s40d59ov/motion001/attrs] | comp=IoTAgent
time=2019-01-09T11:49:29.002Z | lvl=DEBUG | corr=bbb89881-1c1a-4318-89cc-024f080f54a5 | trans=bbb89881-1c1a-4318-89cc-024f080f54a5 | op=IoTAgentNGSI.GenericMiddlewares | srv=n/a | subsrv=n/a | msg=Request for path [/iot/about] from [localhost:4041] | comp=IoTAgent
time=2019-01-09T11:49:29.003Z | lvl=DEBUG | corr=bbb89881-1c1a-4318-89cc-024f080f54a5 | trans=bbb89881-1c1a-4318-89cc-024f080f54a5 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 1 | comp=IoTAgent

@fgalan
Copy link
Member

fgalan commented Jan 14, 2019

Unfortunatelly it is not evident to me the cause of the problem looking to your report... sorry.

I'm CCinig @dcalvoalonso (another IOTA developer) and @jason-fox (author of the tutorial you cite) in the hope they can provide more useful feedback.

@dcalvoalonso
Copy link
Contributor

I have checked the problem and I think that there are several issues with https://github.com/Fiware/tutorials.IoT-over-MQTT:

If you try to do the configuration provisioning with:

curl -iX POST   'http://localhost:4041/iot/services'   -H 'Content-Type: application/json'   -H 'fiware-service: openiot'   -H 'fiware-servicepath: /'   -d '{
 "services": [
   {
     "apikey":      "4jggokgpepnvsb2uv4s40d59ov",
     "cbroker":     "http://orion:1026",
     "entity_type": "Thing",
     "resource":    "/iot/d"
   }                     
 ]                                  
}'

And the device provisioning with:

curl -iX POST \
  'http://localhost:4041/iot/devices' \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: openiot' \
  -H 'fiware-servicepath: /' \
  -d '{
 "devices": [
   {
     "device_id":   "motion001",
     "entity_name": "urn:ngsi-ld:Motion:001",
     "entity_type": "Thing",
     "protocol":    "PDI-IoTA-UltraLight",
     "transport":   "MQTT",
     "timezone":    "Europe/Berlin",
     "attributes": [
       { "object_id": "c", "name": "count", "type": "Integer" }
     ],
     "static_attributes": [
       { "name":"refStore", "type": "Relationship", "value": "urn:ngsi-ld:Store:001"}
     ]
   }
 ]
}
'

It should work. Please note also that in order to call to the CB you should do:

curl -X GET   'http://localhost:1026/v2/entities/urn:ngsi-ld:Motion:001?type=Thing'   -H 'fiware-service: openiot'   -H 'fiware-servicepath: /'

Please confirm that it works properly and we can open a PR to https://github.com/Fiware/tutorials.IoT-over-MQTT.

@jason-fox
Copy link
Contributor

jason-fox commented Jan 16, 2019

@dcalvoalonso I agree with your analysis that altering the request to include:

"resource":    "/iot/d"

should work as a simple workaround.

However I'm not sure if the proper fix to this is a change to the tutorial or to the source code of Ultralight. in the previous release 1.7 if an MQTT measure arrived , when the flow of the code looked for a service group resource was ignored. Therefore the tutorial (setting the resource to blank) was fine when run against 1.7. The behaviour of the iot agent has changed for current release .1.8 and I can't see where the change has been documented, so maybe this is unexpected behaviour.

Either way it is fair to say that the current tutorial doesn't work with the current IoT Agent and one of them (or both) needs to be fixed.

I thought that setting the resource attribute only makes sense for HTTP requests, where resource is part of the URL, for an MQTT . request the topic won't contain a resource, so it would make sense to provision a device without a resource no? Hence I thought the previous 1.7 behaviour was correct.

If you do a search for defaultResource you'll find that it generally relates to constants.HTTP_MEASURE_PATH but is also present in the commonBindings.js which is also used by MQTT - the default config in the Docker container is using /iot/d and therefore the service group provisioning now require the presence of a repeat of the defaultResource string in the request - I'm not sure if this is correct if defaultResource is supposed to be HTTP related.

Does the current setting in the config.js make sense? Is the new behaviour expected? Would a blank be a better default value in the config? Should defaultResource be ignored when checking for service groups when receiving an MQTT measure?

Regarding anonymous thing provisioning, I think this is probably better tackled as a separate issue on the tutorials - there needs to be examples of both group and device provisioning and the tutorial should demonstrate both (and recommend best practice and realistic reasons for using alternatives)

@dcalvoalonso
Copy link
Contributor

I thought that setting the resource attribute only makes sense for HTTP requests, where resource is part of the URL, for an MQTT . request the topic won't contain a resource, so it would make sense to provision a device without a resource no? Hence I thought the previous 1.7 behaviour was correct.

I agree with this analysis @jason-fox. @fgalan @AlvaroVega what do you think??

@dcalvoalonso
Copy link
Contributor

@fgalan Have you had the chance to take a look at this issue?

@fgalan
Copy link
Member

fgalan commented Jan 22, 2019

It's in my TODO list :) I hope to being able of providing a comment soon...

@dcalvoalonso
Copy link
Contributor

Great, no problem at all! ;)

@karaleina
Copy link
Author

karaleina commented Jan 23, 2019

OK, I confirm that this workaround of @dcalvoalonso works fine from perspective of this tutorial issue :).

Actually, I have a plan to use FIWARE with IoT Agent in the near future, so that would be a great help to have right documentation (and preferably the tutorial) compatible with current version. I am looking forward to that :).

@fgalan
Copy link
Member

fgalan commented Feb 7, 2019

In theory, resource works as follows, with two usages:

  1. It is used in the IOTA->IOTAManager registration process. Within a given protocol, resource identifies a particular instance of the agent. The combination of protocol and resource is used by IOTAManager to identify to which IOTA to forward a given request. In scenarios without IOTAManager (as the tutorial one) this usage shouldn't have any effect.
  2. It is used as listening endpoint to received measures sent by the devides. What "endpoint" means is up to the interpretation of the particular transport. In the case of HTTP, it can be interpreted as a URL endpoint. In the case of MQTT, it can be interpreted as part of the topic. This was at least the intendent behaviour, as far as I remember the IOTAs (at least some of them for some protocols) doesn't allow such flexibility right now and the endpoint is hardwired. For instance, in the case of MQTT I think the topic is structure <apikey>/<deviceid> if I'm remembering correctly and resource is not involved (not fully sury, but almost sure :).

The tutorial scenario doesn't uses IOTAManager, so usage 1 doesn't apply in this case. However, regarding usage 2, probably you need to specify the resource (although, as I mention above, current implementation doesn't has the flexbility to use it properly as endpoint).

I may be wrong. If somebody has additional fact to support/ammend my argument, please tell.

CC: @manucarrace @AlvaroVega @mrutid

@fgalan
Copy link
Member

fgalan commented Feb 7, 2019

Regarding the change of behaviour between IOTA-UL 1.7 and 1.8 (both in agent an in the library) I have a look but I has been unable to find any change related to this. Thus, I'm unable to explain why the tutorial was working with before with "" and now it needs "/iot/d".

These are the links, if somebody wants to have a try:

1.7.0...1.8.0
telefonicaid/iotagent-node-lib@2.7.0...2.8.1

@jason-fox
Copy link
Contributor

jason-fox commented Apr 11, 2019

@mrutid @fgalan @dcalvoalonso

Tracking down the MQTT issue, the problem lies within the retrieveDevice() function - specifically this line: https://github.com/telefonicaid/iotagent-ul/blob/master/lib/iotaUtils.js#L167

if (apiKey === config.getConfig().defaultKey) {
   /// etc
} else {
    async.waterfall(
        [
            apply(iotAgentLib.getConfiguration, config.getConfig().iota.defaultResource, apiKey),
            apply(findOrCreate, deviceId, transport),
            mergeDeviceWithConfiguration
        ],
        callback
    );
}

The defaultKey in the Config is TEF. In the MQTT tutorial the provisioning is overriding the key to
a random string 4jggokgpepnvsb2uv4s40d59ov:

When an appropriate MQTT topic is posted, the else clause is fired, and the defaultResource is always supplied as a parameter:

https://github.com/telefonicaid/iotagent-ul/blob/master/lib/iotaUtils.js#L189

A fix to previous functionality would be to only set config.getConfig().iota.defaultResource if the transport is HTTP - I think that it should remain irrelevant for MQTT and AMPQ right?

This also explains why the proposed "fix/workaround" on the library works - blank '' and blank '' match so the group can be found in the DB. Currently the default can't be set to blank due to truthiness issues.

I can also "fix/workaround" the tutorial by using the default key as found in the Ultralight default config:

config.defaultKey = 'TEF';

However config.defaultKey is not overridable using a Docker ENV variable.

So this can be fixed in several ways:

  1. Allow blank '' as a defaultResource
  2. Only use defaultResource if transport === 'HTTP'
  3. Create an ENV to override the defaultKey

Of these:

  1. is a nice to have - it fixes the issue if you're using MQTT only
  2. If this is implemented, 1 is probably unnecessary (but I could want to listen to HTTP traffic on root maybe)
  3. is just a partial workaround - you could be listening to multiple MQTT topics would need to be combined with 1 and/or 2.

How would you like me to proceed with this?

jason-fox added a commit to jason-fox/iotagent-ul that referenced this issue Apr 11, 2019
…1.7.0

Only set default resource if using the HTTP Transport. Use blank otherwise.
@fgalan
Copy link
Member

fgalan commented Nov 27, 2019

I was reviewing old issues and I found this one opened :)

So this can be fixed in several ways:

  1. Allow blank '' as a defaultResource
  2. Only use defaultResource if transport === 'HTTP'
  3. Create an ENV to override the defaultKey

As far as I understand, telefonicaid/iotagent-node-lib#773 (merged in October) implemented solution 1.

Thus, can this issue be closed? Or is something pending? @jason-fox what do you think?

@jason-fox
Copy link
Contributor

jason-fox commented Nov 28, 2019

@fgalan - That is also my understanding. The relevant MQTT tutorial has already been updated to reflect this.

@fgalan
Copy link
Member

fgalan commented Nov 28, 2019

Thanks for the feedback! Closing

If somebody has another opinion and think there is something pending, please tell so (the issue can be reopened if needed or creating a new fresh one with the pending parts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants