无法访问 Sentry 日志服务器错误 400

发布于 2024-11-29 19:59:43 字数 1381 浏览 1 评论 0原文

当我的 Sentry 客户端尝试记录错误时,我收到以下错误:

 Unable to reach Sentry log server: HTTP Error 400: BAD REQUEST (url: http://localhost:8000/sentry/store/, body: Missing data)
       Traceback (most recent call last):
         File "/home/deploy/env/lib/python2.6/site-packages/sentry/client/base.py", line 210, in send
           return self.send_remote(url=url, data=message, headers=headers)
         File "/home/deploy/env/lib/python2.6/site-packages/sentry/client/base.py", line 194, in send_remote
           response = urllib2.urlopen(req, data).read()
         File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
           return _opener.open(url, data, timeout)
         File "/usr/lib/python2.6/urllib2.py", line 397, in open
           response = meth(req, response)
         File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
           'http', request, response, code, msg, hdrs)
         File "/usr/lib/python2.6/urllib2.py", line 435, in error
           return self._call_chain(*args)
         File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
           result = func(*args)
         File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
           raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
       HTTPError: HTTP Error 400: BAD REQUEST Http 404

它尝试记录的错误未保存到服务器。

谢谢你!

I get the following error when my Sentry client tries logging an error:

 Unable to reach Sentry log server: HTTP Error 400: BAD REQUEST (url: http://localhost:8000/sentry/store/, body: Missing data)
       Traceback (most recent call last):
         File "/home/deploy/env/lib/python2.6/site-packages/sentry/client/base.py", line 210, in send
           return self.send_remote(url=url, data=message, headers=headers)
         File "/home/deploy/env/lib/python2.6/site-packages/sentry/client/base.py", line 194, in send_remote
           response = urllib2.urlopen(req, data).read()
         File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
           return _opener.open(url, data, timeout)
         File "/usr/lib/python2.6/urllib2.py", line 397, in open
           response = meth(req, response)
         File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
           'http', request, response, code, msg, hdrs)
         File "/usr/lib/python2.6/urllib2.py", line 435, in error
           return self._call_chain(*args)
         File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
           result = func(*args)
         File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
           raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
       HTTPError: HTTP Error 400: BAD REQUEST Http 404

The error that it is trying to log doesn't get saved to the server.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的年少不轻狂 2024-12-06 19:59:43

我也有这个问题。

已查看哨兵代码库并找到它抛出 400 的位置(web/views.py 的第 424 行)

它发生在检查标头 HTTP_AUTHORIZATION 的 else 子句中>。为了让这个通过,我必须将 WSGIPassAuthorization On 添加到我的 apache conf...

我认为我上面提到的 else 子句一定有一个错误,因为应该处理这个错误。 ...

I had this problem too.

Have looked into the sentry codebase and found the place where it throws the 400 (line 424 of web/views.py)

It happens in the else clause that checks for the header HTTP_AUTHORIZATION. To get this to be passed through, I had to add WSGIPassAuthorization On to my apache conf....

I think the else clause I mention above must have a bug in it, because this should be handled....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文