Thanks Vincenzo D'Amore & Shawn
Hi Ours is a legacy system using EJB, no maven or graddle. And now I’m able
to instantiate passing zk ip’s after removing the noggit jar.

As suggested

On Thu, 22 Jul 2021 at 4:01 PM, Vincenzo D'Amore <v.dam...@gmail.com> wrote:

> Are you using maven or gradle? You should just add
>
>         <dependency>
>             <groupId>org.apache.solr</groupId>
>             <artifactId>solr-solrj</artifactId>
>             <version>8.8.2</version>
>         </dependency>
>
> looking at dependency tree I see there are a lot of jars added:
>
> [INFO] +- org.apache.solr:solr-solrj:jar:8.7.0:compile
> [INFO] |  +- commons-io:commons-io:jar:2.8.0:compile
> [INFO] |  +- commons-lang:commons-lang:jar:2.6:compile
> [INFO] |  +- io.netty:netty-buffer:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-codec:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-common:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-handler:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-resolver:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-transport:jar:4.1.50.Final:compile
> [INFO] |  +- io.netty:netty-transport-native-epoll:jar:4.1.50.Final:compile
> [INFO] |  +-
> io.netty:netty-transport-native-unix-common:jar:4.1.50.Final:compile
> [INFO] |  +- org.apache.commons:commons-math3:jar:3.6.1:compile
> [INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
> [INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
> [INFO] |  +- org.apache.httpcomponents:httpmime:jar:4.5.12:compile
> [INFO] |  +- org.apache.zookeeper:zookeeper:jar:3.6.2:compile
> [INFO] |  +- org.apache.zookeeper:zookeeper-jute:jar:3.6.2:compile
> [INFO] |  +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
> [INFO] |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
> [INFO] |  +-
> org.eclipse.jetty:jetty-alpn-client:jar:9.4.27.v20200227:compile
> [INFO] |  +-
> org.eclipse.jetty:jetty-alpn-java-client:jar:9.4.27.v20200227:compile
> [INFO] |  +- org.eclipse.jetty:jetty-client:jar:9.4.27.v20200227:compile
> [INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.4.27.v20200227:compile
> [INFO] |  +- org.eclipse.jetty:jetty-io:jar:9.4.27.v20200227:compile
> [INFO] |  +- org.eclipse.jetty:jetty-util:jar:9.4.27.v20200227:compile
> [INFO] |  +-
> org.eclipse.jetty.http2:http2-client:jar:9.4.27.v20200227:compile
> [INFO] |  +-
> org.eclipse.jetty.http2:http2-common:jar:9.4.27.v20200227:compile
> [INFO] |  +-
> org.eclipse.jetty.http2:http2-hpack:jar:9.4.27.v20200227:compile
> [INFO] |  +-
>
> org.eclipse.jetty.http2:http2-http-client-transport:jar:9.4.27.v20200227:compile
> [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.30:test
> [INFO] |  \- org.xerial.snappy:snappy-java:jar:1.1.7.6:compile
>
>
> On Thu, Jul 22, 2021 at 2:38 AM Reej Nayagam <reej...@gmail.com> wrote:
>
> > I tried earlier with zk ensemble, but when i try to get the
> > clusterstateprovider.getclusterstate , it throws me
> > "NO such method error : org.noggit.JSONParser.getFlags()
> > so I was using the solrurl,
> > i've added the jars solr-core-8.8.2, solr-solrj-8.8.2, zookeeper-3.6.3
> and
> > zookeeper-jute-3.6.3
> > Not sure if I need to add any additional jars, google didn’t help.
> >
> > *Thanks,*
> > *Reej*
> >
> >
> > On Thu, Jul 22, 2021 at 5:51 AM Vincenzo D'Amore <v.dam...@gmail.com>
> > wrote:
> >
> > > Hi Reej, I'm used to instantiate a new CloudSolrClient with the
> zookeeper
> > > ensemble. Well, something like this:
> > >
> > >    final List<String> zkServers = new ArrayList<String>();
> > >    zkServers.add("zookeeper1:2181"); zkServers.add("zookeeper2:2181");
> > > zkServers.add("zookeeper3:2181");
> > >    final SolrClient client = new CloudSolrClient.Builder(zkServers,
> > > Optional.empty()).build();
> > >
> > >
> > > On Wed, Jul 21, 2021 at 6:13 PM Reej Nayagam <reej...@gmail.com>
> wrote:
> > >
> > > > Hi All,
> > > >
> > > > I still face the same issue. Anyone had this issue before?
> > > > Im making client connection as below,
> > > > CloudSolrClinet client = new
> > CloudSolrClient.Builder("solrURL").build();
> > > > clusterstate = client.getClusterstateProvider().getClusterState();
> > > > when I check the replicas inside the cluster state the baseurl is
> http
> > > > instead of HTTPS
> > > > but when i hit the url in browser
> > > >  /solr/admin/collections?action=CLUSTERSTATUS, I can see the base_url
> > as
> > > > https
> > > > Im totally confused on whats wrong. Please help. Thanks
> > > >
> > > > *Thanks,*
> > > > *Reej*
> > > >
> > > >
> > > > On Wed, Jul 21, 2021 at 5:16 PM Reej M <reej...@gmail.com> wrote:
> > > >
> > > > >
> > > > >
> > > > > > On 21 Jul 2021, at 5:07 PM, Vincenzo D'Amore <v.dam...@gmail.com
> >
> > > > wrote:
> > > > > > Hi,
> > > > > Is ok sometime all of us just loose our cool.
> > > > > By the way we have followed the same steps as per the documentation
> > > only.
> > > > > Im trying to clear the zk data, clear everything and recheck again
> if
> > > > that
> > > > > might help. Thanks
> > > > >
> > > > > > this is your version,
> > > > > >
> > > > >
> > > >
> > >
> >
> https://solr.apache.org/guide/8_8/enabling-ssl.html#EnablingSSL-SolrCloud
> > > > > > anyway, pay attention to clusterprop
> > > > > >
> > > > >
> > > >
> > >
> >
> https://solr.apache.org/guide/8_8/enabling-ssl.html#update-cluster-properties-for-existing-collections
> > > > > >
> > > > > > On Wed, Jul 21, 2021 at 11:04 AM Vincenzo D'Amore <
> > > v.dam...@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > >> Have you double checked how ssl has been configured?
> > > > > >> I think this doc could help
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://solr.apache.org/guide/6_6/enabling-ssl.html#EnablingSSL-SolrCloud
> > > > > >>
> > > > > >> And double check the "clusterprop" urlScheme
> > > > > >>
> > > > > >> On Wed, Jul 21, 2021 at 11:01 AM Vincenzo D'Amore <
> > > v.dam...@gmail.com
> > > > >
> > > > > >> wrote:
> > > > > >>
> > > > > >>> Sorry for being so rude, I was in a hurry and just a while
> after
> > > the
> > > > > mail
> > > > > >>> was sent I thought you weren't in the position to take a
> > > screenshot.
> > > > > >>>
> > > > > >>>
> > > > > >>> On Wed, Jul 21, 2021 at 10:41 AM Reej Nayagam <
> reej...@gmail.com
> > >
> > > > > wrote:
> > > > > >>>
> > > > > >>>> Hi Sorry,
> > > > > >>>> My offic system doesn't have internet for security reasons.
> > > > > >>>> The issue is we have enabled ssl in solr and we try to get the
> > > > > >>>> clusterstate
> > > > > >>>> as  below
> > > > > >>>> cloudsolrclient.getclusterstateprovider.getclusterstate()
> > > > > >>>> then using the clusterstate doccollection
> > > > > >>>> DocCollection dc = clusterstate.getCollection(collectionName)
> > > > > >>>> for(Slice slice:dc.getSlices()){
> > > > > >>>>  for(Replica replica:slice.getReplicas()){
> > > > > >>>> replica.get("base_url")
> > > > > >>>> }
> > > > > >>>> }
> > > > > >>>>
> > > > > >>>> replica.get("base_url") -- returns a http url but what we have
> > > > > configured
> > > > > >>>> is a https url
> > > > > >>>> solr admin page we are able to access using https url and can
> > see
> > > > the
> > > > > >>>> clusterstatus with base_url having https node url
> > > > > >>>> Not sure how through java it is different
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> *Thanks,*
> > > > > >>>> *Reej*
> > > > > >>>>
> > > > > >>>>
> > > > > >>>> On Wed, Jul 21, 2021 at 4:19 PM Vincenzo D'Amore <
> > > > v.dam...@gmail.com>
> > > > > >>>> wrote:
> > > > > >>>>
> > > > > >>>>> your screenshots are unreadable, couldn't you copy and paste
> > the
> > > > text
> > > > > >>>> from
> > > > > >>>>> the screen?
> > > > > >>>>>
> > > > > >>>>> On Wed, Jul 21, 2021 at 9:18 AM Reej M <reej...@gmail.com>
> > > wrote:
> > > > > >>>>>
> > > > > >>>>>> Hi Team,
> > > > > >>>>>>
> > > > > >>>>>> We have enabled ssl. Solr version 8.8.2, zk - 3.6.3
> > > > > >>>>>> When we try to get the base url using
> > > > > >>>>>> cloudsolrclient.getclusterstateprovider, it returns http url
> > > > instead
> > > > > >>>> of
> > > > > >>>>>> HTTPS.
> > > > > >>>>>> Please find the screenshots while I debug,
> > > > > >>>>>> Code used
> > > > > >>>>>>
> > > > > >>>>>> From solr admin server - using
> > > > > >>>>>> /solr/admin/collection?action=CLUSTERSTATUS&wt=json return
> > https
> > > > as
> > > > > >>>> base url
> > > > > >>>>>>
> > > > > >>>>>> Kindly help to fix this. Thanks
> > > > > >>>>>>
> > > > > >>>>>
> > > > > >>>>>
> > > > > >>>>> --
> > > > > >>>>> Vincenzo D'Amore
> > > > > >>>>>
> > > > > >>>>>
> > > > > >>>>
> > > > > >>>
> > > > > >>>
> > > > > >>> --
> > > > > >>> Vincenzo D'Amore
> > > > > >>>
> > > > > >>>
> > > > > >>
> > > > > >> --
> > > > > >> Vincenzo D'Amore
> > > > > >>
> > > > > >>
> > > > > >
> > > > > > --
> > > > > > Vincenzo D'Amore
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Vincenzo D'Amore
> > >
> >
>
>
> --
> Vincenzo D'Amore
>
-- 
*Thanks,*
*Reej*

Reply via email to