Re: Connect to SolrCloud using proxy in SolrJ

2016-09-30 Thread Mikhail Khludnev
I even tried to run zkCli with socksProxyHost/Port - no luck. But then
lurking internets reveal a chilling truth it won't ever work because
zookeeper Java client uses NIO which doesn't support proxies at all, at
contrast to good old java.net API. No way.

On Thu, Sep 29, 2016 at 12:06 PM, Mikhail Khludnev  wrote:

> Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might help,
> but I don't know exactly.
>
> On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat 
> wrote:
>
>> Hi Vincenzo,
>>
>> Yes, I have tried using the https protocol.  We are not able to connect
>> to Zookeeper's.
>>
>> I am getting the below error message.
>>
>> Could not connect to ZooKeeper zkHost within 1 ms
>>
>> Thanks and Regards,
>> Preeti Bhat
>>
>> -Original Message-
>> From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
>> Sent: Thursday, September 29, 2016 1:57 PM
>> To: solr-user@lucene.apache.org
>> Subject: Re: Connect to SolrCloud using proxy in SolrJ
>>
>> Hi,
>>
>> not sure, have you tried to add proxy configuration for https ?
>>
>> System.setProperty("https.proxyHost", ProxyHost);
>> System.setProperty("https.proxyPort", ProxyPort);
>>
>>
>> Bests,
>> Vincenzo
>>
>> On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat 
>> wrote:
>>
>> > HI All,
>> >
>> > Pinging this again. Could someone please advise.
>> >
>> >
>> > Thanks and Regards,
>> > Preeti Bhat
>> >
>> > From: Preeti Bhat
>> > Sent: Wednesday, September 28, 2016 7:14 PM
>> > To: solr-user@lucene.apache.org
>> > Subject: Connect to SolrCloud using proxy in SolrJ
>> >
>> > Hi All,
>> >
>> > I am trying to connect to the Solrcloud using the zookeeper host
>> > string in my java application(CloudSolrClient). I am able to connect
>> > to the solrcloud when there are no proxy settings needed, but when
>> > trying to connect to the code using proxy settings, I am getting the
>> below error.
>> >
>> >
>> > 1)  Without Proxy
>> >
>> > System.setProperty("javax.net.ssl.keyStore", keyStore);
>> >
>> > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>> >
>> > System.setProperty("javax.net.ssl.trustStore", trustStore);
>> >
>> > System.setProperty("javax.net.ssl.trustStorePassword",
>> > trustStorePsswd);
>> >
>> >
>> > HttpClientBuilder builder = HttpClientBuilder.create();
>> >builder.useSystemProperties();
>> >CloseableHttpClient httpclient = builder.build(); cloud_client
>> > = new CloudSolrClient(zkHost, httpclient);
>> > @SuppressWarnings("rawtypes")
>> > SolrRequest req = new QueryRequest();
>> > req.setBasicAuthCredentials(UserName, Password);
>> >cloud_client.request(req, collectionName);
>> >
>> > cloud_client.setDefaultCollection(collectionName);
>> >
>> > 2)  With Proxy code
>> >
>> > System.setProperty("javax.net.ssl.keyStore", keyStore);
>> >
>> > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>> >
>> > System.setProperty("javax.net.ssl.trustStore", trustStore);
>> >
>> > System.setProperty("javax.net.ssl.trustStorePassword",
>> > trustStorePsswd); System.setProperty("http.proxyHost", ProxyHost);
>> > System.setProperty("http.proxyPort", ProxyPort); HttpHost proxy = new
>> > HttpHost(ProxyHost, Integer.parseInt(ProxyPort)); RequestConfig
>> > defaultRequestConfig = RequestConfig.custom()
>> >  .setProxy(new
>> > HttpHost(ProxyHost, Integer.parseInt(ProxyPort))).build();
>> >
>> > HttpGet httpget = new HttpGet();
>> > httpget.setConfig(defaultRequestConfig);
>> >
>> > HttpClientBuilder builder = HttpClientBuilder.create();
>> > builder.useSystemProperties(); CloseableHttpClient httpclient =
>> > builder.build(); httpclient.execute(proxy, httpget); cloud_client =
>> > new CloudSolrClient(zkHost, httpclient);
>> > @SuppressWarnings("rawtypes")
>> > SolrRequest req = new QueryRequest();
>> > req.setBasicAuthCredentials(UserName, Password);
>> > cloud_client.request(req, collectionName);
>> > cloud_client.setDefaultCollection(coll

Re: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Susheel Kumar
As Vincenzo  mentioned above you shall try to check using telnet and if
connection fails, then you should try to set http proxy on terminal/command
line using this and then give try again with telnet.  As long as telnet
works, your code should also be able to connect

export http.proxy=http://
\:@:


Thanks,

Susheel

On Thu, Sep 29, 2016 at 8:09 AM, Vincenzo D'Amore 
wrote:

> Well, how have configured *cliend-side* zookeeper connection? I mean from
> the SolrJ side.
>
> And again as simple check to see if the proxy is working correctly with
> zookeeper you could use telnet.
>
> You should use the proxy hostname and proxy port available for zookeeper
> (it should be different from the port used for http proxy)
>
> # telnet proxy-host-name proxy-port
>
> and when the connection is established write:
>
> ruok 
>
> > "The server will respond with imok if it is running."
>
> https://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html
>
>
> On Thu, Sep 29, 2016 at 1:40 PM, Preeti Bhat 
> wrote:
>
> > Hi Vincenzo,
> >
> > We are verified that the zookeeper is not working on http already. We are
> > getting the error message stating that there is no response from server
> for
> > both proxy and non proxy enabled browsers.
> > I have setup the Zookeeper in AWS, SOLR is connecting to Zookeeper using
> > zkCli.sh from SOLR. I have not made any changes in the zookeeper settings
> > other than specifying the data directory and servers names in quorum.
> >
> > Also, I tried applying the SOCKS proxy in my application and got the
> error
> > stating "Malformed reply from SOCKS server". I am currently working with
> > Network team to see if we have separate Socks proxy settings.
> >
> > Thanks and Regards,
> > Preeti Bhat
> >
> > -----Original Message-
> > From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> > Sent: Thursday, September 29, 2016 5:02 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Connect to SolrCloud using proxy in SolrJ
> >
> > Well, looking around I found at this issue
> > https://issues.apache.org/jira/browse/ZOOKEEPER-2250
> > As far as I know zookeeper doesn't support socks proxy (may be better ask
> > in the zookeeper forum).
> >
> > Anyway in your email you wrote that zookeeper is "whitelisted in the
> proxy
> > under TCP protocol", so I suppose your proxy is able to transparently
> > bridge tcp connections.
> >
> > Given that make sure your proxy configuration for zookeeper is not
> working
> > on http.
> >
> > Just to understand, how have you configured your zookeeper connection?
> >
> >
> >
> > On Thu, Sep 29, 2016 at 11:06 AM, Mikhail Khludnev 
> > wrote:
> >
> > > Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might
> > > help, but I don't know exactly.
> > >
> > > On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat
> > > 
> > > wrote:
> > >
> > > > Hi Vincenzo,
> > > >
> > > > Yes, I have tried using the https protocol.  We are not able to
> > > > connect
> > > to
> > > > Zookeeper's.
> > > >
> > > > I am getting the below error message.
> > > >
> > > > Could not connect to ZooKeeper zkHost within 1 ms
> > > >
> > > > Thanks and Regards,
> > > > Preeti Bhat
> > > >
> > > > -Original Message-
> > > > From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> > > > Sent: Thursday, September 29, 2016 1:57 PM
> > > > To: solr-user@lucene.apache.org
> > > > Subject: Re: Connect to SolrCloud using proxy in SolrJ
> > > >
> > > > Hi,
> > > >
> > > > not sure, have you tried to add proxy configuration for https ?
> > > >
> > > > System.setProperty("https.proxyHost", ProxyHost);
> > > > System.setProperty("https.proxyPort", ProxyPort);
> > > >
> > > >
> > > > Bests,
> > > > Vincenzo
> > > >
> > > > On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat
> > > > 
> > > > wrote:
> > > >
> > > > > HI All,
> > > > >
> > > > > Pinging this again. Could someone please advise.
> > > > >
> > > > >
> > > > > Thanks and Regards,
> > > > > Preeti Bhat
> > > > >
> > > >

Re: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Vincenzo D'Amore
Well, how have configured *cliend-side* zookeeper connection? I mean from
the SolrJ side.

And again as simple check to see if the proxy is working correctly with
zookeeper you could use telnet.

You should use the proxy hostname and proxy port available for zookeeper
(it should be different from the port used for http proxy)

# telnet proxy-host-name proxy-port

and when the connection is established write:

ruok 

> "The server will respond with imok if it is running."

https://zookeeper.apache.org/doc/r3.1.2/zookeeperAdmin.html


On Thu, Sep 29, 2016 at 1:40 PM, Preeti Bhat 
wrote:

> Hi Vincenzo,
>
> We are verified that the zookeeper is not working on http already. We are
> getting the error message stating that there is no response from server for
> both proxy and non proxy enabled browsers.
> I have setup the Zookeeper in AWS, SOLR is connecting to Zookeeper using
> zkCli.sh from SOLR. I have not made any changes in the zookeeper settings
> other than specifying the data directory and servers names in quorum.
>
> Also, I tried applying the SOCKS proxy in my application and got the error
> stating "Malformed reply from SOCKS server". I am currently working with
> Network team to see if we have separate Socks proxy settings.
>
> Thanks and Regards,
> Preeti Bhat
>
> -Original Message-
> From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> Sent: Thursday, September 29, 2016 5:02 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Connect to SolrCloud using proxy in SolrJ
>
> Well, looking around I found at this issue
> https://issues.apache.org/jira/browse/ZOOKEEPER-2250
> As far as I know zookeeper doesn't support socks proxy (may be better ask
> in the zookeeper forum).
>
> Anyway in your email you wrote that zookeeper is "whitelisted in the proxy
> under TCP protocol", so I suppose your proxy is able to transparently
> bridge tcp connections.
>
> Given that make sure your proxy configuration for zookeeper is not working
> on http.
>
> Just to understand, how have you configured your zookeeper connection?
>
>
>
> On Thu, Sep 29, 2016 at 11:06 AM, Mikhail Khludnev 
> wrote:
>
> > Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might
> > help, but I don't know exactly.
> >
> > On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat
> > 
> > wrote:
> >
> > > Hi Vincenzo,
> > >
> > > Yes, I have tried using the https protocol.  We are not able to
> > > connect
> > to
> > > Zookeeper's.
> > >
> > > I am getting the below error message.
> > >
> > > Could not connect to ZooKeeper zkHost within 1 ms
> > >
> > > Thanks and Regards,
> > > Preeti Bhat
> > >
> > > -Original Message-
> > > From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> > > Sent: Thursday, September 29, 2016 1:57 PM
> > > To: solr-user@lucene.apache.org
> > > Subject: Re: Connect to SolrCloud using proxy in SolrJ
> > >
> > > Hi,
> > >
> > > not sure, have you tried to add proxy configuration for https ?
> > >
> > > System.setProperty("https.proxyHost", ProxyHost);
> > > System.setProperty("https.proxyPort", ProxyPort);
> > >
> > >
> > > Bests,
> > > Vincenzo
> > >
> > > On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat
> > > 
> > > wrote:
> > >
> > > > HI All,
> > > >
> > > > Pinging this again. Could someone please advise.
> > > >
> > > >
> > > > Thanks and Regards,
> > > > Preeti Bhat
> > > >
> > > > From: Preeti Bhat
> > > > Sent: Wednesday, September 28, 2016 7:14 PM
> > > > To: solr-user@lucene.apache.org
> > > > Subject: Connect to SolrCloud using proxy in SolrJ
> > > >
> > > > Hi All,
> > > >
> > > > I am trying to connect to the Solrcloud using the zookeeper host
> > > > string in my java application(CloudSolrClient). I am able to
> > > > connect to the solrcloud when there are no proxy settings needed,
> > > > but when trying to connect to the code using proxy settings, I am
> > > > getting the
> > > below error.
> > > >
> > > >
> > > > 1)  Without Proxy
> > > >
> > > > System.setProperty("javax.net.ssl.keyStore", keyStore);
> > > >
> > > > System.setProperty("javax.net.ssl.keyStorePassword",
> > &g

RE: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Preeti Bhat
Hi Vincenzo,

We are verified that the zookeeper is not working on http already. We are 
getting the error message stating that there is no response from server for 
both proxy and non proxy enabled browsers.
I have setup the Zookeeper in AWS, SOLR is connecting to Zookeeper using 
zkCli.sh from SOLR. I have not made any changes in the zookeeper settings other 
than specifying the data directory and servers names in quorum.

Also, I tried applying the SOCKS proxy in my application and got the error 
stating "Malformed reply from SOCKS server". I am currently working with 
Network team to see if we have separate Socks proxy settings.

Thanks and Regards,
Preeti Bhat

-Original Message-
From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
Sent: Thursday, September 29, 2016 5:02 PM
To: solr-user@lucene.apache.org
Subject: Re: Connect to SolrCloud using proxy in SolrJ

Well, looking around I found at this issue
https://issues.apache.org/jira/browse/ZOOKEEPER-2250
As far as I know zookeeper doesn't support socks proxy (may be better ask in 
the zookeeper forum).

Anyway in your email you wrote that zookeeper is "whitelisted in the proxy 
under TCP protocol", so I suppose your proxy is able to transparently bridge 
tcp connections.

Given that make sure your proxy configuration for zookeeper is not working on 
http.

Just to understand, how have you configured your zookeeper connection?



On Thu, Sep 29, 2016 at 11:06 AM, Mikhail Khludnev  wrote:

> Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might
> help, but I don't know exactly.
>
> On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat
> 
> wrote:
>
> > Hi Vincenzo,
> >
> > Yes, I have tried using the https protocol.  We are not able to
> > connect
> to
> > Zookeeper's.
> >
> > I am getting the below error message.
> >
> > Could not connect to ZooKeeper zkHost within 1 ms
> >
> > Thanks and Regards,
> > Preeti Bhat
> >
> > -Original Message-
> > From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> > Sent: Thursday, September 29, 2016 1:57 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Connect to SolrCloud using proxy in SolrJ
> >
> > Hi,
> >
> > not sure, have you tried to add proxy configuration for https ?
> >
> > System.setProperty("https.proxyHost", ProxyHost);
> > System.setProperty("https.proxyPort", ProxyPort);
> >
> >
> > Bests,
> > Vincenzo
> >
> > On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat
> > 
> > wrote:
> >
> > > HI All,
> > >
> > > Pinging this again. Could someone please advise.
> > >
> > >
> > > Thanks and Regards,
> > > Preeti Bhat
> > >
> > > From: Preeti Bhat
> > > Sent: Wednesday, September 28, 2016 7:14 PM
> > > To: solr-user@lucene.apache.org
> > > Subject: Connect to SolrCloud using proxy in SolrJ
> > >
> > > Hi All,
> > >
> > > I am trying to connect to the Solrcloud using the zookeeper host
> > > string in my java application(CloudSolrClient). I am able to
> > > connect to the solrcloud when there are no proxy settings needed,
> > > but when trying to connect to the code using proxy settings, I am
> > > getting the
> > below error.
> > >
> > >
> > > 1)  Without Proxy
> > >
> > > System.setProperty("javax.net.ssl.keyStore", keyStore);
> > >
> > > System.setProperty("javax.net.ssl.keyStorePassword",
> > > keyStorePsswd);
> > >
> > > System.setProperty("javax.net.ssl.trustStore", trustStore);
> > >
> > > System.setProperty("javax.net.ssl.trustStorePassword",
> > > trustStorePsswd);
> > >
> > >
> > > HttpClientBuilder builder = HttpClientBuilder.create();
> > >builder.useSystemProperties();
> > >CloseableHttpClient httpclient = builder.build();
> > > cloud_client = new CloudSolrClient(zkHost, httpclient);
> > > @SuppressWarnings("rawtypes")
> > > SolrRequest req = new QueryRequest();
> > > req.setBasicAuthCredentials(UserName, Password);
> > >cloud_client.request(req, collectionName);
> > >
> > > cloud_client.setDefaultCollection(collectionName);
> > >
> > > 2)  With Proxy code
> > >
> > > System.setProperty("javax.net.ssl.keyStore", keyStore);
> > >
> > > System.setProperty("javax.net.ssl.keyStorePassword",
> > > keyStorePsswd);
> > &g

Re: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Vincenzo D'Amore
Well, looking around I found at this issue
https://issues.apache.org/jira/browse/ZOOKEEPER-2250
As far as I know zookeeper doesn't support socks proxy (may be better ask
in the zookeeper forum).

Anyway in your email you wrote that zookeeper is "whitelisted in the proxy
under TCP protocol", so I suppose your proxy is able to transparently
bridge tcp connections.

Given that make sure your proxy configuration for zookeeper is not working
on http.

Just to understand, how have you configured your zookeeper connection?



On Thu, Sep 29, 2016 at 11:06 AM, Mikhail Khludnev  wrote:

> Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might help,
> but I don't know exactly.
>
> On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat 
> wrote:
>
> > Hi Vincenzo,
> >
> > Yes, I have tried using the https protocol.  We are not able to connect
> to
> > Zookeeper's.
> >
> > I am getting the below error message.
> >
> > Could not connect to ZooKeeper zkHost within 1 ms
> >
> > Thanks and Regards,
> > Preeti Bhat
> >
> > -Original Message-
> > From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> > Sent: Thursday, September 29, 2016 1:57 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Connect to SolrCloud using proxy in SolrJ
> >
> > Hi,
> >
> > not sure, have you tried to add proxy configuration for https ?
> >
> > System.setProperty("https.proxyHost", ProxyHost);
> > System.setProperty("https.proxyPort", ProxyPort);
> >
> >
> > Bests,
> > Vincenzo
> >
> > On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat 
> > wrote:
> >
> > > HI All,
> > >
> > > Pinging this again. Could someone please advise.
> > >
> > >
> > > Thanks and Regards,
> > > Preeti Bhat
> > >
> > > From: Preeti Bhat
> > > Sent: Wednesday, September 28, 2016 7:14 PM
> > > To: solr-user@lucene.apache.org
> > > Subject: Connect to SolrCloud using proxy in SolrJ
> > >
> > > Hi All,
> > >
> > > I am trying to connect to the Solrcloud using the zookeeper host
> > > string in my java application(CloudSolrClient). I am able to connect
> > > to the solrcloud when there are no proxy settings needed, but when
> > > trying to connect to the code using proxy settings, I am getting the
> > below error.
> > >
> > >
> > > 1)  Without Proxy
> > >
> > > System.setProperty("javax.net.ssl.keyStore", keyStore);
> > >
> > > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
> > >
> > > System.setProperty("javax.net.ssl.trustStore", trustStore);
> > >
> > > System.setProperty("javax.net.ssl.trustStorePassword",
> > > trustStorePsswd);
> > >
> > >
> > > HttpClientBuilder builder = HttpClientBuilder.create();
> > >builder.useSystemProperties();
> > >CloseableHttpClient httpclient = builder.build(); cloud_client
> > > = new CloudSolrClient(zkHost, httpclient);
> > > @SuppressWarnings("rawtypes")
> > > SolrRequest req = new QueryRequest();
> > > req.setBasicAuthCredentials(UserName, Password);
> > >cloud_client.request(req, collectionName);
> > >
> > > cloud_client.setDefaultCollection(collectionName);
> > >
> > > 2)  With Proxy code
> > >
> > > System.setProperty("javax.net.ssl.keyStore", keyStore);
> > >
> > > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
> > >
> > > System.setProperty("javax.net.ssl.trustStore", trustStore);
> > >
> > > System.setProperty("javax.net.ssl.trustStorePassword",
> > > trustStorePsswd); System.setProperty("http.proxyHost", ProxyHost);
> > > System.setProperty("http.proxyPort", ProxyPort); HttpHost proxy = new
> > > HttpHost(ProxyHost, Integer.parseInt(ProxyPort)); RequestConfig
> > > defaultRequestConfig = RequestConfig.custom()
> > >  .setProxy(new
> > > HttpHost(ProxyHost, Integer.parseInt(ProxyPort))).build();
> > >
> > > HttpGet httpget = new HttpGet();
> > > httpget.setConfig(defaultRequestConfig);
> > >
> > > HttpClientBuilder builder = HttpClientBuilder.create();
> > > builder.useSystemProperties(); CloseableHttpClient httpclient =
> > > builder.build(); httpcl

Re: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Mikhail Khludnev
Zookeeper clients connect on tcp not http. Perhaps SOCKS proxy might help,
but I don't know exactly.

On Thu, Sep 29, 2016 at 11:55 AM, Preeti Bhat 
wrote:

> Hi Vincenzo,
>
> Yes, I have tried using the https protocol.  We are not able to connect to
> Zookeeper's.
>
> I am getting the below error message.
>
> Could not connect to ZooKeeper zkHost within 1 ms
>
> Thanks and Regards,
> Preeti Bhat
>
> -Original Message-
> From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
> Sent: Thursday, September 29, 2016 1:57 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Connect to SolrCloud using proxy in SolrJ
>
> Hi,
>
> not sure, have you tried to add proxy configuration for https ?
>
> System.setProperty("https.proxyHost", ProxyHost);
> System.setProperty("https.proxyPort", ProxyPort);
>
>
> Bests,
> Vincenzo
>
> On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat 
> wrote:
>
> > HI All,
> >
> > Pinging this again. Could someone please advise.
> >
> >
> > Thanks and Regards,
> > Preeti Bhat
> >
> > From: Preeti Bhat
> > Sent: Wednesday, September 28, 2016 7:14 PM
> > To: solr-user@lucene.apache.org
> > Subject: Connect to SolrCloud using proxy in SolrJ
> >
> > Hi All,
> >
> > I am trying to connect to the Solrcloud using the zookeeper host
> > string in my java application(CloudSolrClient). I am able to connect
> > to the solrcloud when there are no proxy settings needed, but when
> > trying to connect to the code using proxy settings, I am getting the
> below error.
> >
> >
> > 1)  Without Proxy
> >
> > System.setProperty("javax.net.ssl.keyStore", keyStore);
> >
> > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
> >
> > System.setProperty("javax.net.ssl.trustStore", trustStore);
> >
> > System.setProperty("javax.net.ssl.trustStorePassword",
> > trustStorePsswd);
> >
> >
> > HttpClientBuilder builder = HttpClientBuilder.create();
> >builder.useSystemProperties();
> >CloseableHttpClient httpclient = builder.build(); cloud_client
> > = new CloudSolrClient(zkHost, httpclient);
> > @SuppressWarnings("rawtypes")
> > SolrRequest req = new QueryRequest();
> > req.setBasicAuthCredentials(UserName, Password);
> >cloud_client.request(req, collectionName);
> >
> > cloud_client.setDefaultCollection(collectionName);
> >
> > 2)  With Proxy code
> >
> > System.setProperty("javax.net.ssl.keyStore", keyStore);
> >
> > System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
> >
> > System.setProperty("javax.net.ssl.trustStore", trustStore);
> >
> > System.setProperty("javax.net.ssl.trustStorePassword",
> > trustStorePsswd); System.setProperty("http.proxyHost", ProxyHost);
> > System.setProperty("http.proxyPort", ProxyPort); HttpHost proxy = new
> > HttpHost(ProxyHost, Integer.parseInt(ProxyPort)); RequestConfig
> > defaultRequestConfig = RequestConfig.custom()
> >  .setProxy(new
> > HttpHost(ProxyHost, Integer.parseInt(ProxyPort))).build();
> >
> > HttpGet httpget = new HttpGet();
> > httpget.setConfig(defaultRequestConfig);
> >
> > HttpClientBuilder builder = HttpClientBuilder.create();
> > builder.useSystemProperties(); CloseableHttpClient httpclient =
> > builder.build(); httpclient.execute(proxy, httpget); cloud_client =
> > new CloudSolrClient(zkHost, httpclient);
> > @SuppressWarnings("rawtypes")
> > SolrRequest req = new QueryRequest();
> > req.setBasicAuthCredentials(UserName, Password);
> > cloud_client.request(req, collectionName);
> > cloud_client.setDefaultCollection(collectionName);
> >
> >
> > Please note that the Zookeepers are already whitelisted in the proxy
> > under TCP protocol & SOLR servers are under https protocol.
> > Could someone please advise on this??
> >
> > Thanks and Regards,
> > Preeti Bhat
> >
> >
> >
> > NOTICE TO RECIPIENTS: This communication may contain confidential
> > and/or privileged information. If you are not the intended recipient
> > (or have received this communication in error) please notify the
> > sender and it-supp...@shoregrp.com immediately, and destroy this
> > communication. Any unauthorized copying, disclosure or distribution of
> > the material in this communication is strictly for

RE: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Preeti Bhat
Hi Vincenzo,

Yes, I have tried using the https protocol.  We are not able to connect to 
Zookeeper's.

I am getting the below error message.

Could not connect to ZooKeeper zkHost within 1 ms

Thanks and Regards,
Preeti Bhat

-Original Message-
From: Vincenzo D'Amore [mailto:v.dam...@gmail.com]
Sent: Thursday, September 29, 2016 1:57 PM
To: solr-user@lucene.apache.org
Subject: Re: Connect to SolrCloud using proxy in SolrJ

Hi,

not sure, have you tried to add proxy configuration for https ?

System.setProperty("https.proxyHost", ProxyHost); 
System.setProperty("https.proxyPort", ProxyPort);


Bests,
Vincenzo

On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat 
wrote:

> HI All,
>
> Pinging this again. Could someone please advise.
>
>
> Thanks and Regards,
> Preeti Bhat
>
> From: Preeti Bhat
> Sent: Wednesday, September 28, 2016 7:14 PM
> To: solr-user@lucene.apache.org
> Subject: Connect to SolrCloud using proxy in SolrJ
>
> Hi All,
>
> I am trying to connect to the Solrcloud using the zookeeper host
> string in my java application(CloudSolrClient). I am able to connect
> to the solrcloud when there are no proxy settings needed, but when
> trying to connect to the code using proxy settings, I am getting the below 
> error.
>
>
> 1)  Without Proxy
>
> System.setProperty("javax.net.ssl.keyStore", keyStore);
>
> System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>
> System.setProperty("javax.net.ssl.trustStore", trustStore);
>
> System.setProperty("javax.net.ssl.trustStorePassword",
> trustStorePsswd);
>
>
> HttpClientBuilder builder = HttpClientBuilder.create();
>builder.useSystemProperties();
>CloseableHttpClient httpclient = builder.build(); cloud_client
> = new CloudSolrClient(zkHost, httpclient);
> @SuppressWarnings("rawtypes")
> SolrRequest req = new QueryRequest();
> req.setBasicAuthCredentials(UserName, Password);
>cloud_client.request(req, collectionName);
>
> cloud_client.setDefaultCollection(collectionName);
>
> 2)  With Proxy code
>
> System.setProperty("javax.net.ssl.keyStore", keyStore);
>
> System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>
> System.setProperty("javax.net.ssl.trustStore", trustStore);
>
> System.setProperty("javax.net.ssl.trustStorePassword",
> trustStorePsswd); System.setProperty("http.proxyHost", ProxyHost);
> System.setProperty("http.proxyPort", ProxyPort); HttpHost proxy = new
> HttpHost(ProxyHost, Integer.parseInt(ProxyPort)); RequestConfig
> defaultRequestConfig = RequestConfig.custom()
>  .setProxy(new
> HttpHost(ProxyHost, Integer.parseInt(ProxyPort))).build();
>
> HttpGet httpget = new HttpGet();
> httpget.setConfig(defaultRequestConfig);
>
> HttpClientBuilder builder = HttpClientBuilder.create();
> builder.useSystemProperties(); CloseableHttpClient httpclient =
> builder.build(); httpclient.execute(proxy, httpget); cloud_client =
> new CloudSolrClient(zkHost, httpclient);
> @SuppressWarnings("rawtypes")
> SolrRequest req = new QueryRequest();
> req.setBasicAuthCredentials(UserName, Password);
> cloud_client.request(req, collectionName);
> cloud_client.setDefaultCollection(collectionName);
>
>
> Please note that the Zookeepers are already whitelisted in the proxy
> under TCP protocol & SOLR servers are under https protocol.
> Could someone please advise on this??
>
> Thanks and Regards,
> Preeti Bhat
>
>
>
> NOTICE TO RECIPIENTS: This communication may contain confidential
> and/or privileged information. If you are not the intended recipient
> (or have received this communication in error) please notify the
> sender and it-supp...@shoregrp.com immediately, and destroy this
> communication. Any unauthorized copying, disclosure or distribution of
> the material in this communication is strictly forbidden. Any views or
> opinions presented in this email are solely those of the author and do
> not necessarily represent those of the company. Finally, the recipient
> should check this email and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused by any virus 
> transmitted by this email.
>
>
>


--
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251

NOTICE TO RECIPIENTS: This communication may contain confidential and/or 
privileged information. If you are not the intended recipient (or have received 
this communication in error) please notify the sender and 
it-supp...@shoregrp.com immediately, and destroy this communication. Any 
unauthorized copying, disclosure or distribution of the material in this 
communication is strictly forbidden. Any views or opinions presented in this 
email are solely those of the author and do not necessarily represent those of 
the company. Finally, the recipient should check this email and any attachments 
for the presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.




Re: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Vincenzo D'Amore
Hi,

not sure, have you tried to add proxy configuration for https ?

System.setProperty("https.proxyHost", ProxyHost);
System.setProperty("https.proxyPort", ProxyPort);


Bests,
Vincenzo

On Thu, Sep 29, 2016 at 10:12 AM, Preeti Bhat 
wrote:

> HI All,
>
> Pinging this again. Could someone please advise.
>
>
> Thanks and Regards,
> Preeti Bhat
>
> From: Preeti Bhat
> Sent: Wednesday, September 28, 2016 7:14 PM
> To: solr-user@lucene.apache.org
> Subject: Connect to SolrCloud using proxy in SolrJ
>
> Hi All,
>
> I am trying to connect to the Solrcloud using the zookeeper host string in
> my java application(CloudSolrClient). I am able to connect to the solrcloud
> when there are no proxy settings needed, but when trying to connect to the
> code using proxy settings, I am getting the below error.
>
>
> 1)  Without Proxy
>
> System.setProperty("javax.net.ssl.keyStore", keyStore);
>
> System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>
> System.setProperty("javax.net.ssl.trustStore", trustStore);
>
> System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);
>
>
> HttpClientBuilder builder = HttpClientBuilder.create();
>builder.useSystemProperties();
>CloseableHttpClient httpclient = builder.build();
> cloud_client = new CloudSolrClient(zkHost, httpclient);
> @SuppressWarnings("rawtypes")
> SolrRequest req = new QueryRequest();
> req.setBasicAuthCredentials(UserName, Password);
>cloud_client.request(req, collectionName);
>
> cloud_client.setDefaultCollection(collectionName);
>
> 2)  With Proxy code
>
> System.setProperty("javax.net.ssl.keyStore", keyStore);
>
> System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);
>
> System.setProperty("javax.net.ssl.trustStore", trustStore);
>
> System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);
> System.setProperty("http.proxyHost", ProxyHost);
> System.setProperty("http.proxyPort", ProxyPort);
> HttpHost proxy = new HttpHost(ProxyHost, Integer.parseInt(ProxyPort));
> RequestConfig defaultRequestConfig = RequestConfig.custom()
>  .setProxy(new HttpHost(ProxyHost,
> Integer.parseInt(ProxyPort))).build();
>
> HttpGet httpget = new HttpGet();
> httpget.setConfig(defaultRequestConfig);
>
> HttpClientBuilder builder = HttpClientBuilder.create();
> builder.useSystemProperties();
> CloseableHttpClient httpclient = builder.build();
> httpclient.execute(proxy, httpget);
> cloud_client = new CloudSolrClient(zkHost, httpclient);
> @SuppressWarnings("rawtypes")
> SolrRequest req = new QueryRequest();
> req.setBasicAuthCredentials(UserName, Password);
> cloud_client.request(req, collectionName);
> cloud_client.setDefaultCollection(collectionName);
>
>
> Please note that the Zookeepers are already whitelisted in the proxy under
> TCP protocol & SOLR servers are under https protocol.
> Could someone please advise on this??
>
> Thanks and Regards,
> Preeti Bhat
>
>
>
> NOTICE TO RECIPIENTS: This communication may contain confidential and/or
> privileged information. If you are not the intended recipient (or have
> received this communication in error) please notify the sender and
> it-supp...@shoregrp.com immediately, and destroy this communication. Any
> unauthorized copying, disclosure or distribution of the material in this
> communication is strictly forbidden. Any views or opinions presented in
> this email are solely those of the author and do not necessarily represent
> those of the company. Finally, the recipient should check this email and
> any attachments for the presence of viruses. The company accepts no
> liability for any damage caused by any virus transmitted by this email.
>
>
>


-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


RE: Connect to SolrCloud using proxy in SolrJ

2016-09-29 Thread Preeti Bhat
HI All,

Pinging this again. Could someone please advise.


Thanks and Regards,
Preeti Bhat

From: Preeti Bhat
Sent: Wednesday, September 28, 2016 7:14 PM
To: solr-user@lucene.apache.org
Subject: Connect to SolrCloud using proxy in SolrJ

Hi All,

I am trying to connect to the Solrcloud using the zookeeper host string in my 
java application(CloudSolrClient). I am able to connect to the solrcloud when 
there are no proxy settings needed, but when trying to connect to the code 
using proxy settings, I am getting the below error.


1)  Without Proxy

System.setProperty("javax.net.ssl.keyStore", keyStore);

System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);

System.setProperty("javax.net.ssl.trustStore", trustStore);

System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);


HttpClientBuilder builder = HttpClientBuilder.create();
   builder.useSystemProperties();
   CloseableHttpClient httpclient = builder.build();
cloud_client = new CloudSolrClient(zkHost, httpclient);
@SuppressWarnings("rawtypes")
SolrRequest req = new QueryRequest();
req.setBasicAuthCredentials(UserName, Password);
   cloud_client.request(req, collectionName);

cloud_client.setDefaultCollection(collectionName);

2)  With Proxy code

System.setProperty("javax.net.ssl.keyStore", keyStore);

System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);

System.setProperty("javax.net.ssl.trustStore", trustStore);

System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);
System.setProperty("http.proxyHost", ProxyHost);
System.setProperty("http.proxyPort", ProxyPort);
HttpHost proxy = new HttpHost(ProxyHost, Integer.parseInt(ProxyPort));
RequestConfig defaultRequestConfig = RequestConfig.custom()
 .setProxy(new HttpHost(ProxyHost, 
Integer.parseInt(ProxyPort))).build();

HttpGet httpget = new HttpGet();
httpget.setConfig(defaultRequestConfig);

HttpClientBuilder builder = HttpClientBuilder.create();
builder.useSystemProperties();
CloseableHttpClient httpclient = builder.build();
httpclient.execute(proxy, httpget);
cloud_client = new CloudSolrClient(zkHost, httpclient);
@SuppressWarnings("rawtypes")
SolrRequest req = new QueryRequest();
req.setBasicAuthCredentials(UserName, Password);
cloud_client.request(req, collectionName);
cloud_client.setDefaultCollection(collectionName);


Please note that the Zookeepers are already whitelisted in the proxy under TCP 
protocol & SOLR servers are under https protocol.
Could someone please advise on this??

Thanks and Regards,
Preeti Bhat



NOTICE TO RECIPIENTS: This communication may contain confidential and/or 
privileged information. If you are not the intended recipient (or have received 
this communication in error) please notify the sender and 
it-supp...@shoregrp.com immediately, and destroy this communication. Any 
unauthorized copying, disclosure or distribution of the material in this 
communication is strictly forbidden. Any views or opinions presented in this 
email are solely those of the author and do not necessarily represent those of 
the company. Finally, the recipient should check this email and any attachments 
for the presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.




Connect to SolrCloud using proxy in SolrJ

2016-09-28 Thread Preeti Bhat
Hi All,

I am trying to connect to the Solrcloud using the zookeeper host string in my 
java application(CloudSolrClient). I am able to connect to the solrcloud when 
there are no proxy settings needed, but when trying to connect to the code 
using proxy settings, I am getting the below error.


1)  Without Proxy

System.setProperty("javax.net.ssl.keyStore", keyStore);

System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);

System.setProperty("javax.net.ssl.trustStore", trustStore);

System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);


HttpClientBuilder builder = HttpClientBuilder.create();
   builder.useSystemProperties();
   CloseableHttpClient httpclient = builder.build();
cloud_client = new CloudSolrClient(zkHost, httpclient);
@SuppressWarnings("rawtypes")
SolrRequest req = new QueryRequest();
req.setBasicAuthCredentials(UserName, Password);
   cloud_client.request(req, collectionName);

cloud_client.setDefaultCollection(collectionName);

2)  With Proxy code

System.setProperty("javax.net.ssl.keyStore", keyStore);

System.setProperty("javax.net.ssl.keyStorePassword", keyStorePsswd);

System.setProperty("javax.net.ssl.trustStore", trustStore);

System.setProperty("javax.net.ssl.trustStorePassword", trustStorePsswd);
System.setProperty("http.proxyHost", ProxyHost);
System.setProperty("http.proxyPort", ProxyPort);
HttpHost proxy = new HttpHost(ProxyHost, Integer.parseInt(ProxyPort));
RequestConfig defaultRequestConfig = RequestConfig.custom()
 .setProxy(new HttpHost(ProxyHost, 
Integer.parseInt(ProxyPort))).build();

HttpGet httpget = new HttpGet();
httpget.setConfig(defaultRequestConfig);

HttpClientBuilder builder = HttpClientBuilder.create();
builder.useSystemProperties();
CloseableHttpClient httpclient = builder.build();
httpclient.execute(proxy, httpget);
cloud_client = new CloudSolrClient(zkHost, httpclient);
@SuppressWarnings("rawtypes")
SolrRequest req = new QueryRequest();
req.setBasicAuthCredentials(UserName, Password);
cloud_client.request(req, collectionName);
cloud_client.setDefaultCollection(collectionName);


Please note that the Zookeepers are already whitelisted in the proxy under TCP 
protocol & SOLR servers are under https protocol.
Could someone please advise on this??

Thanks and Regards,
Preeti Bhat



NOTICE TO RECIPIENTS: This communication may contain confidential and/or 
privileged information. If you are not the intended recipient (or have received 
this communication in error) please notify the sender and 
it-supp...@shoregrp.com immediately, and destroy this communication. Any 
unauthorized copying, disclosure or distribution of the material in this 
communication is strictly forbidden. Any views or opinions presented in this 
email are solely those of the author and do not necessarily represent those of 
the company. Finally, the recipient should check this email and any attachments 
for the presence of viruses. The company accepts no liability for any damage 
caused by any virus transmitted by this email.