Issue2174

classification
Title: jython ssl error using pip
Type: Severity: normal
Components: Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: nonameentername, zyasoft
Priority: Keywords:

Created on 2014-06-27.16:30:52 by nonameentername, last changed 2014-07-23.14:43:30 by zyasoft.

Messages
msg8828 (view) Author: werner (nonameentername) Date: 2014-06-27.16:30:52
I am trying to install dependencies using pip https://github.com/jimbaker/pip

I created a requirements.txt file with the following contents:
python-keystoneclient==0.7.0

When running
pip install -r requirements.txt

I get the following error:

 File "/home/user/source/jython/Lib/ssl.py", line 115, in __init__

    self.ssl_handler.handshakeFuture().sync()

        at io.netty.handler.ssl.SslHandler$LazyChannelPromise.executor(SslHandler.java:1186)

        at io.netty.util.concurrent.DefaultPromise.checkDeadLock(DefaultPromise.java:394)

        at io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:257)

        at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:224)

        at io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:31)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)



java.lang.IllegalStateException: java.lang.IllegalStateException

This is occurring on ubuntu 14.04
msg8854 (view) Author: Jim Baker (zyasoft) Date: 2014-06-30.18:46:12
My reading of the following code is that using the handshakeFuture like so should always be valid:

        self.ssl_handler.handshakeFuture().addListener(handshake_step)
        if self.do_handshake_on_connect and self.already_handshaked:
            self.ssl_handler.handshakeFuture().sync()
            log.debug("SSL handshaking completed", extra={"sock": self._sock})

However, this is clearly not the case in Netty, given the reported error. I have added as a workaround a short sleep, while we figure out a better way of doing some sort of synchronization that lets us do synchronization :)

Workaround in http://hg.python.org/jython/rev/f6c9712832d0

Note that for this specific requirements.txt, there is a now separate issue in installing PrettyTable, which might be due to recent fixes in Jython's grammar support.
msg8856 (view) Author: Jim Baker (zyasoft) Date: 2014-07-01.03:58:35
The problem with the PrettyTable package is that the tarfile module does not properly extract the bz2 compressed tar; see #2176, which I just opened.
msg8873 (view) Author: Jim Baker (zyasoft) Date: 2014-07-14.20:20:29
Fixed as of http://hg.python.org/jython/rev/2c45f75a5406
History
Date User Action Args
2014-07-23 14:43:30zyasoftsetstatus: pending -> closed
2014-07-14 20:20:30zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
messages: + msg8873
2014-07-01 03:58:35zyasoftsetmessages: + msg8856
2014-06-30 18:46:12zyasoftsetmessages: + msg8854
2014-06-28 03:19:52zyasoftsetassignee: zyasoft
resolution: accepted
nosy: + zyasoft
2014-06-27 16:30:52nonameenternamecreate