sslv3 alert handshake failure – error from feedparser in Python 2.7.6 – with workaround

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I've been using a Python script (2.7.6 on Ubuntu 14.04LTS) to pick entries from RSS feeds using the "feedparser" module. This week it stopped working with a particular site. Digging, feedparser.parse() was returning a structure with an error code:



'bozo_exception': URLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)


Do I need to force a particular SSL or TLS version?



Tried going to lower levels with various urllib modules (urllib, urllib2, urllib3). Eventually this:



import urllib3
req = urllib3.PoolManager().request('GET', my_https_url)


which replied with a couple of warnings like:



/usr/lib/python2.7/dist-packages/urllib3/util/ssl_.py:133: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning



Apparently this is fixed in Python 2.7.9, but that wasn't pre-packaged for this old Ubuntu 14.04. Yet I want that OS because of some other elderly software that needs to keep running.



Simple workaround: it was enough to update my RSS-picker to just use python3 (3.4.3 is current on 14.04). No need to pass anything special, e.g., transport level options like somehow creating an SSLContext, to the feedparser module – the defaults worked fine. The only python2->3 changes needed were to print() and a couple of string-to-bytes s.encode('utf-8') things.










share|improve this question



















  • 2





    Please post the answer separately, as an answer.

    – G-Man
    Mar 18 at 5:15

















0















I've been using a Python script (2.7.6 on Ubuntu 14.04LTS) to pick entries from RSS feeds using the "feedparser" module. This week it stopped working with a particular site. Digging, feedparser.parse() was returning a structure with an error code:



'bozo_exception': URLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)


Do I need to force a particular SSL or TLS version?



Tried going to lower levels with various urllib modules (urllib, urllib2, urllib3). Eventually this:



import urllib3
req = urllib3.PoolManager().request('GET', my_https_url)


which replied with a couple of warnings like:



/usr/lib/python2.7/dist-packages/urllib3/util/ssl_.py:133: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning



Apparently this is fixed in Python 2.7.9, but that wasn't pre-packaged for this old Ubuntu 14.04. Yet I want that OS because of some other elderly software that needs to keep running.



Simple workaround: it was enough to update my RSS-picker to just use python3 (3.4.3 is current on 14.04). No need to pass anything special, e.g., transport level options like somehow creating an SSLContext, to the feedparser module – the defaults worked fine. The only python2->3 changes needed were to print() and a couple of string-to-bytes s.encode('utf-8') things.










share|improve this question



















  • 2





    Please post the answer separately, as an answer.

    – G-Man
    Mar 18 at 5:15













0












0








0








I've been using a Python script (2.7.6 on Ubuntu 14.04LTS) to pick entries from RSS feeds using the "feedparser" module. This week it stopped working with a particular site. Digging, feedparser.parse() was returning a structure with an error code:



'bozo_exception': URLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)


Do I need to force a particular SSL or TLS version?



Tried going to lower levels with various urllib modules (urllib, urllib2, urllib3). Eventually this:



import urllib3
req = urllib3.PoolManager().request('GET', my_https_url)


which replied with a couple of warnings like:



/usr/lib/python2.7/dist-packages/urllib3/util/ssl_.py:133: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning



Apparently this is fixed in Python 2.7.9, but that wasn't pre-packaged for this old Ubuntu 14.04. Yet I want that OS because of some other elderly software that needs to keep running.



Simple workaround: it was enough to update my RSS-picker to just use python3 (3.4.3 is current on 14.04). No need to pass anything special, e.g., transport level options like somehow creating an SSLContext, to the feedparser module – the defaults worked fine. The only python2->3 changes needed were to print() and a couple of string-to-bytes s.encode('utf-8') things.










share|improve this question
















I've been using a Python script (2.7.6 on Ubuntu 14.04LTS) to pick entries from RSS feeds using the "feedparser" module. This week it stopped working with a particular site. Digging, feedparser.parse() was returning a structure with an error code:



'bozo_exception': URLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)


Do I need to force a particular SSL or TLS version?



Tried going to lower levels with various urllib modules (urllib, urllib2, urllib3). Eventually this:



import urllib3
req = urllib3.PoolManager().request('GET', my_https_url)


which replied with a couple of warnings like:



/usr/lib/python2.7/dist-packages/urllib3/util/ssl_.py:133: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning



Apparently this is fixed in Python 2.7.9, but that wasn't pre-packaged for this old Ubuntu 14.04. Yet I want that OS because of some other elderly software that needs to keep running.



Simple workaround: it was enough to update my RSS-picker to just use python3 (3.4.3 is current on 14.04). No need to pass anything special, e.g., transport level options like somehow creating an SSLContext, to the feedparser module – the defaults worked fine. The only python2->3 changes needed were to print() and a couple of string-to-bytes s.encode('utf-8') things.







python ssl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 18 at 5:38









Rui F Ribeiro

42.1k1484142




42.1k1484142










asked Mar 18 at 2:53









Stuart LevyStuart Levy

11




11







  • 2





    Please post the answer separately, as an answer.

    – G-Man
    Mar 18 at 5:15












  • 2





    Please post the answer separately, as an answer.

    – G-Man
    Mar 18 at 5:15







2




2





Please post the answer separately, as an answer.

– G-Man
Mar 18 at 5:15





Please post the answer separately, as an answer.

– G-Man
Mar 18 at 5:15










1 Answer
1






active

oldest

votes


















0














You are showing us an SSLv3 negotiation error. SSLv3 has been phased out.



SSLv2 was obsoleted in 2011 and SSLv3 in 2015.



The latest distributions do not implement SSLv2 and v3 anymore. Even in properly config sites that have old Unix /linux versions that still support those protocols, Apache has been configured to disable their use for ages.



As you found out, the solution was to upgrade for more modern libraries /software that support other protocols. Be warned that if you have some internal legacy solution that depends on SSLv3, depending on the versions you upgrade your software, you might have problems in the near future.






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506912%2fsslv3-alert-handshake-failure-error-from-feedparser-in-python-2-7-6-with-wor%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You are showing us an SSLv3 negotiation error. SSLv3 has been phased out.



    SSLv2 was obsoleted in 2011 and SSLv3 in 2015.



    The latest distributions do not implement SSLv2 and v3 anymore. Even in properly config sites that have old Unix /linux versions that still support those protocols, Apache has been configured to disable their use for ages.



    As you found out, the solution was to upgrade for more modern libraries /software that support other protocols. Be warned that if you have some internal legacy solution that depends on SSLv3, depending on the versions you upgrade your software, you might have problems in the near future.






    share|improve this answer





























      0














      You are showing us an SSLv3 negotiation error. SSLv3 has been phased out.



      SSLv2 was obsoleted in 2011 and SSLv3 in 2015.



      The latest distributions do not implement SSLv2 and v3 anymore. Even in properly config sites that have old Unix /linux versions that still support those protocols, Apache has been configured to disable their use for ages.



      As you found out, the solution was to upgrade for more modern libraries /software that support other protocols. Be warned that if you have some internal legacy solution that depends on SSLv3, depending on the versions you upgrade your software, you might have problems in the near future.






      share|improve this answer



























        0












        0








        0







        You are showing us an SSLv3 negotiation error. SSLv3 has been phased out.



        SSLv2 was obsoleted in 2011 and SSLv3 in 2015.



        The latest distributions do not implement SSLv2 and v3 anymore. Even in properly config sites that have old Unix /linux versions that still support those protocols, Apache has been configured to disable their use for ages.



        As you found out, the solution was to upgrade for more modern libraries /software that support other protocols. Be warned that if you have some internal legacy solution that depends on SSLv3, depending on the versions you upgrade your software, you might have problems in the near future.






        share|improve this answer















        You are showing us an SSLv3 negotiation error. SSLv3 has been phased out.



        SSLv2 was obsoleted in 2011 and SSLv3 in 2015.



        The latest distributions do not implement SSLv2 and v3 anymore. Even in properly config sites that have old Unix /linux versions that still support those protocols, Apache has been configured to disable their use for ages.



        As you found out, the solution was to upgrade for more modern libraries /software that support other protocols. Be warned that if you have some internal legacy solution that depends on SSLv3, depending on the versions you upgrade your software, you might have problems in the near future.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 18 at 8:24

























        answered Mar 18 at 5:50









        Rui F RibeiroRui F Ribeiro

        42.1k1484142




        42.1k1484142



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506912%2fsslv3-alert-handshake-failure-error-from-feedparser-in-python-2-7-6-with-wor%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?