MongoDB Cluster connection failed with PyDAL
up vote
-1
down vote
favorite
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
add a comment |
up vote
-1
down vote
favorite
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
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
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
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
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
python mongodb pydal
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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