-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi,
I want provision an LWM2M, services started but lightweightm2m-iotagent failed to connect to mongodb. mongo db is running from server logs. Here's the curl command I issued to provisioned the device:
(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json' \
--header 'Accept: application/json' --header 'fiware-service: factory' --header 'fiware-servicepath: /robots' \
-d @- | python -mjson.tool) <<EOF
{
"devices": [
{
"device_id": "robot1",
"entity_type": "Robot",
"attributes": [
{
"name": "Battery",
"type": "number"
}
],
"lazy": [
{
"name": "Message",
"type": "string"
}
],
"commands": [
{
"name": "Position",
"type": "location"
}
],
"internal_attributes": {
"lwm2mResourceMapping": {
"Battery" : {
"objectType": 7392,
"objectInstance": 0,
"objectResource": 1
},
"Message" : {
"objectType": 7392,
"objectInstance": 0,
"objectResource": 2
},
"Position" : {
"objectType": 7392,
"objectInstance": 0,
"objectResource": 3
}
}
}
}
]
}
EOF
Find below, the error message I am receiving:
{
"message": "Cannot read property 'findOne' of undefined",
"name": "TypeError"
}
I am using the following docker-compose.yml
file to start all services:
version: "3.1"
services:
mongo:
image: mongo:3.2
command: --nojournal
ports:
- "27017:27017"
expose:
- "27017"
orion:
image: fiware/orion
links:
- mongo
ports:
- "1026:1026"
command: -dbhost mongo -logLevel DEBUG
depends_on:
- mongo
expose:
- "1026"
lightweightm2m-iotagent:
image: telefonicaiot/lightweightm2m-iotagent
hostname: idas
links:
- orion
expose:
- "4041"
- "5684"
ports:
- "4041:4041"
- "5684:5684/udp"
mosquitto:
image: ansi/mosquitto
ports:
- "1883:1883"
expose:
- "1883"
Server log:
Shannons-MacBook-Air:Project $ docker-compose logs -f
Attaching to project_lightweightm2m-iotagent_1, project_orion_1, project_wirecloud_1, project_mongo_1, project_postgres_1, project_mosquitto_1
lightweightm2m-iotagent_1 | 2018-11-18T22:18:26: PM2 log: Launching in no daemon mode
lightweightm2m-iotagent_1 | 2018-11-18T22:18:26: PM2 log: App [lwm2mAgent:0] starting in -fork mode-
lightweightm2m-iotagent_1 | 2018-11-18T22:18:26: PM2 log: App [lwm2mAgent:0] online
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.Server","time":"2018-11-18T22:18:30.573Z","lvl":"INFO","msg":"Starting Lightweight M2M Server"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.Server","time":"2018-11-18T22:18:30.579Z","lvl":"INFO","msg":"Memory Device registry selected for Lightweight M2M Library"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.Server","time":"2018-11-18T22:18:30.586Z","lvl":"INFO","msg":"Validating configuration types"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.COAPRouter","time":"2018-11-18T22:18:30.587Z","lvl":"INFO","msg":"Starting COAP Server on port [5684]"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.COAPRouter","time":"2018-11-18T22:18:30.601Z","lvl":"INFO","msg":"COAP Server started successfully"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.Server","time":"2018-11-18T22:18:30.602Z","lvl":"INFO","msg":"Loading routes"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.Server","time":"2018-11-18T22:18:30.603Z","lvl":"INFO","msg":"Loading default handlers"}
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.616Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=Activating IOT Agent NGSI Library. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.617Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=MongoDB Device registry selected for NGSI Library | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.652Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=First connection attempt | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.652Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 1 | comp=IoTAgent
lightweightm2m-iotagent_1 | (node:15) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.746Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:30.747Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:35.748Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 2 | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:35.755Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:35.757Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:40.761Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 3 | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:40.768Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:40.770Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:45.772Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 4 | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:45.783Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:45.783Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.750Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 5 | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.761Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.764Z | lvl=ERROR | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-002: Error found after [5] attempts: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.772Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.NorthboundServer | srv=n/a | subsrv=n/a | msg=Starting IoT Agent listening on port [4041] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.773Z | lvl=DEBUG | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.NorthboundServer | srv=n/a | subsrv=n/a | msg=Using config:
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "logLevel": "DEBUG",
lightweightm2m-iotagent_1 | "contextBroker": {
lightweightm2m-iotagent_1 | "host": "localhost",
lightweightm2m-iotagent_1 | "port": "1026",
lightweightm2m-iotagent_1 | "url": "http://localhost:1026"
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "server": {
lightweightm2m-iotagent_1 | "port": 4041
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "deviceRegistry": {
lightweightm2m-iotagent_1 | "type": "mongodb"
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "mongodb": {
lightweightm2m-iotagent_1 | "host": "localhost",
lightweightm2m-iotagent_1 | "port": "27017",
lightweightm2m-iotagent_1 | "db": "iotagentlm2m"
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "types": {},
lightweightm2m-iotagent_1 | "service": "smartGondor",
lightweightm2m-iotagent_1 | "subservice": "/gardens",
lightweightm2m-iotagent_1 | "providerUrl": "http://localhost:4041",
lightweightm2m-iotagent_1 | "deviceRegistrationDuration": "P1Y",
lightweightm2m-iotagent_1 | "defaultType": "Thing"
wirecloud_1 | /docker-entrypoint.sh: connect: Connection refused
lightweightm2m-iotagent_1 | }
mongo_1 | 2018-11-18T22:18:21.286+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=d17e52d809f0
wirecloud_1 | /docker-entrypoint.sh: line 4: /dev/tcp/postgres/5432: Connection refused
lightweightm2m-iotagent_1 | | comp=IoTAgent
mongo_1 | 2018-11-18T22:18:21.286+0000 I CONTROL [initandlisten] db version v3.2.21
wirecloud_1 | /docker-entrypoint.sh: connect: Connection refused
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.787Z | lvl=INFO | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading NGSI Contect server routes | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:18:50.789Z | lvl=DEBUG | corr=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | trans=bdaee6c3-64cf-4e42-8eed-8d1ace502c9f | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading access validation Templates | comp=IoTAgent
mongo_1 | 2018-11-18T22:18:21.286+0000 I CONTROL [initandlisten] git version: 1ab1010737145ba3761318508ff65ba74dfe8155
wirecloud_1 | /docker-entrypoint.sh: line 11: /dev/tcp/postgres/5432: Connection refused
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.COAPRouter","time":"2018-11-18T22:18:50.797Z","lvl":"DEBUG","msg":"Setting [registration] handler"}
mongo_1 | 2018-11-18T22:18:21.286+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
wirecloud_1 | [2018-11-18 22:18:34 +0000] [13] [INFO] Starting gunicorn 19.3.0
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.COAPRouter","time":"2018-11-18T22:18:50.797Z","lvl":"DEBUG","msg":"Setting [unregistration] handler"}
lightweightm2m-iotagent_1 | {"op":"LWM2MLib.COAPRouter","time":"2018-11-18T22:18:50.798Z","lvl":"DEBUG","msg":"Setting [updateRegistration] handler"}
mongo_1 | 2018-11-18T22:18:21.286+0000 I CONTROL [initandlisten] allocator: tcmalloc
lightweightm2m-iotagent_1 | {"op":"IOTAgent.Global","time":"2018-11-18T22:18:50.798Z","lvl":"INFO","msg":"Agent started"}
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] modules: none
wirecloud_1 | [2018-11-18 22:18:34 +0000] [13] [INFO] Listening at: http://0.0.0.0:8000 (13)
lightweightm2m-iotagent_1 | {"op":"IOTAgent.Executable","time":"2018-11-18T22:18:50.798Z","lvl":"INFO","msg":"Lightweight M2M IoT Agent started"}
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] build environment:
wirecloud_1 | [2018-11-18 22:18:34 +0000] [13] [INFO] Using worker: sync
wirecloud_1 | [2018-11-18 22:18:34 +0000] [17] [INFO] Booting worker with pid: 17
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.945Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Request for path [/iot/devices] from [localhost:4041] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.947Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Body:
lightweightm2m-iotagent_1 | {
wirecloud_1 | [2018-11-18 22:18:34 +0000] [18] [INFO] Booting worker with pid: 18
lightweightm2m-iotagent_1 | "devices": [
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] distmod: debian81
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "device_id": "robot1",
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] distarch: x86_64
lightweightm2m-iotagent_1 | "entity_type": "Robot",
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] target_arch: x86_64
mongo_1 | 2018-11-18T22:18:21.287+0000 I CONTROL [initandlisten] options: { storage: { journal: { enabled: false } } }
lightweightm2m-iotagent_1 | "attributes": [
mongo_1 | 2018-11-18T22:18:21.293+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),,log=(enabled=false),
mongo_1 | 2018-11-18T22:18:21.514+0000 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
lightweightm2m-iotagent_1 | {
mongo_1 | 2018-11-18T22:18:21.516+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
lightweightm2m-iotagent_1 | "name": "Battery",
lightweightm2m-iotagent_1 | "type": "number"
mongo_1 | 2018-11-18T22:18:21.516+0000 I NETWORK [initandlisten] waiting for connections on port 27017
lightweightm2m-iotagent_1 | }
mongo_1 | 2018-11-18T22:18:23.244+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58802 #1 (1 connection now open)
lightweightm2m-iotagent_1 | ],
mongo_1 | 2018-11-18T22:18:23.251+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58804 #2 (2 connections now open)
lightweightm2m-iotagent_1 | "lazy": [
mongo_1 | 2018-11-18T22:18:23.269+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58806 #3 (3 connections now open)
lightweightm2m-iotagent_1 | {
mongo_1 | 2018-11-18T22:18:23.273+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58808 #4 (4 connections now open)
mongo_1 | 2018-11-18T22:18:23.286+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58810 #5 (5 connections now open)
lightweightm2m-iotagent_1 | "name": "Message",
mongo_1 | 2018-11-18T22:18:23.291+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58812 #6 (6 connections now open)
mosquitto_1 | 1542579501: mosquitto version 1.5 starting
lightweightm2m-iotagent_1 | "type": "string"
lightweightm2m-iotagent_1 | }
mongo_1 | 2018-11-18T22:18:23.322+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58814 #7 (7 connections now open)
mosquitto_1 | 1542579501: Using default config.
lightweightm2m-iotagent_1 | ],
mongo_1 | 2018-11-18T22:18:23.326+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58816 #8 (8 connections now open)
mosquitto_1 | 1542579501: Opening ipv4 listen socket on port 1883.
lightweightm2m-iotagent_1 | "commands": [
mongo_1 | 2018-11-18T22:18:23.330+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58818 #9 (9 connections now open)
mosquitto_1 | 1542579501: Opening ipv6 listen socket on port 1883.
lightweightm2m-iotagent_1 | {
mongo_1 | 2018-11-18T22:18:23.362+0000 I NETWORK [initandlisten] connection accepted from 192.168.0.5:58820 #10 (10 connections now open)
lightweightm2m-iotagent_1 | "name": "Position",
mongo_1 | 2018-11-18T22:18:23.478+0000 I INDEX [conn1] build index on: orion.entities properties: { v: 1, key: { location.coords: "2dsphere" }, name: "location.coords_2dsphere", ns: "orion.entities", 2dsphereIndexVersion: 3 }
mongo_1 | 2018-11-18T22:18:23.478+0000 I INDEX [conn1] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
lightweightm2m-iotagent_1 | "type": "location"
mongo_1 | 2018-11-18T22:18:23.480+0000 I INDEX [conn1] build index done. scanned 0 total records. 0 secs
lightweightm2m-iotagent_1 | }
mongo_1 | 2018-11-18T22:18:23.503+0000 I INDEX [conn1] build index on: orion.entities properties: { v: 1, key: { expDate: 1 }, name: "expDate_1", ns: "orion.entities", expireAfterSeconds: 0 }
lightweightm2m-iotagent_1 | ],
mongo_1 | 2018-11-18T22:18:23.503+0000 I INDEX [conn1] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
lightweightm2m-iotagent_1 | "internal_attributes": {
mongo_1 | 2018-11-18T22:18:23.505+0000 I INDEX [conn1] build index done. scanned 0 total records. 0 secs
lightweightm2m-iotagent_1 | "lwm2mResourceMapping": {
lightweightm2m-iotagent_1 | "Battery": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 1
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "Message": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 2
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "Position": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 3
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | ]
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.953Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.DeviceProvisioning | srv=factory | subsrv=/robots | msg=Handling device provisioning request. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.957Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=factory | subsrv=/robots | msg=Looking for device with id [robot1]. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.958Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:43:05.969Z | lvl=DEBUG | corr=aae787e5-9ac0-4800-b3a9-68f745be4e01 | trans=aae787e5-9ac0-4800-b3a9-68f745be4e01 | op=IoTAgentNGSI.DomainControl | srv=factory | subsrv=/robots | msg=response-time: 52 | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.264Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Request for path [/iot/devices] from [localhost:4041] | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.266Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Body:
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "devices": [
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "device_id": "robot1",
lightweightm2m-iotagent_1 | "entity_type": "Robot",
lightweightm2m-iotagent_1 | "attributes": [
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "name": "Battery",
lightweightm2m-iotagent_1 | "type": "number"
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | ],
lightweightm2m-iotagent_1 | "lazy": [
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "name": "Message",
lightweightm2m-iotagent_1 | "type": "string"
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | ],
lightweightm2m-iotagent_1 | "commands": [
lightweightm2m-iotagent_1 | {
lightweightm2m-iotagent_1 | "name": "Position",
lightweightm2m-iotagent_1 | "type": "location"
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | ],
lightweightm2m-iotagent_1 | "internal_attributes": {
lightweightm2m-iotagent_1 | "lwm2mResourceMapping": {
lightweightm2m-iotagent_1 | "Battery": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 1
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "Message": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 2
lightweightm2m-iotagent_1 | },
lightweightm2m-iotagent_1 | "Position": {
lightweightm2m-iotagent_1 | "objectType": 7392,
lightweightm2m-iotagent_1 | "objectInstance": 0,
lightweightm2m-iotagent_1 | "objectResource": 3
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | ]
lightweightm2m-iotagent_1 | }
lightweightm2m-iotagent_1 | | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.267Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.DeviceProvisioning | srv=factory | subsrv=/robots | msg=Handling device provisioning request. | comp=IoTAgent
postgres_1 | 2018-11-18 22:18:29.175 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgres_1 | 2018-11-18 22:18:29.176 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgres_1 | 2018-11-18 22:18:29.185 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1 | 2018-11-18 22:18:29.316 UTC [22] LOG: database system was shut down at 2018-11-18 22:16:34 UTC
postgres_1 | 2018-11-18 22:18:29.363 UTC [1] LOG: database system is ready to accept connections
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.269Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=factory | subsrv=/robots | msg=Looking for device with id [robot1]. | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.271Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.GenericMiddlewares | srv=factory | subsrv=/robots | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent
lightweightm2m-iotagent_1 | time=2018-11-18T22:51:35.274Z | lvl=DEBUG | corr=4abaacf0-9f83-4130-8be8-cadbca29bc99 | trans=4abaacf0-9f83-4130-8be8-cadbca29bc99 | op=IoTAgentNGSI.DomainControl | srv=factory | subsrv=/robots | msg=response-time: 12 | comp=IoTAgent
Metadata
Metadata
Assignees
Labels
No labels