Path: csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'scripts': 0.03; 'repository': 0.05; 'startup': 0.05; 'python3': 0.07; 'skip:" 60': 0.07; 'subject:support': 0.07; 'method,': 0.09; 'resp': 0.09; 'subject:2.7': 0.09; 'url:archive': 0.09; 'developer': 0.10; 'python': 0.11; 'systems.': 0.12; 'language.': 0.14; "wouldn't": 0.14; '**kwargs)': 0.16; 'executed.': 0.16; 'from:addr:poczta.fm': 0.16; 'received:217.74': 0.16; 'received:217.74.65': 0.16; 'received:interia.pl': 0.16; 'received:poczta.interia.pl': 0.16; 'received:smtpo.poczta.interia.pl': 0.16; 'skip:" 80': 0.16; 'unpacking': 0.16; 'url:ftp': 0.16; 'url:tar': 0.16; 'subject:python': 0.16; 'url:)': 0.16; 'trying': 0.19; 'everyone,': 0.19; 'stack': 0.19; 'load': 0.23; 'error': 0.23; 'body,': 0.24; 'versions': 0.24; 'skip:" 30': 0.26; 'skip:" 40': 0.26; 'switch': 0.26; 'post': 0.26; 'supported': 0.26; 'skip:_ 20': 0.27; 'tried': 0.27; 'idea': 0.28; 'url:bugs': 0.29; 'patch': 0.29; "doesn't": 0.30; "i'm": 0.30; 'python2.7': 0.31; 'url:se': 0.31; 'file': 0.32; 'checked': 0.32; 'supposed': 0.32; "we're": 0.32; 'run': 0.32; 'url:python': 0.33; 'running': 0.33; 'beginning': 0.33; 'sources': 0.33; 'skip:_ 10': 0.34; 'knowledge': 0.35; "can't": 0.35; 'skip:s 30': 0.35; 'test': 0.35; 'but': 0.35; 'skip:" 50': 0.36; 'ubuntu': 0.36; 'url:org': 0.36; 'list': 0.37; 'to:addr:python-list': 0.38; '(from': 0.39; 'to:addr:python.org': 0.39; 'according': 0.40; 'even': 0.60; 'upgrading': 0.60; 'skip:* 10': 0.61; 'first': 0.61; 'received:217': 0.63; 'header:Message-Id:1': 0.63; 'our': 0.64; 'url:p': 0.64; 'finally': 0.65; 'received:pl': 0.69; 'skip:r 30': 0.69; 'below.': 0.71; 'url:a': 0.72; 'compiling': 0.84; 'replicate': 0.84; 'officially': 0.91 Date: Tue, 30 Sep 2014 16:50:40 +0200 From: Reddy Subject: SNI support in python 2.7 for Locust load tests To: python-list@python.org X-Mailer: interia.pl/pf09 X-Originating-IP: 192.100.124.156 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1412088641; bh=oJt2bo62BXFk9y+weqb/FVhCE1UifvG+piqrDDn7aW4=; h=Date:From:Subject:To:X-Mailer:X-Originating-IP:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding; b=k1dJjEGnuzaD00vy+IrddgzuXRRECeDoTS5zZffrsg1M/815QSjffYEX6Tc2h7b6T vJc3Ta1+LmvPboeOr/3m4M1FwkNOXdlqTurnVlSxpVU50QvgPpV3IfqMhXowRkbR34 M/W2vpLqwkqOtvMUo8GLfpTp19VLLq8QysHfAyNk= X-Mailman-Approved-At: Tue, 30 Sep 2014 17:07:39 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 93 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412089661 news.xs4all.nl 2963 [2001:888:2000:d::a6]:38035 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78489 Hello, At the beginning - welcome everyone, as this is my first post here. I'm not= an active Python developer now, but I have general knowledge of the langua= ge.=20 I'm trying to use locust (http://locust.io/) to run load test of one site w= e're developing. Everything was running nice and smooth until we switch the= servers to use SNI. SNI is not officially supported in python 2.7.5 but Lo= cust doesn't work on python3 as it uses gevent which AFAIK are supported fo= r python2 only. I finally managed to run our scripts on local Ubuntu after = upgrading python to 2.7.8 from utopic repository but I can't replicate the = same on target CentOS where the scripts are supposed to be executed. I trie= d compiling python from http://www.python.org/ftp/python/2.7.8/Python-2.7.8= .tar.xz, I even tried unpacking sources of Ubuntu python2.7 package (from h= ttp://se.archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.8.or= ig.tar.gz), patching them with TLS1_1 and TLS1_2 support from https://bugs= .python.org/file30761/python-2.7.5-tls1.1-and-tls1.2.patch) and still no lu= ck. I do monkey patch in Locust startup file according to http://stackoverf= low.com/a/19477363 (otherwise it wouldn't work on Ubuntu as well) but still= I get error stack as attached below. I also checked with pip list that all= python packages have the same versions on both systems. Any idea what I'm = missing on the target load test system which I have in Ubuntu?=20 Regards, Reddy ... [2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/sessions.py", line 503, in put [2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: return self.request('PUT= ', url, data=3Ddata, **kwargs) [2014-09-30 14:19:41,771] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/locust/clients.py", line 111, in request [2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: response =3D self._send_= request_safe_mode(method, url, **kwargs) [2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/locust/clients.py", line 155, in _send_request_safe_mo= de [2014-09-30 14:19:41,772] ip-x-x-x-x/ERROR/stderr: return requests.Session.= request(self, method, url, **kwargs) [2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/sessions.py", line 451, in request [2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: resp =3D self.send(prep,= **send_kwargs) [2014-09-30 14:19:41,773] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/sessions.py", line 557, in send [2014-09-30 14:19:41,774] ip-x-x-x-x/ERROR/stderr: r =3D adapter.send(reque= st, **kwargs) [2014-09-30 14:19:41,774] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/adapters.py", line 362, in send [2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: timeout=3Dtimeout [2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 516= , in urlopen [2014-09-30 14:19:41,775] ip-x-x-x-x/ERROR/stderr: body=3Dbody, headers=3Dh= eaders) [2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 308= , in _make_request [2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: conn.request(method, url= , **httplib_request_kw) [2014-09-30 14:19:41,776] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/httplib.py", line 995, in request [2014-09-30 14:19:41,777] ip-x-x-x-x/ERROR/stderr: self._send_request(metho= d, url, body, headers) [2014-09-30 14:19:41,777] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/httplib.py", line 1029, in _send_request [2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: self.endheaders(body) [2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/httplib.py", line 991, in endheaders [2014-09-30 14:19:41,778] ip-x-x-x-x/ERROR/stderr: self._send_output(messag= e_body) [2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/httplib.py", line 848, in _send_output [2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: self.send(message_body) [2014-09-30 14:19:41,779] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/httplib.py", line 817, in send [2014-09-30 14:19:41,780] ip-x-x-x-x/ERROR/stderr: self.sock.sendall(databl= ock) [2014-09-30 14:19:41,792] ip-x-x-x-x/ERROR/stderr: File "/usr/local/lib/pyt= hon2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line = 203, in sendall [2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: return self.connection.s= endall(data) [2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File "build/bdist.linux-= x86_64/egg/OpenSSL/SSL.py", line 977, in sendall [2014-09-30 14:19:41,793] ip-x-x-x-x/ERROR/stderr: File "build/bdist.linux-= x86_64/egg/OpenSSL/SSL.py", line 849, in _raise_ssl_error [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: OpenSSL.SSL [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: . [2014-09-30 14:19:41,794] ip-x-x-x-x/ERROR/stderr: WantWriteError =