我们一起使用 Idas / 猎户座 / Mongo (码头工作版)和 Cygnus 以便发送数据给Ckan和Cosmos。
我们模拟了100个传感器,每3分钟发送一次数据,这种方法在2天后停止工作,我检查了IDAS和Orion日志,并在日志中看到这些Mongodb错误,没有任何通知组件不再。
Idas日志:
failed time=2016-05-25T11:30:13,852.191UTC | lvl=ERROR | comp=iota:Manager | op=checkIndexes | file=[140414053451808:admin_service.cc:148] | msg=Check configuration, error in checkIndexes DBException can't connect couldn't connect to server 172.17.0.2:27017 (172.17.0.2), connection attempt failed
time=2016-05-25T11:30:13,853.966UTC | lvl=ERROR | comp=iota:Manager | op=conn | file=[140414053451808:mongo_connection.cc:254] | msg=It has reached the maximum mongo pool
time=2016-05-25T11:30:13,853.993UTC | lvl=ERROR | comp=iota:Manager | op=conn | file=[140414053451808:mongo_connection.cc:258] | msg=create a new con
猎户座日志:
time=2016-05-25T11:30:04.948UTC | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=main | comp=Orion | msg=contextBroker.cpp[1719]: Orion Context Broker is running
time=2016-05-25T11:30:04.964UTC | lvl=ERROR | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=mongoConnect | comp=Orion | msg=mongoConnectionPool.cpp[140]: Database Startup Error (cannot connect to mongo - doing 100 retries with a 1000 microsecond interval)
time=2016-05-25T11:30:05.969UTC | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=mongoConnect | comp=Orion | msg=mongoConnectionPool.cpp[205]: Successful connection to database
time=2016-05-25T11:30:05.970UTC | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=setWriteConcern | comp=Orion | msg=connectionOperations.cpp[681]: Database Operation Successful (setWriteConcern: 1)
time=2016-05-25T11:30:05.970UTC | lvl=INFO | trans=N/A | srv=N/A | subsrv=N/A | from=N/A | function=getWriteConcern | comp=Orion | msg=connectionOperations.cpp[724]: Database Operation Successful (getWriteConcern)
`
您认为这与发送给Idas的数据数量有关吗?由于最大连接超过,mongodb停止了?
谢谢
答案 0 :(得分:1)
Orion在无法访问数据库时显示cannot connect to mongo - doing 100 retries with a 1000 microsecond interval
错误,例如当mongod服务器关闭时。我不是IDAS的专家,但我说couldn't connect to server 172.17.0.2:27017 (172.17.0.2), connection attempt failed
错误导致了同样的原因。
因此,该问题的解决方案是确保MongoDB启动并运行并可从Orion和IDAS访问。