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

Loss of service groups and devices after agent restart #392

Open
dberenguer opened this issue Oct 26, 2019 · 3 comments
Open

Loss of service groups and devices after agent restart #392

dberenguer opened this issue Oct 26, 2019 · 3 comments

Comments

@dberenguer
Copy link

Version 1.10.0

Every time the UL agent is restarted all service groups and devices are lost. The database still contains the items but the API only returns empty lists. As result, UL devices can no longer transmit values to the agent (HTTP 404 response).

@perrolobo
Copy link

perrolobo commented Oct 26, 2019 via email

@dberenguer
Copy link
Author

Like issue #391 doing IOTA_REGISTRY_TYPE=mongodb fixes this problem. I just confirm that this is the default behavior for IOTA_REGISTRY_TYPE commented out.

@fgalan
Copy link
Member

fgalan commented Oct 28, 2019

Like issue #391 doing IOTA_REGISTRY_TYPE=mongodb fixes this problem. I just confirm that this is the default behavior for IOTA_REGISTRY_TYPE commented out.

Yes, that's correct. Please find the following piece of documentation about it (https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/installationguide.md):

deviceRegistry [equivalent to IOTA_REGISTRY_TYPE ]: type of Device Registry to create. Currently, two values are supported: memory and mongodb. If the former is configured, a transient memory-based device registry will be used to register all the devices. This registry will be emptied whenever the process is restarted. If the latter is selected, a MongoDB database will be used to store all the device information, so it will be persistent from one execution to the other. Mongodb databases must be configured in the mongob section (as described bellow)

All real-world utilization cases use mongodb as registry. Memory registry only makes sense for testing and things like that.

Maybe what could be done in the scope of thi issue is to change de default to mongodb (as far as I understand the default right now, i.e. if IOTA_REGISTRY_TYPE is not provided, is memory).

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

3 participants