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

VerneMQ does not reconnect to mongoDB if Database is restarted #475

Closed
KnolBee opened this issue Aug 4, 2017 · 9 comments
Closed

VerneMQ does not reconnect to mongoDB if Database is restarted #475

KnolBee opened this issue Aug 4, 2017 · 9 comments
Assignees
Labels

Comments

@KnolBee
Copy link

KnolBee commented Aug 4, 2017

Environment

  • VerneMQ Version: 1.1.0
  • OS: Ubuntu 16.04
  • Erlang/OTP version (if building from source):

Expected behavior

  • Restart of MongoDB shouldn't force restart of VerneMQ

Actual behaviour

  • If MongoDB is restarted, VerneMQ stops authenticating until restarted.
@ioolkos
Copy link
Contributor

ioolkos commented Aug 4, 2017

@KnolBee thanks for pointing that out. That's totally unfortunate.
@larshesel @dergraf Is there some trick to restart the connection pool? or should it work out of the box anyway?

@larshesel larshesel changed the title VerneMQ does reconnect to mongoDB if Database is restarted VerneMQ does not reconnect to mongoDB if Database is restarted Aug 7, 2017
@larshesel
Copy link
Contributor

This looks like a bug - I'll investigate soon.

@larshesel larshesel added the bug label Aug 7, 2017
@larshesel
Copy link
Contributor

I can confirm this - the child connections are restarted until the supervisor reaches its max restart intensity and shuts down taking vmq_diversity with it.

@KnolBee
Copy link
Author

KnolBee commented Aug 21, 2017

Thanks @larshesel are there plans to fix this? This is definitely a blocker for production use of MongoDB authentication module.

@larshesel
Copy link
Contributor

It will be fixed but I can't give a time frame ATM.

@larshesel
Copy link
Contributor

Btw. I forgot to answer if there was some workaround to this. I would expect - but haven't tested it - that if you restart the vmq_diversity plugin then the pools should get reinitialized. I'll try to spend some time on this issue today.

@larshesel
Copy link
Contributor

Hi @KnolBee , I've a branch in #491 which should fix this issue. Could you test that out? Next I'd try to bring in an upgraded mongodb driver.

@larshesel
Copy link
Contributor

Merged

@KnolBee
Copy link
Author

KnolBee commented Sep 22, 2017

Hi @larshesel Ok great, Will test over the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants