Message11529

Author Neha
Recipients Neha, stefan.richthofer
Date 2017-08-09.06:07:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502258822.86.0.393540903512.issue2614@psf.upfronthosting.co.za>
In-reply-to
Content
- How does the project use/embedd/access jython-standalone?
We have created a few scripts which use the python scripts from the jython-2.7.0-standalone.jar
We are using the python utilities httplib, xml.etree.ElementTree as xmltree, urlparse, pprint, types, getopt, re, shutil.
These are utilized for reading the data using the OSLC API.


- the full stacktrace
Log Trace-
Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "/opt/ibm/sccm/bin/sccm/dataSources.py", line 319, in createMessageBrokerDataSource
    return self.__createDataSource(messageBrokerDataSource, attrs)
  File "/opt/ibm/sccm/bin/sccm/dataSources.py", line 302, in _dataSources__createDataSource
    self.refresh()
  File "/opt/ibm/sccm/bin/sccm/dataSources.py", line 272, in refresh
    conn.request('GET', '/sccmOslc/dataSources?oslc_ua.action=RefreshRegistry', headers=headers)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 812, in send
    self.connect()
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/httplib.py", line 1204, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/_socket.py", line 357, in handle_exception
    return method_or_function(*args, **kwargs)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/_socket.py", line 357, in handle_exception
    return method_or_function(*args, **kwargs)
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/ssl.py", line 287, in wrap_socket
    return SSLSocket(
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/ssl.py", line 116, in __init__
    self.do_handshake()
  File "/opt/ibm/sccm/lib/jython-standalone-2.7.0.jar/Lib/ssl.py", line 165, in do_handshake
    raise SSLError(SSL_ERROR_SSL, e.strerror)
SSLError: [Errno 1] Illegal state exception
 

- if possible: Code to reproduce the issue
Below is one of the code snippet, however we cannot share the complete code-
def _action(self, action, silent, method='GET'):
                (conn, headers) = restConnection()
                url = '/sccmOslc/dataSources/' + self.type + '/' + self.identifier + '?oslc_ua.action=' + action
                headers['Content-Type'] = 'application/xml'
                conn.request(method, url, headers=headers)
                response = conn.getresponse()
                if response.status == 200:
                        return True
                if silent == False:
                        tree = xmltree.fromstring(response.read())
                        print str(response.status) + ': ' + tree[0].find('{http://purl.org/dc/terms/}title').text
                        print tree[0].find('{http://purl.org/dc/terms/}description').text
                return False


                
- What platform are you on?
We are using the RHEL 7.2 and 7.3 systems.
 
We would also like to point out the following-
- This issue is not seen in the jython-2.5.3-standalone.jar, but is seen very frequently in the jython 2.7.0 jar.
- We saw the below post on StackOverflow, but did not find the jython 2.7.1 version of the jar on jython.org
 
Could you share the download link for the same?

Thanks 
Neha Pithadiya.
History
Date User Action Args
2017-08-09 06:07:02Nehasetmessageid: <1502258822.86.0.393540903512.issue2614@psf.upfronthosting.co.za>
2017-08-09 06:07:02Nehasetrecipients: + Neha, stefan.richthofer
2017-08-09 06:07:02Nehalinkissue2614 messages
2017-08-09 06:07:01Nehacreate