GithubHelp home page GithubHelp logo

Comments (22)

bast avatar bast commented on May 20, 2024

The error comes from URLopener. I would recommend to debug this in an interactive session
where you look at the isolated URLopener on that machine.
What it tries and fails to do is to fetch the sources specified in autocmake.cfg. You could
try to fetch them in an interactive Python session manually to corner the problem.

from autocmake.

miroi avatar miroi commented on May 20, 2024

Closing as this bug is irrelevant. In between I got green light for Windows tests !

from autocmake.

miroi avatar miroi commented on May 20, 2024

Well, reopening this issue - on the virtual Windows Server there is still some issue with Python !
Strange that appveyor is giving green light.

from autocmake.

miroi avatar miroi commented on May 20, 2024

Fresh Python 2.7.10, Windows Server 2012 (x86_64):

C:\Users\milias\Documents\work\software\autocmake-devel\autocmake>py.test -v test\test.py
============================= test session starts =============================
platform win32 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2 -- C:\Python27\python.exe
rootdir: C:\Users\milias\Documents\work\software\autocmake-devel\autocmake\test, inifile:
collected 2 items

test\test.py::test_cxx FAILED
test\test.py::test_fc FAILED

================================== FAILURES ===================================
__________________________________ test_cxx ___________________________________

    def test_cxx():
        os.chdir(os.path.join(HERE, 'cxx', 'cmake'))
>       update.fetch_url('https://github.com/miroi/autocmake/raw/master/update.py', 'update.py')

..\..\test.py:19:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\update.py:41: in fetch_url
    opener.retrieve(src, dst)
C:\Python27\lib\urllib.py:245: in retrieve
    fp = self.open(url, data)
C:\Python27\lib\urllib.py:213: in open
    return getattr(self, name)(url)
C:\Python27\lib\urllib.py:443: in open_https
    h.endheaders(data)
C:\Python27\lib\httplib.py:1049: in endheaders
    self._send_output(message_body)
C:\Python27\lib\httplib.py:893: in _send_output
    self.send(msg)
C:\Python27\lib\httplib.py:855: in send
    self.connect()
C:\Python27\lib\httplib.py:1274: in connect
    server_hostname=server_hostname)
C:\Python27\lib\ssl.py:352: in wrap_socket
    _context=self)
C:\Python27\lib\ssl.py:579: in __init__
    self.do_handshake()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ssl.SSLSocket object at 0x0000000002BCEDD8>, block = False

    def do_handshake(self, block=False):
        """Perform a TLS/SSL handshake."""
        self._check_connected()
        timeout = self.gettimeout()
        try:
            if timeout == 0.0 and block:
                self.settimeout(None)
>           self._sslobj.do_handshake()
E           IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

C:\Python27\lib\ssl.py:808: IOError
___________________________________ test_fc ___________________________________

    def test_fc():
        os.chdir(os.path.join(HERE, 'fc', 'cmake'))
>       update.fetch_url('https://github.com/miroi/autocmake/raw/master/update.py', 'update.py')

..\..\test.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\update.py:41: in fetch_url
    opener.retrieve(src, dst)
C:\Python27\lib\urllib.py:245: in retrieve
    fp = self.open(url, data)
C:\Python27\lib\urllib.py:213: in open
    return getattr(self, name)(url)
C:\Python27\lib\urllib.py:443: in open_https
    h.endheaders(data)
C:\Python27\lib\httplib.py:1049: in endheaders
    self._send_output(message_body)
C:\Python27\lib\httplib.py:893: in _send_output
    self.send(msg)
C:\Python27\lib\httplib.py:855: in send
    self.connect()
C:\Python27\lib\httplib.py:1274: in connect
    server_hostname=server_hostname)
C:\Python27\lib\ssl.py:352: in wrap_socket
    _context=self)
C:\Python27\lib\ssl.py:579: in __init__
    self.do_handshake()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ssl.SSLSocket object at 0x0000000002C6B748>, block = False

    def do_handshake(self, block=False):
        """Perform a TLS/SSL handshake."""
        self._check_connected()
        timeout = self.gettimeout()
        try:
            if timeout == 0.0 and block:
                self.settimeout(None)
>           self._sslobj.do_handshake()
E           IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

C:\Python27\lib\ssl.py:808: IOError
========================= 2 failed in 601.53 seconds ==========================

C:\Users\milias\Documents\work\software\autocmake-devel\autocmake>

from autocmake.

 avatar commented on May 20, 2024

Try to reinstall. See email in your inbox.

from autocmake.

bast avatar bast commented on May 20, 2024

If there is more to it than just reinstall please post the solution here so that
others who hit a similar problem can follow it. Thanks!

from autocmake.

miroi avatar miroi commented on May 20, 2024

So far, reinstallation did not help. Something seems be wrong with ssh-connection outside.

from autocmake.

 avatar commented on May 20, 2024

I am unable to reproduce your error, run in your python these commands:

import ssl
ssl.OPENSSL_VERSION
and tell me your version. Mine just works.

see picture
ssl

from autocmake.

miroi avatar miroi commented on May 20, 2024
C:\Users\milias\Documents\work\software\autocmake-devel\autocmake_miroi_win\test>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.2a 19 Mar 2015'
>>>

from autocmake.

miroi avatar miroi commented on May 20, 2024

Well, after playing with virtual Windows server 2012 setting I got this type of error:

C:\Users\milias\Desktop\autocmake>c:\Python27\Scripts\py.test.exe -vv test\test.py
============================= test session starts =============================
platform win32 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2 -- C:\Python27\python.exe
rootdir: C:\Users\milias\Desktop\autocmake\test, inifile:
collected 2 items

test\test.py::test_cxx PASSED
test\test.py::test_fc FAILED

================================== FAILURES ===================================
___________________________________ test_fc ___________________________________

    def test_fc():
>       stdout, stderr = boilerplate('fc', 'python setup.py --fc=gfortran')

..\..\test.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\test.py:77: in boilerplate
    dst='lib/docopt.py')
..\..\test.py:43: in fetch_url
    opener.retrieve(src, dst)
C:\Python27\lib\urllib.py:245: in retrieve
    fp = self.open(url, data)
C:\Python27\lib\urllib.py:213: in open
    return getattr(self, name)(url)
C:\Python27\lib\urllib.py:457: in open_https
    return self.http_error(url, fp, errcode, errmsg, headers)
C:\Python27\lib\urllib.py:377: in http_error
    result = method(url, fp, errcode, errmsg, headers)
C:\Python27\lib\urllib.py:641: in http_error_302
    data)
C:\Python27\lib\urllib.py:667: in redirect_internal
    return self.open(newurl)
C:\Python27\lib\urllib.py:213: in open
    return getattr(self, name)(url)
C:\Python27\lib\urllib.py:443: in open_https
    h.endheaders(data)
C:\Python27\lib\httplib.py:1049: in endheaders
    self._send_output(message_body)
C:\Python27\lib\httplib.py:893: in _send_output
    self.send(msg)
C:\Python27\lib\httplib.py:855: in send
    self.connect()
C:\Python27\lib\httplib.py:1274: in connect
    server_hostname=server_hostname)
C:\Python27\lib\ssl.py:352: in wrap_socket
    _context=self)
C:\Python27\lib\ssl.py:579: in __init__
    self.do_handshake()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ssl.SSLSocket object at 0x0000000002D60128>, block = False

    def do_handshake(self, block=False):
        """Perform a TLS/SSL handshake."""
        self._check_connected()
        timeout = self.gettimeout()
        try:
            if timeout == 0.0 and block:
                self.settimeout(None)
>           self._sslobj.do_handshake()
E           IOError: [Errno socket error] [Errno 10054] An existing connection was forcibly closed by the remote host

C:\Python27\lib\ssl.py:808: IOError
===================== 1 failed, 1 passed in 4.99 seconds ======================

C:\Users\milias\Desktop\autocmake>

from autocmake.

miroi avatar miroi commented on May 20, 2024

Fixed according to the http://sickbeard.com/forums/viewtopic.php?f=4&t=9833

As admin on MS Windows 2012 I run this (dos) command:

netsh int tcp set global ecncapability=disabled

and both tests are fine !

C:\Users\milias\Documents\work\autocmake-devel\autocmake>py.test -vv test\test.py
============================= test session starts =============================
platform win32 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2 -- C:\Python27\python.exe
rootdir: C:\Users\milias\Documents\work\autocmake-devel\autocmake\test, inifile:
collected 2 items

test\test.py::test_cxx PASSED
test\test.py::test_fc PASSED

========================== 2 passed in 3.48 seconds ===========================

C:\Users\milias\Documents\work\autocmake-devel\autocmake>

from autocmake.

miroi avatar miroi commented on May 20, 2024

Reopening this issue.

Again, my virtual MS Windows Server 2012 got the samer error, though the command that worked perviously, is not working:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Windows\system32>netsh int tcp set global ecncapability=disabled
Ok.

The error message is

___________________________ test_cc_clapack_static ____________________________

    def test_cc_clapack_static():
>       configure_build_and_exe('cc_clapack', 'python setup.py --cc=gcc --static --cmake-options="-DMATH_LIB_SEARCH_ORDER=\'O
PENBLAS;ATLAS;MKL;SYSTEM_NATIVE\'"')

..\..\test.py:214:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\test.py:89: in configure_build_and_exe
    dst='lib/docopt.py')
..\..\test.py:49: in fetch_url
    opener.retrieve(src, dst)
C:\Python27\lib\urllib.py:245: in retrieve
    fp = self.open(url, data)
C:\Python27\lib\urllib.py:213: in open
    return getattr(self, name)(url)
C:\Python27\lib\urllib.py:443: in open_https
    h.endheaders(data)
C:\Python27\lib\httplib.py:1049: in endheaders
    self._send_output(message_body)
C:\Python27\lib\httplib.py:893: in _send_output
    self.send(msg)
C:\Python27\lib\httplib.py:855: in send
    self.connect()
C:\Python27\lib\httplib.py:1274: in connect
    server_hostname=server_hostname)
C:\Python27\lib\ssl.py:352: in wrap_socket
    _context=self)
C:\Python27\lib\ssl.py:579: in __init__
    self.do_handshake()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ssl.SSLSocket object at 0x00000000038E2EB8>, block = False

    def do_handshake(self, block=False):
        """Perform a TLS/SSL handshake."""
        self._check_connected()
        timeout = self.gettimeout()
        try:
            if timeout == 0.0 and block:
                self.settimeout(None)
>           self._sslobj.do_handshake()
E           IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

C:\Python27\lib\ssl.py:808: IOError

from autocmake.

miroi avatar miroi commented on May 20, 2024

Again, connectivity issue on MS Windows Server 2012...

Rado (@bast), please don't you know some trick to check it ?

C:\Users\milias\Documents\work\autocmake-devel\autocmake\test\fc\cmake>python update.py --self
- creating .gitignore
- fetching lib/config.py
Traceback (most recent call last):
  File "update.py", line 483, in <module>
    main(sys.argv)
  File "update.py", line 334, in main
    dst='lib/config.py'
  File "update.py", line 44, in fetch_url
    opener.retrieve(src, dst)
  File "C:\Python27\lib\urllib.py", line 245, in retrieve
    fp = self.open(url, data)
  File "C:\Python27\lib\urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "C:\Python27\lib\urllib.py", line 443, in open_https
    h.endheaders(data)
  File "C:\Python27\lib\httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 893, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 855, in send
    self.connect()
  File "C:\Python27\lib\httplib.py", line 1274, in connect
    server_hostname=server_hostname)
  File "C:\Python27\lib\ssl.py", line 352, in wrap_socket
    _context=self)
  File "C:\Python27\lib\ssl.py", line 579, in __init__
    self.do_handshake()
  File "C:\Python27\lib\ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

C:\Users\milias\Documents\work\autocmake-devel\autocmake\test\fc\cmake>

from autocmake.

bast avatar bast commented on May 20, 2024

The only advice I can give is to not debug this using the update.py script but directly in the Python shell:
https://github.com/scisoft/autocmake/blob/master/update.py#L43-L44

from autocmake.

miroi avatar miroi commented on May 20, 2024

Rado ( @bast),

would you please agree with error catching ?

An example here

    opener = URLopener()
    try:
        opener.retrieve(src, dst)
    except:
        print "src=",src
        print "dst=",dst
        print "opener.retrieve(src, dst) gave error:", sys.exc_info()[0]
        sys.exit("error in opener.retrieve(src, dst)!")

giving output of

C:\Users\milias\Documents\work\autocmake-devel\autocmake\test\fc\cmake>python update.py  --self
- fetching lib/config.py
src= https://github.com/scisoft/autocmake/raw/master/lib/config.py
dst= lib/config.py
Unexpected error: <type 'exceptions.IOError'>
error in opener.retrieve(src, dst)!

from autocmake.

bast avatar bast commented on May 20, 2024

If you need this for debugging, just introduce it on your fork until you debug the problem. I don't think we need the debugging code in the central repo, right?

from autocmake.

miroi avatar miroi commented on May 20, 2024

OK, debugging in not necessary for now; firt, first I have to find the reason for the connectivity failure on MS Windows Server 2012....

>>> import urllib
>>> urllib.urlretrieve(url="https://github.com/scisoft/autocmake/raw/master/lib/config.py")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\urllib.py", line 98, in urlretrieve
    return opener.retrieve(url, filename, reporthook, data)
  File "C:\Python27\lib\urllib.py", line 245, in retrieve
    fp = self.open(url, data)
  File "C:\Python27\lib\urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "C:\Python27\lib\urllib.py", line 443, in open_https
    h.endheaders(data)
  File "C:\Python27\lib\httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 893, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 855, in send
    self.connect()
  File "C:\Python27\lib\httplib.py", line 1274, in connect
    server_hostname=server_hostname)
  File "C:\Python27\lib\ssl.py", line 352, in wrap_socket
    _context=self)
  File "C:\Python27\lib\ssl.py", line 579, in __init__
    self.do_handshake()
  File "C:\Python27\lib\ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

from autocmake.

bast avatar bast commented on May 20, 2024

Duplicate of #117. Closing.

from autocmake.

miroi avatar miroi commented on May 20, 2024

Excellent, Rado !

Connectivity on my MS Windows Server 2012 is renewed !

C:\Users\milias\Documents\work\autocmake-devel\autocmake>py.test -vv test\test.py
============================= test session starts =============================
platform win32 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2 -- C:\Python27\python.exe
rootdir: C:\Users\milias\Documents\work\autocmake-devel\autocmake\test, inifile:
collected 27 items

test\test.py::test_cxx_custom PASSED
test\test.py::test_extra_cmake_options PASSED
test\test.py::test_cxx PASSED
test\test.py::test_cxx_static PASSED
test\test.py::test_fc PASSED�
.
.
.

from autocmake.

bast avatar bast commented on May 20, 2024

To be precise, connectivity is not renewed - it is still broken on that server - but now we completely avoid connectivity during tests.

from autocmake.

freenaut avatar freenaut commented on May 20, 2024

@miroi i got same err , how to fixed it?

from autocmake.

bast avatar bast commented on May 20, 2024

@freenaut is the problem still there?

from autocmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.