我正在使用 FIWARE 平台上的 LWM2M 设备(使用 Orion CB)在 IoT 上设置演示。但是,轻量级 m2m-iotagent 无法连接到 mongodb。知道为什么会这样吗?以下是我得到的错误:
{
"message": "Cannot read property 'findOne' of undefined",
"name": "TypeError"
}
我正在使用 docker-compose 文件(如下)来启动所有服务。
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"