question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid DNS pattern

See original GitHub issue

Hello,

We are using https proxies to crawl some website and sometimes i get the following stack trace:

Error during info_callback
Traceback (most recent call last):
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/twisted/protocols/tls.py", line 315, in dataReceived
    self._checkHandshakeStatus()
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/twisted/protocols/tls.py", line 235, in _checkHandshakeStatus
    self._tlsConnection.do_handshake()
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1442, in do_handshake
    result = _lib.SSL_do_handshake(self._ssl)
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 933, in wrapper
    callback(Connection._reverse_mapping[ssl], where, return_code)
--- <exception caught here> ---
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/twisted/internet/_sslverify.py", line 1102, in infoCallback
    return wrapped(connection, where, ret)
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/scrapy/core/downloader/tls.py", line 67, in _identityVerifyingInfoCallback
    verifyHostname(connection, self._hostnameASCII)
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/service_identity/pyopenssl.py", line 44, in verify_hostname
    cert_patterns=extract_ids(connection.get_peer_certificate()),
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/service_identity/pyopenssl.py", line 73, in extract_ids
    ids.append(DNSPattern(n.getComponent().asOctets()))
  File "/home/wirebot/.virtualenvs/cayzn_tracking.scraping/local/lib/python2.7/site-packages/service_identity/_common.py", line 156, in __init__
    "Invalid DNS pattern {0!r}.".format(pattern)
service_identity.exceptions.CertificateError: Invalid DNS pattern '194.167.13.105'.

I think this issue is somewhat similar to https://github.com/scrapy/scrapy/issues/2092 and this ‘invalid DNS pattern’ error should be caught similarly as the ‘Invalid DNS-ID’. What do you think ?

In the meantime, how can i catch it myself and silent it ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dangracommented, Jul 3, 2018

@oximer We are looking forward to release Scrapy 1.6.0 by next week.

But you don’t need git to install Scrapy from master branch, you can include the following line in your requirements.txt instead:

https://github.com/scrapy/scrapy/archive/6f5c39d.zip#egg=Scrapy

6f5c39d is the commit id for the last commit on master branch at the moment.

0reactions
jslay88commented, Sep 26, 2018

It takes about 20s to look at the file structure to realize requirements.txt has been renamed to requirements-py2.txt and requirements-py3.txt accordingly depending on the env you are running.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mail delivery failed, invalid DNS - WordPress.org
Sending test email is working but when I send email from contact form on website, Mail delivery failed,. here what I got: Action:...
Read more >
Scrapy handshake failure using TLSv1.0 through a proxy
CertificateError: Invalid DNS pattern '10.20.106.170'. 2018-09-26 14:38:00 [scrapy.downloadermiddlewares.retry] DEBUG: Gave up retrying <GET ...
Read more >
Resolve an Invalid Character in the DNS Name - TechDocs
Create a DNS record that maps the incorrect name to the corrected name. Consider that an Orchestrator host name includes an invalid character....
Read more >
twisted.python.failure.CertificateError: Invalid DNS pattern
Hi. I didnt change anything. But at the beginning of the month my scrayper run (https://morph.io/PGuyan/GL). Not it throws an error.
Read more >
DNS: What Can Go Wrong and How You Can Fix It
These name servers can go down at times due to an issue (i.e. DDoS attacks, network issues with the server, etc.). This can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found