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

Cannot use multiple replicaset instances which run on different ports #46

Closed
markunsworth opened this Issue Oct 20, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@markunsworth
Contributor

markunsworth commented Oct 20, 2014

It's not possible to use the _HOST config key with port numbers included because the host and port values are being concatenated.

This is particularly problematic when using several seeds to connect to a replicaset:

MONGO_HOST='morton.local:30000,morton.local:30001,morton.local:30002'

The better way to do this is to pass the port number to the pymongo connection class (mongoclient or mongoreplicaset client) and leave pymongo to decide on whether to use the port

markunsworth pushed a commit to knowsis/flask-pymongo that referenced this issue Oct 20, 2014

Mark Unsworth
changed init to pass the port to the connnection class rather than tr…
…ying to append it to the host value. Resolves issue #46. Added a test for this behaviour.

markunsworth pushed a commit to knowsis/flask-pymongo that referenced this issue Oct 21, 2014

Mark Unsworth
fix for issue #46 where port number was being concatenated with the h…
…ost value.

added test for above condition
Added pyc files to the gitignore file
@dcrosta

This comment has been minimized.

Show comment
Hide comment
@dcrosta

dcrosta Jan 17, 2015

Owner

Closed in #49

Owner

dcrosta commented Jan 17, 2015

Closed in #49

@dcrosta dcrosta closed this Jan 17, 2015

blade2005 pushed a commit to blade2005/flask-pymongo that referenced this issue Feb 10, 2017

Mark Unsworth Craig Davis
fix for issue #46 where port number was being concatenated with the h…
…ost value.

added test for above condition
Added pyc files to the gitignore file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment