I am using Orion and Mongo with Docker, installed as the Fastest Way section of the documentation. All of them are in the same server.
I am able to connect them, and deal with entities and subscriptions (create, update, delete working fine), using volume and persisting my data even after rebooting everything. The annoying part is that Orion continuously send the error message:
mongoConnectionPool.cpp[194]: Database Error (connection failed, after 100 retries: 'couldn't connect to server localhost:27017 (127.0.0.1) failed, connection attempt failed'
Why does Orion give this message if he actually do connect and update information in Mongo? What this message imply and how can I remove it?
Notes:
contextBroker --version: 0.26.1
Docker version 1.10.3, build 20f81dd
mongod --version: db version v2.6.11
@Cortwave pointed me out to the solution of this issue.
I do have a link to orion and mongo in my docker-compose.yml
file. It's a line under the orion's section:
orion:
command: -dbhost mongo
But when I stop only the orion container docker stop orion
, and start it again docker start orion
, the link is missed.
To fix this, I can stop and start both the containers with docker-compose stop/start
or, when I stop only orion, I can insert the db information with docker start orion -dbhost mongo
when start it.