I am going to upgrade Python from 2.6.6 to 2.7.13
for the slider 0.92, the patch is already applied, right?

the patch file, it is following, adding some try blocks:

diff --git slider-agent/src/main/python/agent/main.py
slider-agent/src/main/python/agent/main.py
index 1932a37..2671777 100644
--- slider-agent/src/main/python/agent/main.py
+++ slider-agent/src/main/python/agent/main.py
@@ -47,6 +47,18 @@ logFileName = "slider-agent.log"

 SERVER_STATUS_URL="https://{0}:{1}{2}";

+# Monkey patch SSL as long as https:// hosts are used without a signed cert
+import ssl
+
+try:
+    _create_unverified_https_context = ssl._create_unverified_context
+except AttributeError:
+    # Legacy Python that doesn't verify HTTPS certificates by default
+    pass
+else:
+    # Handle target environment that doesn't support HTTPS verification
+    ssl._create_default_https_context = _create_unverified_https_context
+

 def signal_handler(signum, frame):
   #we want the handler to run only for the agent process and not


but why in the source code of 0.92 i downloaded I did not find this
patch applied, it is still following:

in the slider-agent/src/main/python/agent/main.py

logFileName = "slider-agent.log"

SERVER_STATUS_URL="https://{0}:{1}{2}";


def signal_handler(signum, frame):
  #we want the handler to run only for the agent process and not
  #for the children (e.g. namenode, etc.)


Cheng Yi


2017-05-09 22:34 GMT-07:00 Gopal Vijayaraghavan <gop...@apache.org>:

>
> > NetUtil.py:60 - [Errno 8] _ssl.c:492: EOF occurred in violation of
> protocol
>
> The error is directly related to the SSL verification error - TLSv1.0 vs
> TLSv1.2.
>
> JDK8 defaults to v1.2 and Python 2.6 defaults to v1.0.
>
> Python 2.7.9 + the patch in 0.92 might be needed to get this to work.
>
> AFAIK, there's no way to disable SSL in Apache Slider.
>
> Cheers,
> Gopal
>
>
>

Reply via email to