MongoDB Cluster connection failed with PyDAL











up vote
-1
down vote

favorite
2












Not able to connect to mongoDB when i'm using cluster, But its working for single mongodb node, will pydal support mongodb cluster.



eg:



Not Working:



(from pydal import DAL)

DAL("mongodb://username:password@host1:port,host2:port,host3:port/admin?replicaSet=replicationsetname")

Working:
DAL("mongodb://username:password@host1:port/admin")


~/anaconda3/lib/python3.6/site-packages/pydal/base.py in call(cls, *args, **kwargs)
167 setattr(cls, tup[0], tup[1])
168
--> 169 obj = super(MetaDAL, cls).call(*args, **kwargs)
170 return obj
171



~/anaconda3/lib/python3.6/site-packages/pydal/base.py in init(self, uri, pool_size, folder, db_codec, check_reserved, migrate, fake_migrate, migrate_enabled, fake_migrate_all, decode_credentials, driver_args, adapter_args, attempts, auto_import, bigint_id, debug, lazy_tables, db_uid, do_connect, after_connection, tables, ignore_field_case, entity_quoting, table_hash)
472 if not connected:
473 raise RuntimeError(
--> 474 "Failure to connect, tried %d times:n%s" % (attempts, tb)
475 )
476 else:










share|improve this question
























  • Not working how? Is there an error reported? Does something else not work as expected?
    – Neil Lunn
    2 days ago










  • its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
    – Jagadish S
    2 days ago










  • There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
    – Neil Lunn
    2 days ago












  • what ever you asked i have added
    – Jagadish S
    2 days ago















up vote
-1
down vote

favorite
2












Not able to connect to mongoDB when i'm using cluster, But its working for single mongodb node, will pydal support mongodb cluster.



eg:



Not Working:



(from pydal import DAL)

DAL("mongodb://username:password@host1:port,host2:port,host3:port/admin?replicaSet=replicationsetname")

Working:
DAL("mongodb://username:password@host1:port/admin")


~/anaconda3/lib/python3.6/site-packages/pydal/base.py in call(cls, *args, **kwargs)
167 setattr(cls, tup[0], tup[1])
168
--> 169 obj = super(MetaDAL, cls).call(*args, **kwargs)
170 return obj
171



~/anaconda3/lib/python3.6/site-packages/pydal/base.py in init(self, uri, pool_size, folder, db_codec, check_reserved, migrate, fake_migrate, migrate_enabled, fake_migrate_all, decode_credentials, driver_args, adapter_args, attempts, auto_import, bigint_id, debug, lazy_tables, db_uid, do_connect, after_connection, tables, ignore_field_case, entity_quoting, table_hash)
472 if not connected:
473 raise RuntimeError(
--> 474 "Failure to connect, tried %d times:n%s" % (attempts, tb)
475 )
476 else:










share|improve this question
























  • Not working how? Is there an error reported? Does something else not work as expected?
    – Neil Lunn
    2 days ago










  • its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
    – Jagadish S
    2 days ago










  • There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
    – Neil Lunn
    2 days ago












  • what ever you asked i have added
    – Jagadish S
    2 days ago













up vote
-1
down vote

favorite
2









up vote
-1
down vote

favorite
2






2





Not able to connect to mongoDB when i'm using cluster, But its working for single mongodb node, will pydal support mongodb cluster.



eg:



Not Working:



(from pydal import DAL)

DAL("mongodb://username:password@host1:port,host2:port,host3:port/admin?replicaSet=replicationsetname")

Working:
DAL("mongodb://username:password@host1:port/admin")


~/anaconda3/lib/python3.6/site-packages/pydal/base.py in call(cls, *args, **kwargs)
167 setattr(cls, tup[0], tup[1])
168
--> 169 obj = super(MetaDAL, cls).call(*args, **kwargs)
170 return obj
171



~/anaconda3/lib/python3.6/site-packages/pydal/base.py in init(self, uri, pool_size, folder, db_codec, check_reserved, migrate, fake_migrate, migrate_enabled, fake_migrate_all, decode_credentials, driver_args, adapter_args, attempts, auto_import, bigint_id, debug, lazy_tables, db_uid, do_connect, after_connection, tables, ignore_field_case, entity_quoting, table_hash)
472 if not connected:
473 raise RuntimeError(
--> 474 "Failure to connect, tried %d times:n%s" % (attempts, tb)
475 )
476 else:










share|improve this question















Not able to connect to mongoDB when i'm using cluster, But its working for single mongodb node, will pydal support mongodb cluster.



eg:



Not Working:



(from pydal import DAL)

DAL("mongodb://username:password@host1:port,host2:port,host3:port/admin?replicaSet=replicationsetname")

Working:
DAL("mongodb://username:password@host1:port/admin")


~/anaconda3/lib/python3.6/site-packages/pydal/base.py in call(cls, *args, **kwargs)
167 setattr(cls, tup[0], tup[1])
168
--> 169 obj = super(MetaDAL, cls).call(*args, **kwargs)
170 return obj
171



~/anaconda3/lib/python3.6/site-packages/pydal/base.py in init(self, uri, pool_size, folder, db_codec, check_reserved, migrate, fake_migrate, migrate_enabled, fake_migrate_all, decode_credentials, driver_args, adapter_args, attempts, auto_import, bigint_id, debug, lazy_tables, db_uid, do_connect, after_connection, tables, ignore_field_case, entity_quoting, table_hash)
472 if not connected:
473 raise RuntimeError(
--> 474 "Failure to connect, tried %d times:n%s" % (attempts, tb)
475 )
476 else:







python mongodb pydal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago

























asked 2 days ago









Jagadish S

14




14












  • Not working how? Is there an error reported? Does something else not work as expected?
    – Neil Lunn
    2 days ago










  • its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
    – Jagadish S
    2 days ago










  • There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
    – Neil Lunn
    2 days ago












  • what ever you asked i have added
    – Jagadish S
    2 days ago


















  • Not working how? Is there an error reported? Does something else not work as expected?
    – Neil Lunn
    2 days ago










  • its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
    – Jagadish S
    2 days ago










  • There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
    – Neil Lunn
    2 days ago












  • what ever you asked i have added
    – Jagadish S
    2 days ago
















Not working how? Is there an error reported? Does something else not work as expected?
– Neil Lunn
2 days ago




Not working how? Is there an error reported? Does something else not work as expected?
– Neil Lunn
2 days ago












its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
– Jagadish S
2 days ago




its not connecting, Error : Timeout error (RuntimeError: Failure to connect, tried 5 times:)
– Jagadish S
2 days ago












There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
– Neil Lunn
2 days ago






There will be a stack trace along with such an error. Include that content within your question by editing it., Also be as specific about what you have done and what you tried as possible. "Does not work" is not an acceptable explanation of a problem and you need to provide much more detail. AFAIK ( and a quick peruse of source code ) PyDAL does nothing other than hand over the URI to the pymongo driver. I suggest you even try test listings just using pymongo for comparison just to rule that out.
– Neil Lunn
2 days ago














what ever you asked i have added
– Jagadish S
2 days ago




what ever you asked i have added
– Jagadish S
2 days ago

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372251%2fmongodb-cluster-connection-failed-with-pydal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372251%2fmongodb-cluster-connection-failed-with-pydal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'