sslv3 alert handshake failure – error from feedparser in Python 2.7.6 – with workaround
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom: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.
python ssl
add a comment |
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
2
Please post the answer separately, as an answer.
– G-Man
Mar 18 at 5:15
add a comment |
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
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
python ssl
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited Mar 18 at 8:24
answered Mar 18 at 5:50
Rui F RibeiroRui F Ribeiro
42.1k1484142
42.1k1484142
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
Please post the answer separately, as an answer.
– G-Man
Mar 18 at 5:15