ServerMonitor icon indicating copy to clipboard operation
ServerMonitor copied to clipboard

Got 500 and SSLError on some urls

Open kpstsp opened this issue 6 years ago • 1 comments

Describe the bug If try to check some urls got a Internal service error (500) Following deeper in code I found that cause in

requests.exceptions.SSLError

To Reproduce Steps to reproduce the behavior:

  1. Paste 'https://www.old.reddit.com' to textbox

  2. Click on 'Check'

  3. If enabled Debug in run.py, can catch exception via console: requests.head(url, timeout=2, stream=True, allow_redirects=True)

  4. See error

File "/Users/trx/.virtualenvs/servermon/lib/python3.7/site-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request)

requests.exceptions.SSLError: HTTPSConnectionPool(host='www.old.reddit.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError("hostname 'www.old.reddit.com' doesn't match either of '*.reddit.com', 'reddit.com', '*.redditmedia.com', 'redditmedia.com', '*.redd.it', 'redd.it', 'www.redditstatic.com', 'i.reddituploads.com', '*.thumbs.redditmedia.com', 'www.redditinc.com', 'redditinc.com'"))) `

Expected behavior Should show real status, maybe better add a warning about SSL, or ignore it

Desktop (please complete the following information):

  • OS: Mac OS X Mojave
  • Browser Firefox
  • Version 69.0

Additional context Need wrap exception or do workaround. I'm don't sure what is better. Should programm check SSL or not? Possible ignore it: https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror

Example: requests.get('https://kennethreitz.com', verify=False)

PS: I can take to work this issue after your decide what need to do with this error

kpstsp avatar Sep 23 '19 21:09 kpstsp

The whole monitoring system is a bit of a mess right now. Ignoring SSL would be a good solution I think because there is no much reason to do so anyway.

I assigned this Issue to you. Thanks for your help!

ChristianLutzCL avatar Sep 24 '19 15:09 ChristianLutzCL