Closed kh2901 closed 5 years ago
Looks like we're passing the assert_hostname
pieces for cert validation even for http
, where certs are definitely not relevant. I'm looking into it.
Ah, I think I see the problem. Can you try removing your 'VERIFY_SERVER_CERT': False,
config? I think the issue you're seeing is due to combining https config values with an http SERVER_URL
. If removing that config value fixes the error, then it's still a bug but I can verify that I've diagnosed the issue correctly.
(I also have a sneaking suspicion that this error would be present in 4.2.1, but that your prod 4.2.1 instance is using https, while this development instance is using http. Basically, I think this is an old bug triggered by a new config change, not a new bug in the new version. Still good to get it fixed!)
Ah, I think I see the problem. Can you try removing your
'VERIFY_SERVER_CERT': False,
config? I think the issue you're seeing is due to combining https config values with an httpSERVER_URL
. If removing that config value fixes the error, then it's still a bug but I can verify that I've diagnosed the issue correctly.
@basepi Thank you this fixed the problem.
Awesome! The linked PR will also fix this so you won't have to worry about it in the future.
After upgrading to Version 5.1.1 (recent version 4.2.1) the flask app running on below error:
The NO_PROXY env variable is used.
To Reproduce
Expected behavior: Connect to apm-server host and add apm data.
Environment (please complete the following information)
Additional context
Add any other context about the problem here.
requirements.txt
: aniso8601==6.0.0 apispec==2.0.2 asn1crypto==0.24.0 atomicwrites==1.3.0 attrs==19.1.0 blinker==1.4 blueprint==3.4.2 certifi==2019.3.9 cffi==1.12.2 chardet==3.0.4 Click==7.0 colorama==0.4.1 cryptography==2.6.1 ecdsa==0.13 elastic-apm==4.2.1 elasticsearch==7.0.2 Flask==1.1.1 flask-apispec==0.8.1 Flask-JWT==0.3.2 Flask-PyMongo==2.2.0 flask-restplus==0.12.1 future==0.17.1 hvac==0.7.2 idna==2.8 itsdangerous==1.1.0 Jinja2==2.10.1 jsonschema==3.0.1 MarkupSafe==1.1.1 marshmallow==2.19.2 more-itertools==7.0.0 pluggy==0.9.0 psutil==5.6.1 py==1.8.0 pyasn1==0.4.5 pycparser==2.19 PyJWT==1.4.2 pymongo==3.7.2 pyOpenSSL==19.0.0 pyrsistent==0.14.11 pytest==4.4.0 pytest-flask==0.14.0 pytest-mock==1.10.3 python-dateutil==2.8.0 python3-logstash==0.4.80 pytz==2018.9 PyYAML==5.1.1 requests==2.21.0 rsa==4.0 six==1.12.0 urllib3==1.24.1 webargs==5.2.0 Werkzeug==0.15.1 wincertstore==0.2