You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Yi Cheng <ph...@gmail.com> on 2017/05/09 22:41:59 UTC

question on setting up llap

Hi:



I have problem setting up llap engine.

The problem I have is

When the LLAP container starts it repeatedly report can’t connect to the
https SliderAppMaster.

Exception is following:





INFO 2017-05-09 22:04:56,437 Registry.py:69 - AM Host =
usplselux186.aaaaa.com, AM Secured Port = 33067, ping port = 47423

INFO 2017-05-09 22:04:56,437 main.py:292 - Connecting to the server at:
https://usplselux186.aaaaa.com:47423/ws/v1/slider/agents/

INFO 2017-05-09 22:04:56,437 NetUtil.py:75 - DEBUG: Trying to connect to
the server at https://usplselux186.aaaaa.com:47423/ws/v1/slider/agents/

INFO 2017-05-09 22:04:56,438 NetUtil.py:39 - Connecting to the following
url https://usplselux186.aaaaa.com:47423/ws/v1/slider/agents/

ERROR 2017-05-09 22:04:56,469 NetUtil.py:60 - [Errno 8] _ssl.c:492: EOF
occurred in violation of protocol

ERROR 2017-05-09 22:04:56,469 NetUtil.py:62 - SSLError: Failed to connect.
Please check openssl library versions.

Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1022468 for more
details.



I am using hive 2.1.0, slider 0.92.0, tez 0.8.5

I am wondering it looks the slider agent https server is started using jvm
(openjdk 1.8.0), and python client (2.6.6) tries to connect failed.

Any people experienced this before?



Many thanks.



Cheng Yi

Re: question on setting up llap

Posted by Yi Cheng <ph...@gmail.com>.
I have installed python 2.7.13
Still the same error.

I am having 3 node. (a,b,c)
When the SliderAppMaster is running on a, this can work normally.
But when the SliderAppMaster is started on b or c, this will throw the
error above.



2017-05-10 10:56 GMT-07:00 Gopal Vijayaraghavan <go...@apache.org>:

>
> > for the slider 0.92, the patch is already applied, right?
>
> Yes, except it has been refactored to a different place.
>
> https://github.com/apache/incubator-slider/blob/
> branches/branch-0.92/slider-agent/src/main/python/agent/NetUtil.py#L44
>
> Cheers,
> Gopal
>
>
>
>
>

Re: question on setting up llap

Posted by Gopal Vijayaraghavan <go...@apache.org>.
> for the slider 0.92, the patch is already applied, right?

Yes, except it has been refactored to a different place.

https://github.com/apache/incubator-slider/blob/branches/branch-0.92/slider-agent/src/main/python/agent/NetUtil.py#L44

Cheers,
Gopal





Re: question on setting up llap

Posted by Yi Cheng <ph...@gmail.com>.
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 <go...@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
>
>
>

Re: question on setting up llap

Posted by Gopal Vijayaraghavan <go...@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



Re: question on setting up llap

Posted by Yi Cheng <ph...@gmail.com>.
the jira's error is

 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)


it is a bit different, what i get is
NetUtil.py:60 - [Errno 8] _ssl.c:492: EOF occurred in violation of protocol


2017-05-09 17:35 GMT-07:00 Gopal Vijayaraghavan <go...@apache.org>:

>
> > ERROR 2017-05-09 22:04:56,469 NetUtil.py:62 - SSLError: Failed to
> connect. Please check openssl library versions.
> …
> > I am using hive 2.1.0, slider 0.92.0, tez 0.8.5
>
> AFAIK, this was reportedly fixed in 0.92.
>
> https://issues.apache.org/jira/browse/SLIDER-942
>
> I'm not sure if the fix in that patch will work on python 2.6.6.
>
> Cheers,
> Gopal
>
>
>

Re: question on setting up llap

Posted by Gopal Vijayaraghavan <go...@apache.org>.
> ERROR 2017-05-09 22:04:56,469 NetUtil.py:62 - SSLError: Failed to connect. Please check openssl library versions. 
…
> I am using hive 2.1.0, slider 0.92.0, tez 0.8.5

AFAIK, this was reportedly fixed in 0.92.

https://issues.apache.org/jira/browse/SLIDER-942

I'm not sure if the fix in that patch will work on python 2.6.6.

Cheers,
Gopal