Re: Metric sink client keeps crashing the components with SSL-related exception

2017-02-14 Thread jeff saremi
This turned out to be a result of multiple versions of apache http components.
I made sure my code used the same version of dependencies as the HBase instance 
we had.


From: jeff saremi <jeffsar...@hotmail.com>
Sent: Tuesday, February 14, 2017 12:10:58 PM
To: user@hbase.apache.org
Subject: Metric sink client keeps crashing the components with SSL-related 
exception

This is really not an HBase issue but rather hadoop metrics issue (and it may 
not be that either) but I'll just post here to see if someone knows why this is 
happening.
I've created  a new Metrics2 Sink which will send the metrics over http to some 
server.

I can test this locally with no issues. However as soon as we place this in 
HBase, we get the following error:


2017-02-14 12:03:01,407 ERROR [main] master.HMasterCommandLine: Master exiting

java.lang.RuntimeException: Failed construction of Master: class 
org.apache.hadoop.hbase.master.HMaster.

at 
org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2422)
...

Caused by: java.lang.NoSuchFieldError: INSTANCE

at 
org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:144)

at 
org.apache.http.impl.conn.BasicHttpClientConnectionManager.getDefaultRegistry(BasicHttpClientConnectionManager.java:117)

at 
org.apache.http.impl.conn.BasicHttpClientConnectionManager.(BasicHttpClientConnectionManager.java:161)

at 
com.bing.hadoop.metrics.MdmServiceClient.(MdmServiceClient.java:30)

at com.bing.hadoop.metrics.MdmSink.init(MdmSink.java:37)

I have not even set the URL yet and my url is plain http and not https. I don't 
want SSL at all in this case.
Here's my construction code:

public MdmServiceClient(String server, int port) throws Exception {
HttpClientConnectionManager connectionManager = new 
BasicHttpClientConnectionManager();
_httpClient = 
HttpClientBuilder.create().setConnectionManager(connectionManager).build();
_uri = new 
URIBuilder().setScheme("http").setHost(server).setPort(port).setPath("/metrics").build();
}

Line 30 refers to new BasicHttp...

This is line 37 in MdmSink:

_mdmClient = new MdmServiceClient(server, port);

thanks


Metric sink client keeps crashing the components with SSL-related exception

2017-02-14 Thread jeff saremi
This is really not an HBase issue but rather hadoop metrics issue (and it may 
not be that either) but I'll just post here to see if someone knows why this is 
happening.
I've created  a new Metrics2 Sink which will send the metrics over http to some 
server.

I can test this locally with no issues. However as soon as we place this in 
HBase, we get the following error:


2017-02-14 12:03:01,407 ERROR [main] master.HMasterCommandLine: Master exiting

java.lang.RuntimeException: Failed construction of Master: class 
org.apache.hadoop.hbase.master.HMaster.

at 
org.apache.hadoop.hbase.master.HMaster.constructMaster(HMaster.java:2422)
...

Caused by: java.lang.NoSuchFieldError: INSTANCE

at 
org.apache.http.conn.ssl.SSLConnectionSocketFactory.(SSLConnectionSocketFactory.java:144)

at 
org.apache.http.impl.conn.BasicHttpClientConnectionManager.getDefaultRegistry(BasicHttpClientConnectionManager.java:117)

at 
org.apache.http.impl.conn.BasicHttpClientConnectionManager.(BasicHttpClientConnectionManager.java:161)

at 
com.bing.hadoop.metrics.MdmServiceClient.(MdmServiceClient.java:30)

at com.bing.hadoop.metrics.MdmSink.init(MdmSink.java:37)

I have not even set the URL yet and my url is plain http and not https. I don't 
want SSL at all in this case.
Here's my construction code:

public MdmServiceClient(String server, int port) throws Exception {
HttpClientConnectionManager connectionManager = new 
BasicHttpClientConnectionManager();
_httpClient = 
HttpClientBuilder.create().setConnectionManager(connectionManager).build();
_uri = new 
URIBuilder().setScheme("http").setHost(server).setPort(port).setPath("/metrics").build();
}

Line 30 refers to new BasicHttp...

This is line 37 in MdmSink:

_mdmClient = new MdmServiceClient(server, port);

thanks