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.

raven test command failed with error

See original GitHub issue

Software stack info is as flows:

  • Sentry version: 8.19.0
  • Python 3.5.2
  • raven 6.8

I have created a new project in my sentry, and following the doc, I decide to perform a test, here goes the result:

raven test https://pubkey:seckey@sentry.mycomp.com/13
Using DSN configuration:
  https://pubkey:seckey@sentry.mycomp.com/13

Client configuration:
  base_url       : https://sentry.mycomp.com
  project        : 13
  public_key     : pubkey
  secret_key     : seckey

Sending a test message... Event ID was '7598438b7a7f4479b6e7d7e875c36122'
Sentry responded with an error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)> (url: https://sentry.mycomp.com/api/13/store/)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1254, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/Users/liyx/projects/py_projects/telegraf-jenkins/venv/lib/python3.5/site-packages/raven/utils/http.py", line 38, in connect
    sock, ca_certs=ca_certs, cert_reqs=ssl.CERT_REQUIRED)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 1069, in wrap_socket
    ciphers=ciphers)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 988, in do_handshake
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

It seems that this caused by the url https://sentry.mycomp.com/api/13/store/, so I tried to open it from the browser, then I got the following output:

{"error":"Unable to find authentication information"}

I am pretty sure that the SSL key for sentry is OK since I can perform a successful test by JavaScript.

Here goes the question:

  • Why raven python try to access xx/api/project_num/store ?
  • How to solve this .

Thanks for help in advance.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
glebsamcommented, Jun 18, 2019

As a w/a you can use requests transport, it is better than just disable SSL validation:

from raven.transport.threaded_requests import ThreadedRequestsHTTPTransport
client = raven.Client(transport=ThreadedRequestsHTTPTransport)
1reaction
yuyang0commented, Sep 4, 2018

also got problem same as @tiangolo , adding verify_ssl=0 to DSN is a workaround to solve this problem temporarily.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Security: Common Errors & FAQ | RavenDB 5.3 Documentation
This article explains some of the common security configuration errors and how to handle them. ... Setting up RavenDB in Let's Encrypt security...
Read more >
[JIRA Xray] Error occurred while exporting raven tests.
Hi, I was using Jenkins to grab files from Bitbucket to Jenkins and then execute a bash file that uses a curl POST...
Read more >
Raven.Server.exe Failed to grant rights for listening to http
The issue was that the RavenDB installer had automatically started the RavenDB Server as a Windows Service, preventing the command-line Raven.
Read more >
Raven.Server.exe crashed during backup - Google Groups
Backups are full backups, i just run a test backup from the command ... Next build will also have better diagnostics for a...
Read more >
Error Tracking - GitLab Docs
Error tracking backend: the backend can be either GitLab itself or Sentry. ... ERROR: Sentry failure builds=0 error=raven: dsn missing private key ......
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