Dont conect - Save-me


Timeout Traceback (most recent call last)
c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\pymongo\uri_parser.py in _get_dns_srv_hosts(hostname)
286 try:
–> 287 results = resolver.query(’_mongodb._tcp.’ + hostname, ‘SRV’)
288 except Exception as exc:

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\dns\resolver.py in query(qname, rdtype, rdclass, tcp, source, raise_on_no_answer, source_port, lifetime)
1101 raise_on_no_answer, source_port,
-> 1102 lifetime)
1103

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\dns\resolver.py in query(self, qname, rdtype, rdclass, tcp, source, raise_on_no_answer, source_port, lifetime)
991 #
–> 992 timeout = self._compute_timeout(start, lifetime)
993 sleep_time = min(timeout, backoff)

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\dns\resolver.py in _compute_timeout(self, start, lifetime)
798 if duration >= lifetime:
–> 799 raise Timeout(timeout=duration)
800 return min(lifetime - duration, self.timeout)

Timeout: The DNS operation timed out after 30.00082039833069 seconds

During handling of the above exception, another exception occurred:

ConfigurationError Traceback (most recent call last)
in
----> 1 clint = MongoClient(uri)

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\pymongo\mongo_client.py in init(self, host, port, document_class, tz_aware, connect, **kwargs)
469 for entity in host:
470 if “://” in entity:
–> 471 res = uri_parser.parse_uri(entity, port, warn=True)
472 seeds.update(res[“nodelist”])
473 username = res[“username”] or username

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\pymongo\uri_parser.py in parse_uri(uri, default_port, validate, warn)
397 raise InvalidURI(
398 “%s URIs must not include a port number” % (SRV_SCHEME,))
–> 399 nodes = _get_dns_srv_hosts(fqdn)
400
401 try:

c:\users\alex\appdata\local\programs\python\python37-32\lib\site-packages\pymongo\uri_parser.py in _get_dns_srv_hosts(hostname)
287 results = resolver.query(’_mongodb._tcp.’ + hostname, ‘SRV’)
288 except Exception as exc:
–> 289 raise ConfigurationError(str(exc))
290 return [(maybe_decode(res.target.to_text(omit_final_dot=True)), res.port)
291 for res in results]

ConfigurationError: The DNS operation timed out after 30.00082039833069 seconds

Hi @alexneto,

Please let me know if you are still facing the issue. It would be of great help if you can share the contents of .ini file.

Make sure your firewall is disabled and IP has been whitelisted on the cluster from atlas.

Kanika

thank you very much Kanikasingla