You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Kojo <rb...@gmail.com> on 2023/08/10 12:36:50 UTC

SQL Request Handler

Hi,
I'm trying to get the SQL query requestHandler up and running using this
config: <requestHandler name="/sql" class="solr.SQLHandler">.

My setup involves solr-9.0.0 in cloud mode with ZooKeeper.

I went through the Solr documentation, but I'm hitting a roadblock with
just that. Do you know any other sources that might help? I've already
checked out the official Solr documentation here:
https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration

Here's what I've tried so far, but sadly, no luck:

- Tried a query on the admin page.
- Attempted to connect via sqlalchemy-solr.
- Gave a shot at sending a request to the _sql/ endpoint.

On the config side of things:

- Initially, I thought I could get away with no extra config, as per Solr's
docs. Supposedly, the /sql request handler should already be good to go in
a regular Solr installation.

- Then I got a bit fancy and added the request handler config directly into
the solrconfig.xml file like this:

<requestHandler name="/sql" class="solr.SQLHandler">
    <lst name="defaults">
        <str name="config">solrconfig.xml</str>
    </lst>
</requestHandler>


To solve this puzzle, I tried these moves:

Grabbed the solr-core-9.0.0.jar library from
/server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
<solr_home>/server/lib/.
I doubled down and copied the solr-sql-9.0.0.jar from
<solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
<solr_home>/server/lib/ext/.
Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
point to the outside library directory:

<lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />


I'm reaching out to see if I'm on the right track here. If I am, I'm
planning to keep poking around and maybe get some error logs to show you
later. But if I'm off the mark, your tips or suggestions for other places
to look would be awesome.

Thanks a bunch for your help!

Cheers,
Koji

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
Hi, I managed to get the SQL Request Handler to work in my quick and
dirty Docker Solr Cloud setup.

You are amazing! Thanks again!


Em sex., 11 de ago. de 2023 às 10:20, Kojo <rb...@gmail.com> escreveu:
>
> I have set up a local Solr 9.3.0 and ZooKeeper in containers, and
> everything is running smoothly. However, while trying to create
> collections, I can successfully use the _default config set. I have
> tested by downloading and uploading the _default configuration using
> downconfig and upconfig respectively, and all works as expected.
>
> The issue arises when I attempt to upload my custom configset, which
> worked flawlessly with Solr 9.0.0. Strangely, I'm unable to create a
> new collection with this configset in Solr 9.3.0. Despite
> investigating the Solr logs, I haven't found any hints pointing to the
> root of the problem.
>
> Are you aware of any notable changes in the structure or format of
> configset files between Solr version 9.0.0 and 9.3.0 that might be
> causing this unexpected behavior?
>
>
>
>
>
> 2023-08-11 13:10:51.993 ERROR (qtp851765426-122) [c:ccc]
> o.a.s.h.RequestHandlerBase Client exception =>
> org.apache.solr.common.SolrException: Underlying core creation failed
> while creating collection: ccc
> at org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:56)
> org.apache.solr.common.SolrException: Underlying core creation failed
> while creating collection: ccc
> at org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:56)
> ~[?:?]
> at org.apache.solr.handler.admin.api.CreateCollectionAPI.createCollection(CreateCollectionAPI.java:140)
> ~[?:?]
> at org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.lambda$static$0(CollectionsHandler.java:510)
> ~[?:?]
> at org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.execute(CollectionsHandler.java:1266)
> ~[?:?]
> at org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:312)
> ~[?:?]
> at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:290)
> ~[?:?]
> at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:224)
> ~[?:?]
> at org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:928)
> ~[?:?]
> at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:876)
> ~[?:?]
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:547) ~[?:?]
> at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:250)
> ~[?:?]
> at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:218)
> ~[?:?]
> at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> ~[?:?]
> at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> ~[?:?]
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:213)
> ~[?:?]
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
> ~[?:?]
> at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
> ~[jetty-servlet-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
> ~[jetty-servlet-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
> ~[jetty-servlet-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
> ~[jetty-security-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
> ~[jetty-servlet-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:228)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:141)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:301)
> ~[jetty-rewrite-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.Server.handle(Server.java:563)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
> ~[jetty-server-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
> ~[jetty-io-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
> ~[jetty-io-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
> ~[jetty-io-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
> ~[jetty-util-10.0.15.jar:10.0.15]
> at java.lang.Thread.run(Unknown Source) [?:?]
>
> Em qui., 10 de ago. de 2023 às 16:12, Kojo <rb...@gmail.com> escreveu:
> >
> > I will give it a shot on my local dev. If anyone has any suggestion
> > for a docker setup with  Solr Cloud and Zookeeper, it will be very
> > appreciated! :)
> >
> > I will try this one:
> > https://github.com/freedev/solrcloud-zookeeper-docker/tree/master
> >
> > Thanks!
> >
> > Em qui., 10 de ago. de 2023 às 15:48, Houston Putman
> > <ho...@apache.org> escreveu:
> > >
> > > Please try a more recent version of Solr. 9.3.0 has fixed many classloading
> > > issues since 9.0.0.
> > >
> > > - Houston
> > >
> > > On Thu, Aug 10, 2023 at 2:45 PM Kojo <rb...@gmail.com> wrote:
> > >
> > > > When I add <requestHandler name="/sql"
> > > > class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
> > > > cannot even create a new collection:
> > > >
> > > >
> > > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > > shard: http://192.168.0.65:7574/solr
> > > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > > shard: http://192.168.0.65:7574/solr
> > > > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > > > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > > > 'teste_shard1_replica_n7': Unable to create core
> > > > [teste_shard1_replica_n7] Caused by:
> > > > org.apache.solr.common.SolrException
> > > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > > shard: http://192.168.0.65:8983/solr
> > > > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > > > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > > > 'teste_shard2_replica_n2': Unable to create core
> > > > [teste_shard2_replica_n2] Caused by:
> > > > org.apache.solr.common.SolrException
> > > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > > shard: http://192.168.0.65:8983/solr
> > > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
> > > > collection [teste].
> > > > 10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
> > > > Collection: teste operation: create failed
> > > >
> > > >
> > > > Em qui., 10 de ago. de 2023 às 15:41, Kojo <rb...@gmail.com> escreveu:
> > > > >
> > > > > I used the command:
> > > > > /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
> > > > 192.168.0.65:2181
> > > > >
> > > > > A query on the dashboard does not work.
> > > > >
> > > > > This is the beggining of the stacktrace:
> > > > >
> > > > >
> > > > > 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection
> > > > s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4]
> > > > o.a.s.s.HttpSolrCall java.lang.RuntimeException:
> > > > java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException =>
> > > > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > > > org/apache/solr/common/SolrException
> > > > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > > > > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > > > org/apache/solr/common/SolrException
> > > > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> > > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > > janhoy - 2022-05-05 01:00:08]
> > > > > at
> > > > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> > > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> > > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> > > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> > > > ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> > > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> > > > ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > > at
> > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > >
> > > > > Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com>
> > > > escreveu:
> > > > >>
> > > > >> I included modules in solrconfig.xml, i thought it was enought.
> > > > >>
> > > > >> I will try later and post the result here.
> > > > >> bin/solr start -e techproducts -Dsolr.modules=sql
> > > > >>
> > > > >>
> > > > >> Thanks!
> > > > >>
> > > > >>
> > > > >>
> > > > >> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> > > > epugh@opensourceconnections.com> escreveu:
> > > > >>>
> > > > >>> You need to enable the sql module.  I suspect you won’t be the first
> > > > person with this email now that we have added modules.  It would be nice if
> > > > the UI told you that you need to restart Solr with that setting!
> > > > >>>
> > > > >>> SQL Query Language :: Apache Solr Reference Guide
> > > > >>> solr.apache.org
> > > > >>>
> > > > >>>
> > > > >>> bin/solr start -e techproducts -Dsolr.modules=sql
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
> > > > >>>
> > > > >>> Hi,
> > > > >>> I'm trying to get the SQL query requestHandler up and running using
> > > > this
> > > > >>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> > > > >>>
> > > > >>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> > > > >>>
> > > > >>> I went through the Solr documentation, but I'm hitting a roadblock with
> > > > >>> just that. Do you know any other sources that might help? I've already
> > > > >>> checked out the official Solr documentation here:
> > > > >>>
> > > > https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> > > > >>>
> > > > >>> Here's what I've tried so far, but sadly, no luck:
> > > > >>>
> > > > >>> - Tried a query on the admin page.
> > > > >>> - Attempted to connect via sqlalchemy-solr.
> > > > >>> - Gave a shot at sending a request to the _sql/ endpoint.
> > > > >>>
> > > > >>> On the config side of things:
> > > > >>>
> > > > >>> - Initially, I thought I could get away with no extra config, as per
> > > > Solr's
> > > > >>> docs. Supposedly, the /sql request handler should already be good to
> > > > go in
> > > > >>> a regular Solr installation.
> > > > >>>
> > > > >>> - Then I got a bit fancy and added the request handler config directly
> > > > into
> > > > >>> the solrconfig.xml file like this:
> > > > >>>
> > > > >>> <requestHandler name="/sql" class="solr.SQLHandler">
> > > > >>>    <lst name="defaults">
> > > > >>>        <str name="config">solrconfig.xml</str>
> > > > >>>    </lst>
> > > > >>> </requestHandler>
> > > > >>>
> > > > >>>
> > > > >>> To solve this puzzle, I tried these moves:
> > > > >>>
> > > > >>> Grabbed the solr-core-9.0.0.jar library from
> > > > >>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> > > > >>> <solr_home>/server/lib/.
> > > > >>> I doubled down and copied the solr-sql-9.0.0.jar from
> > > > >>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> > > > >>> <solr_home>/server/lib/ext/.
> > > > >>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> > > > >>> point to the outside library directory:
> > > > >>>
> > > > >>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> > > > >>>
> > > > >>>
> > > > >>> I'm reaching out to see if I'm on the right track here. If I am, I'm
> > > > >>> planning to keep poking around and maybe get some error logs to show
> > > > you
> > > > >>> later. But if I'm off the mark, your tips or suggestions for other
> > > > places
> > > > >>> to look would be awesome.
> > > > >>>
> > > > >>> Thanks a bunch for your help!
> > > > >>>
> > > > >>> Cheers,
> > > > >>> Koji
> > > > >>>
> > > > >>>
> > > > >>> _______________________
> > > > >>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> > > > | http://www.opensourceconnections.com | My Free/Busy
> > > > >>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> > > > >>> This e-mail and all contents, including attachments, is considered to
> > > > be Company Confidential unless explicitly stated otherwise, regardless of
> > > > whether attachments are marked as such.
> > > > >>>
> > > >

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
I have set up a local Solr 9.3.0 and ZooKeeper in containers, and
everything is running smoothly. However, while trying to create
collections, I can successfully use the _default config set. I have
tested by downloading and uploading the _default configuration using
downconfig and upconfig respectively, and all works as expected.

The issue arises when I attempt to upload my custom configset, which
worked flawlessly with Solr 9.0.0. Strangely, I'm unable to create a
new collection with this configset in Solr 9.3.0. Despite
investigating the Solr logs, I haven't found any hints pointing to the
root of the problem.

Are you aware of any notable changes in the structure or format of
configset files between Solr version 9.0.0 and 9.3.0 that might be
causing this unexpected behavior?





2023-08-11 13:10:51.993 ERROR (qtp851765426-122) [c:ccc]
o.a.s.h.RequestHandlerBase Client exception =>
org.apache.solr.common.SolrException: Underlying core creation failed
while creating collection: ccc
at org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:56)
org.apache.solr.common.SolrException: Underlying core creation failed
while creating collection: ccc
at org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:56)
~[?:?]
at org.apache.solr.handler.admin.api.CreateCollectionAPI.createCollection(CreateCollectionAPI.java:140)
~[?:?]
at org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.lambda$static$0(CollectionsHandler.java:510)
~[?:?]
at org.apache.solr.handler.admin.CollectionsHandler$CollectionOperation.execute(CollectionsHandler.java:1266)
~[?:?]
at org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:312)
~[?:?]
at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:290)
~[?:?]
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:224)
~[?:?]
at org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:928)
~[?:?]
at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:876)
~[?:?]
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:547) ~[?:?]
at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:250)
~[?:?]
at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:218)
~[?:?]
at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
~[?:?]
at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
~[?:?]
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:213)
~[?:?]
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
~[?:?]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
~[jetty-servlet-10.0.15.jar:10.0.15]
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
~[jetty-servlet-10.0.15.jar:10.0.15]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
~[jetty-servlet-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
~[jetty-security-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
~[jetty-servlet-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:228)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:141)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:301)
~[jetty-rewrite-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.Server.handle(Server.java:563)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
~[jetty-server-10.0.15.jar:10.0.15]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
~[jetty-io-10.0.15.jar:10.0.15]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
~[jetty-io-10.0.15.jar:10.0.15]
at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
~[jetty-io-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:416)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
~[jetty-util-10.0.15.jar:10.0.15]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
~[jetty-util-10.0.15.jar:10.0.15]
at java.lang.Thread.run(Unknown Source) [?:?]

Em qui., 10 de ago. de 2023 às 16:12, Kojo <rb...@gmail.com> escreveu:
>
> I will give it a shot on my local dev. If anyone has any suggestion
> for a docker setup with  Solr Cloud and Zookeeper, it will be very
> appreciated! :)
>
> I will try this one:
> https://github.com/freedev/solrcloud-zookeeper-docker/tree/master
>
> Thanks!
>
> Em qui., 10 de ago. de 2023 às 15:48, Houston Putman
> <ho...@apache.org> escreveu:
> >
> > Please try a more recent version of Solr. 9.3.0 has fixed many classloading
> > issues since 9.0.0.
> >
> > - Houston
> >
> > On Thu, Aug 10, 2023 at 2:45 PM Kojo <rb...@gmail.com> wrote:
> >
> > > When I add <requestHandler name="/sql"
> > > class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
> > > cannot even create a new collection:
> > >
> > >
> > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > shard: http://192.168.0.65:7574/solr
> > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > shard: http://192.168.0.65:7574/solr
> > > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > > 'teste_shard1_replica_n7': Unable to create core
> > > [teste_shard1_replica_n7] Caused by:
> > > org.apache.solr.common.SolrException
> > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > shard: http://192.168.0.65:8983/solr
> > > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > > 'teste_shard2_replica_n2': Unable to create core
> > > [teste_shard2_replica_n2] Caused by:
> > > org.apache.solr.common.SolrException
> > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > > shard: http://192.168.0.65:8983/solr
> > > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
> > > collection [teste].
> > > 10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
> > > Collection: teste operation: create failed
> > >
> > >
> > > Em qui., 10 de ago. de 2023 às 15:41, Kojo <rb...@gmail.com> escreveu:
> > > >
> > > > I used the command:
> > > > /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
> > > 192.168.0.65:2181
> > > >
> > > > A query on the dashboard does not work.
> > > >
> > > > This is the beggining of the stacktrace:
> > > >
> > > >
> > > > 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection
> > > s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4]
> > > o.a.s.s.HttpSolrCall java.lang.RuntimeException:
> > > java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException =>
> > > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > > org/apache/solr/common/SolrException
> > > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > > > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > > org/apache/solr/common/SolrException
> > > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> > > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > > janhoy - 2022-05-05 01:00:08]
> > > > at
> > > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> > > ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> > > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> > > ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > > at
> > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > >
> > > > Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com>
> > > escreveu:
> > > >>
> > > >> I included modules in solrconfig.xml, i thought it was enought.
> > > >>
> > > >> I will try later and post the result here.
> > > >> bin/solr start -e techproducts -Dsolr.modules=sql
> > > >>
> > > >>
> > > >> Thanks!
> > > >>
> > > >>
> > > >>
> > > >> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> > > epugh@opensourceconnections.com> escreveu:
> > > >>>
> > > >>> You need to enable the sql module.  I suspect you won’t be the first
> > > person with this email now that we have added modules.  It would be nice if
> > > the UI told you that you need to restart Solr with that setting!
> > > >>>
> > > >>> SQL Query Language :: Apache Solr Reference Guide
> > > >>> solr.apache.org
> > > >>>
> > > >>>
> > > >>> bin/solr start -e techproducts -Dsolr.modules=sql
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
> > > >>>
> > > >>> Hi,
> > > >>> I'm trying to get the SQL query requestHandler up and running using
> > > this
> > > >>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> > > >>>
> > > >>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> > > >>>
> > > >>> I went through the Solr documentation, but I'm hitting a roadblock with
> > > >>> just that. Do you know any other sources that might help? I've already
> > > >>> checked out the official Solr documentation here:
> > > >>>
> > > https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> > > >>>
> > > >>> Here's what I've tried so far, but sadly, no luck:
> > > >>>
> > > >>> - Tried a query on the admin page.
> > > >>> - Attempted to connect via sqlalchemy-solr.
> > > >>> - Gave a shot at sending a request to the _sql/ endpoint.
> > > >>>
> > > >>> On the config side of things:
> > > >>>
> > > >>> - Initially, I thought I could get away with no extra config, as per
> > > Solr's
> > > >>> docs. Supposedly, the /sql request handler should already be good to
> > > go in
> > > >>> a regular Solr installation.
> > > >>>
> > > >>> - Then I got a bit fancy and added the request handler config directly
> > > into
> > > >>> the solrconfig.xml file like this:
> > > >>>
> > > >>> <requestHandler name="/sql" class="solr.SQLHandler">
> > > >>>    <lst name="defaults">
> > > >>>        <str name="config">solrconfig.xml</str>
> > > >>>    </lst>
> > > >>> </requestHandler>
> > > >>>
> > > >>>
> > > >>> To solve this puzzle, I tried these moves:
> > > >>>
> > > >>> Grabbed the solr-core-9.0.0.jar library from
> > > >>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> > > >>> <solr_home>/server/lib/.
> > > >>> I doubled down and copied the solr-sql-9.0.0.jar from
> > > >>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> > > >>> <solr_home>/server/lib/ext/.
> > > >>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> > > >>> point to the outside library directory:
> > > >>>
> > > >>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> > > >>>
> > > >>>
> > > >>> I'm reaching out to see if I'm on the right track here. If I am, I'm
> > > >>> planning to keep poking around and maybe get some error logs to show
> > > you
> > > >>> later. But if I'm off the mark, your tips or suggestions for other
> > > places
> > > >>> to look would be awesome.
> > > >>>
> > > >>> Thanks a bunch for your help!
> > > >>>
> > > >>> Cheers,
> > > >>> Koji
> > > >>>
> > > >>>
> > > >>> _______________________
> > > >>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> > > | http://www.opensourceconnections.com | My Free/Busy
> > > >>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> > > >>> This e-mail and all contents, including attachments, is considered to
> > > be Company Confidential unless explicitly stated otherwise, regardless of
> > > whether attachments are marked as such.
> > > >>>
> > >

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
I will give it a shot on my local dev. If anyone has any suggestion
for a docker setup with  Solr Cloud and Zookeeper, it will be very
appreciated! :)

I will try this one:
https://github.com/freedev/solrcloud-zookeeper-docker/tree/master

Thanks!

Em qui., 10 de ago. de 2023 às 15:48, Houston Putman
<ho...@apache.org> escreveu:
>
> Please try a more recent version of Solr. 9.3.0 has fixed many classloading
> issues since 9.0.0.
>
> - Houston
>
> On Thu, Aug 10, 2023 at 2:45 PM Kojo <rb...@gmail.com> wrote:
>
> > When I add <requestHandler name="/sql"
> > class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
> > cannot even create a new collection:
> >
> >
> > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > shard: http://192.168.0.65:7574/solr
> > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > shard: http://192.168.0.65:7574/solr
> > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > 'teste_shard1_replica_n7': Unable to create core
> > [teste_shard1_replica_n7] Caused by:
> > org.apache.solr.common.SolrException
> > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > shard: http://192.168.0.65:8983/solr
> > 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> > org.apache.solr.common.SolrException: Error CREATEing SolrCore
> > 'teste_shard2_replica_n2': Unable to create core
> > [teste_shard2_replica_n2] Caused by:
> > org.apache.solr.common.SolrException
> > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> > shard: http://192.168.0.65:8983/solr
> > 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
> > collection [teste].
> > 10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
> > Collection: teste operation: create failed
> >
> >
> > Em qui., 10 de ago. de 2023 às 15:41, Kojo <rb...@gmail.com> escreveu:
> > >
> > > I used the command:
> > > /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
> > 192.168.0.65:2181
> > >
> > > A query on the dashboard does not work.
> > >
> > > This is the beggining of the stacktrace:
> > >
> > >
> > > 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection
> > s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4]
> > o.a.s.s.HttpSolrCall java.lang.RuntimeException:
> > java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException =>
> > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > org/apache/solr/common/SolrException
> > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > org/apache/solr/common/SolrException
> > > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> > ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> > janhoy - 2022-05-05 01:00:08]
> > > at
> > org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> > ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> > ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> > ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > > at
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> > ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > >
> > > Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com>
> > escreveu:
> > >>
> > >> I included modules in solrconfig.xml, i thought it was enought.
> > >>
> > >> I will try later and post the result here.
> > >> bin/solr start -e techproducts -Dsolr.modules=sql
> > >>
> > >>
> > >> Thanks!
> > >>
> > >>
> > >>
> > >> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> > epugh@opensourceconnections.com> escreveu:
> > >>>
> > >>> You need to enable the sql module.  I suspect you won’t be the first
> > person with this email now that we have added modules.  It would be nice if
> > the UI told you that you need to restart Solr with that setting!
> > >>>
> > >>> SQL Query Language :: Apache Solr Reference Guide
> > >>> solr.apache.org
> > >>>
> > >>>
> > >>> bin/solr start -e techproducts -Dsolr.modules=sql
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
> > >>>
> > >>> Hi,
> > >>> I'm trying to get the SQL query requestHandler up and running using
> > this
> > >>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> > >>>
> > >>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> > >>>
> > >>> I went through the Solr documentation, but I'm hitting a roadblock with
> > >>> just that. Do you know any other sources that might help? I've already
> > >>> checked out the official Solr documentation here:
> > >>>
> > https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> > >>>
> > >>> Here's what I've tried so far, but sadly, no luck:
> > >>>
> > >>> - Tried a query on the admin page.
> > >>> - Attempted to connect via sqlalchemy-solr.
> > >>> - Gave a shot at sending a request to the _sql/ endpoint.
> > >>>
> > >>> On the config side of things:
> > >>>
> > >>> - Initially, I thought I could get away with no extra config, as per
> > Solr's
> > >>> docs. Supposedly, the /sql request handler should already be good to
> > go in
> > >>> a regular Solr installation.
> > >>>
> > >>> - Then I got a bit fancy and added the request handler config directly
> > into
> > >>> the solrconfig.xml file like this:
> > >>>
> > >>> <requestHandler name="/sql" class="solr.SQLHandler">
> > >>>    <lst name="defaults">
> > >>>        <str name="config">solrconfig.xml</str>
> > >>>    </lst>
> > >>> </requestHandler>
> > >>>
> > >>>
> > >>> To solve this puzzle, I tried these moves:
> > >>>
> > >>> Grabbed the solr-core-9.0.0.jar library from
> > >>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> > >>> <solr_home>/server/lib/.
> > >>> I doubled down and copied the solr-sql-9.0.0.jar from
> > >>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> > >>> <solr_home>/server/lib/ext/.
> > >>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> > >>> point to the outside library directory:
> > >>>
> > >>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> > >>>
> > >>>
> > >>> I'm reaching out to see if I'm on the right track here. If I am, I'm
> > >>> planning to keep poking around and maybe get some error logs to show
> > you
> > >>> later. But if I'm off the mark, your tips or suggestions for other
> > places
> > >>> to look would be awesome.
> > >>>
> > >>> Thanks a bunch for your help!
> > >>>
> > >>> Cheers,
> > >>> Koji
> > >>>
> > >>>
> > >>> _______________________
> > >>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> > | http://www.opensourceconnections.com | My Free/Busy
> > >>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> > >>> This e-mail and all contents, including attachments, is considered to
> > be Company Confidential unless explicitly stated otherwise, regardless of
> > whether attachments are marked as such.
> > >>>
> >

Re: SQL Request Handler

Posted by Houston Putman <ho...@apache.org>.
Please try a more recent version of Solr. 9.3.0 has fixed many classloading
issues since 9.0.0.

- Houston

On Thu, Aug 10, 2023 at 2:45 PM Kojo <rb...@gmail.com> wrote:

> When I add <requestHandler name="/sql"
> class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
> cannot even create a new collection:
>
>
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:7574/solr
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:7574/solr
> 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> org.apache.solr.common.SolrException: Error CREATEing SolrCore
> 'teste_shard1_replica_n7': Unable to create core
> [teste_shard1_replica_n7] Caused by:
> org.apache.solr.common.SolrException
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:8983/solr
> 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> org.apache.solr.common.SolrException: Error CREATEing SolrCore
> 'teste_shard2_replica_n2': Unable to create core
> [teste_shard2_replica_n2] Caused by:
> org.apache.solr.common.SolrException
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:8983/solr
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
> collection [teste].
> 10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
> Collection: teste operation: create failed
>
>
> Em qui., 10 de ago. de 2023 às 15:41, Kojo <rb...@gmail.com> escreveu:
> >
> > I used the command:
> > /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
> 192.168.0.65:2181
> >
> > A query on the dashboard does not work.
> >
> > This is the beggining of the stacktrace:
> >
> >
> > 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection
> s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4]
> o.a.s.s.HttpSolrCall java.lang.RuntimeException:
> java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException =>
> java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> org/apache/solr/common/SolrException
> > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> org/apache/solr/common/SolrException
> > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> >
> > Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com>
> escreveu:
> >>
> >> I included modules in solrconfig.xml, i thought it was enought.
> >>
> >> I will try later and post the result here.
> >> bin/solr start -e techproducts -Dsolr.modules=sql
> >>
> >>
> >> Thanks!
> >>
> >>
> >>
> >> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> epugh@opensourceconnections.com> escreveu:
> >>>
> >>> You need to enable the sql module.  I suspect you won’t be the first
> person with this email now that we have added modules.  It would be nice if
> the UI told you that you need to restart Solr with that setting!
> >>>
> >>> SQL Query Language :: Apache Solr Reference Guide
> >>> solr.apache.org
> >>>
> >>>
> >>> bin/solr start -e techproducts -Dsolr.modules=sql
> >>>
> >>>
> >>>
> >>>
> >>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>> I'm trying to get the SQL query requestHandler up and running using
> this
> >>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> >>>
> >>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> >>>
> >>> I went through the Solr documentation, but I'm hitting a roadblock with
> >>> just that. Do you know any other sources that might help? I've already
> >>> checked out the official Solr documentation here:
> >>>
> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> >>>
> >>> Here's what I've tried so far, but sadly, no luck:
> >>>
> >>> - Tried a query on the admin page.
> >>> - Attempted to connect via sqlalchemy-solr.
> >>> - Gave a shot at sending a request to the _sql/ endpoint.
> >>>
> >>> On the config side of things:
> >>>
> >>> - Initially, I thought I could get away with no extra config, as per
> Solr's
> >>> docs. Supposedly, the /sql request handler should already be good to
> go in
> >>> a regular Solr installation.
> >>>
> >>> - Then I got a bit fancy and added the request handler config directly
> into
> >>> the solrconfig.xml file like this:
> >>>
> >>> <requestHandler name="/sql" class="solr.SQLHandler">
> >>>    <lst name="defaults">
> >>>        <str name="config">solrconfig.xml</str>
> >>>    </lst>
> >>> </requestHandler>
> >>>
> >>>
> >>> To solve this puzzle, I tried these moves:
> >>>
> >>> Grabbed the solr-core-9.0.0.jar library from
> >>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> >>> <solr_home>/server/lib/.
> >>> I doubled down and copied the solr-sql-9.0.0.jar from
> >>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> >>> <solr_home>/server/lib/ext/.
> >>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> >>> point to the outside library directory:
> >>>
> >>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> >>>
> >>>
> >>> I'm reaching out to see if I'm on the right track here. If I am, I'm
> >>> planning to keep poking around and maybe get some error logs to show
> you
> >>> later. But if I'm off the mark, your tips or suggestions for other
> places
> >>> to look would be awesome.
> >>>
> >>> Thanks a bunch for your help!
> >>>
> >>> Cheers,
> >>> Koji
> >>>
> >>>
> >>> _______________________
> >>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> | http://www.opensourceconnections.com | My Free/Busy
> >>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> >>> This e-mail and all contents, including attachments, is considered to
> be Company Confidential unless explicitly stated otherwise, regardless of
> whether attachments are marked as such.
> >>>
>

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
When I add <requestHandler name="/sql"
class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
cannot even create a new collection:


10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
shard: http://192.168.0.65:7574/solr
10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
shard: http://192.168.0.65:7574/solr
10/08/2023, 15:43:38 ERROR false RequestHandlerBase
org.apache.solr.common.SolrException: Error CREATEing SolrCore
'teste_shard1_replica_n7': Unable to create core
[teste_shard1_replica_n7] Caused by:
org.apache.solr.common.SolrException
10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
shard: http://192.168.0.65:8983/solr
10/08/2023, 15:43:38 ERROR false RequestHandlerBase
org.apache.solr.common.SolrException: Error CREATEing SolrCore
'teste_shard2_replica_n2': Unable to create core
[teste_shard2_replica_n2] Caused by:
org.apache.solr.common.SolrException
10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
shard: http://192.168.0.65:8983/solr
10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
collection [teste].
10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
Collection: teste operation: create failed


Em qui., 10 de ago. de 2023 às 15:41, Kojo <rb...@gmail.com> escreveu:
>
> I used the command:
> /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z 192.168.0.65:2181
>
> A query on the dashboard does not work.
>
> This is the beggining of the stacktrace:
>
>
> 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4] o.a.s.s.HttpSolrCall java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException => java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException
> at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException
> at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184) ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 - janhoy - 2022-05-05 01:00:08]
> at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322) ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
>
> Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com> escreveu:
>>
>> I included modules in solrconfig.xml, i thought it was enought.
>>
>> I will try later and post the result here.
>> bin/solr start -e techproducts -Dsolr.modules=sql
>>
>>
>> Thanks!
>>
>>
>>
>> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <ep...@opensourceconnections.com> escreveu:
>>>
>>> You need to enable the sql module.  I suspect you won’t be the first person with this email now that we have added modules.  It would be nice if the UI told you that you need to restart Solr with that setting!
>>>
>>> SQL Query Language :: Apache Solr Reference Guide
>>> solr.apache.org
>>>
>>>
>>> bin/solr start -e techproducts -Dsolr.modules=sql
>>>
>>>
>>>
>>>
>>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
>>>
>>> Hi,
>>> I'm trying to get the SQL query requestHandler up and running using this
>>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
>>>
>>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
>>>
>>> I went through the Solr documentation, but I'm hitting a roadblock with
>>> just that. Do you know any other sources that might help? I've already
>>> checked out the official Solr documentation here:
>>> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
>>>
>>> Here's what I've tried so far, but sadly, no luck:
>>>
>>> - Tried a query on the admin page.
>>> - Attempted to connect via sqlalchemy-solr.
>>> - Gave a shot at sending a request to the _sql/ endpoint.
>>>
>>> On the config side of things:
>>>
>>> - Initially, I thought I could get away with no extra config, as per Solr's
>>> docs. Supposedly, the /sql request handler should already be good to go in
>>> a regular Solr installation.
>>>
>>> - Then I got a bit fancy and added the request handler config directly into
>>> the solrconfig.xml file like this:
>>>
>>> <requestHandler name="/sql" class="solr.SQLHandler">
>>>    <lst name="defaults">
>>>        <str name="config">solrconfig.xml</str>
>>>    </lst>
>>> </requestHandler>
>>>
>>>
>>> To solve this puzzle, I tried these moves:
>>>
>>> Grabbed the solr-core-9.0.0.jar library from
>>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
>>> <solr_home>/server/lib/.
>>> I doubled down and copied the solr-sql-9.0.0.jar from
>>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
>>> <solr_home>/server/lib/ext/.
>>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
>>> point to the outside library directory:
>>>
>>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
>>>
>>>
>>> I'm reaching out to see if I'm on the right track here. If I am, I'm
>>> planning to keep poking around and maybe get some error logs to show you
>>> later. But if I'm off the mark, your tips or suggestions for other places
>>> to look would be awesome.
>>>
>>> Thanks a bunch for your help!
>>>
>>> Cheers,
>>> Koji
>>>
>>>
>>> _______________________
>>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com | My Free/Busy
>>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
>>> This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.
>>>

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
I used the command:
/opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
192.168.0.65:2181

A query on the dashboard does not work.

This is the beggining of the stacktrace:


2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection s:shard2
r:core_node7 x:bv_collection_shard2_replica_n4] o.a.s.s.HttpSolrCall
java.lang.RuntimeException: java.lang.NoClassDefFoundError:
org/apache/solr/common/SolrException => java.lang.RuntimeException:
java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException
at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
java.lang.RuntimeException: java.lang.NoClassDefFoundError:
org/apache/solr/common/SolrException
at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
janhoy - 2022-05-05 01:00:08]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]

Em qui., 10 de ago. de 2023 às 10:14, Kojo <rb...@gmail.com> escreveu:

> I included modules in solrconfig.xml, i thought it was enought.
>
> I will try later and post the result here.
> bin/solr start -e techproducts -Dsolr.modules=sql
>
>
> Thanks!
>
>
>
> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> epugh@opensourceconnections.com> escreveu:
>
>> You need to enable the sql module.  I suspect you won’t be the first
>> person with this email now that we have added modules.  It would be nice if
>> the UI told you that you need to restart Solr with that setting!
>>
>> SQL Query Language :: Apache Solr Reference Guide
>> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
>> solr.apache.org
>> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
>> [image: favicon.ico]
>> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
>> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
>>
>>
>> bin/solr start -e techproducts -Dsolr.modules=sql
>>
>>
>>
>>
>> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
>>
>> Hi,
>> I'm trying to get the SQL query requestHandler up and running using this
>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
>>
>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
>>
>> I went through the Solr documentation, but I'm hitting a roadblock with
>> just that. Do you know any other sources that might help? I've already
>> checked out the official Solr documentation here:
>>
>> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
>>
>> Here's what I've tried so far, but sadly, no luck:
>>
>> - Tried a query on the admin page.
>> - Attempted to connect via sqlalchemy-solr.
>> - Gave a shot at sending a request to the _sql/ endpoint.
>>
>> On the config side of things:
>>
>> - Initially, I thought I could get away with no extra config, as per
>> Solr's
>> docs. Supposedly, the /sql request handler should already be good to go in
>> a regular Solr installation.
>>
>> - Then I got a bit fancy and added the request handler config directly
>> into
>> the solrconfig.xml file like this:
>>
>> <requestHandler name="/sql" class="solr.SQLHandler">
>>    <lst name="defaults">
>>        <str name="config">solrconfig.xml</str>
>>    </lst>
>> </requestHandler>
>>
>>
>> To solve this puzzle, I tried these moves:
>>
>> Grabbed the solr-core-9.0.0.jar library from
>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
>> <solr_home>/server/lib/.
>> I doubled down and copied the solr-sql-9.0.0.jar from
>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
>> <solr_home>/server/lib/ext/.
>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
>> point to the outside library directory:
>>
>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
>>
>>
>> I'm reaching out to see if I'm on the right track here. If I am, I'm
>> planning to keep poking around and maybe get some error logs to show you
>> later. But if I'm off the mark, your tips or suggestions for other places
>> to look would be awesome.
>>
>> Thanks a bunch for your help!
>>
>> Cheers,
>> Koji
>>
>>
>> _______________________
>> *Eric Pugh **| *Founder & CEO | OpenSource Connections, LLC | 434.466.1467
>> | http://www.opensourceconnections.com | My Free/Busy
>> <http://tinyurl.com/eric-cal>
>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
>> <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
>> This e-mail and all contents, including attachments, is considered to be
>> Company Confidential unless explicitly stated otherwise, regardless
>> of whether attachments are marked as such.
>>
>>

Re: SQL Request Handler

Posted by Kojo <rb...@gmail.com>.
I included modules in solrconfig.xml, i thought it was enought.

I will try later and post the result here.
bin/solr start -e techproducts -Dsolr.modules=sql


Thanks!



Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
epugh@opensourceconnections.com> escreveu:

> You need to enable the sql module.  I suspect you won’t be the first
> person with this email now that we have added modules.  It would be nice if
> the UI told you that you need to restart Solr with that setting!
>
> SQL Query Language :: Apache Solr Reference Guide
> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
> solr.apache.org
> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
> [image: favicon.ico]
> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
> <https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module>
>
>
> bin/solr start -e techproducts -Dsolr.modules=sql
>
>
>
>
> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
>
> Hi,
> I'm trying to get the SQL query requestHandler up and running using this
> config: <requestHandler name="/sql" class="solr.SQLHandler">.
>
> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
>
> I went through the Solr documentation, but I'm hitting a roadblock with
> just that. Do you know any other sources that might help? I've already
> checked out the official Solr documentation here:
>
> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
>
> Here's what I've tried so far, but sadly, no luck:
>
> - Tried a query on the admin page.
> - Attempted to connect via sqlalchemy-solr.
> - Gave a shot at sending a request to the _sql/ endpoint.
>
> On the config side of things:
>
> - Initially, I thought I could get away with no extra config, as per Solr's
> docs. Supposedly, the /sql request handler should already be good to go in
> a regular Solr installation.
>
> - Then I got a bit fancy and added the request handler config directly into
> the solrconfig.xml file like this:
>
> <requestHandler name="/sql" class="solr.SQLHandler">
>    <lst name="defaults">
>        <str name="config">solrconfig.xml</str>
>    </lst>
> </requestHandler>
>
>
> To solve this puzzle, I tried these moves:
>
> Grabbed the solr-core-9.0.0.jar library from
> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> <solr_home>/server/lib/.
> I doubled down and copied the solr-sql-9.0.0.jar from
> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> <solr_home>/server/lib/ext/.
> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> point to the outside library directory:
>
> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
>
>
> I'm reaching out to see if I'm on the right track here. If I am, I'm
> planning to keep poking around and maybe get some error logs to show you
> later. But if I'm off the mark, your tips or suggestions for other places
> to look would be awesome.
>
> Thanks a bunch for your help!
>
> Cheers,
> Koji
>
>
> _______________________
> *Eric Pugh **| *Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> | http://www.opensourceconnections.com | My Free/Busy
> <http://tinyurl.com/eric-cal>
> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
> This e-mail and all contents, including attachments, is considered to be
> Company Confidential unless explicitly stated otherwise, regardless
> of whether attachments are marked as such.
>
>

Re: SQL Request Handler

Posted by Eric Pugh <ep...@opensourceconnections.com>.
You need to enable the sql module.  I suspect you won’t be the first person with this email now that we have added modules.  It would be nice if the UI told you that you need to restart Solr with that setting!

https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module

bin/solr start -e techproducts -Dsolr.modules=sql




> On Aug 10, 2023, at 8:36 AM, Kojo <rb...@gmail.com> wrote:
> 
> Hi,
> I'm trying to get the SQL query requestHandler up and running using this
> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> 
> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> 
> I went through the Solr documentation, but I'm hitting a roadblock with
> just that. Do you know any other sources that might help? I've already
> checked out the official Solr documentation here:
> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> 
> Here's what I've tried so far, but sadly, no luck:
> 
> - Tried a query on the admin page.
> - Attempted to connect via sqlalchemy-solr.
> - Gave a shot at sending a request to the _sql/ endpoint.
> 
> On the config side of things:
> 
> - Initially, I thought I could get away with no extra config, as per Solr's
> docs. Supposedly, the /sql request handler should already be good to go in
> a regular Solr installation.
> 
> - Then I got a bit fancy and added the request handler config directly into
> the solrconfig.xml file like this:
> 
> <requestHandler name="/sql" class="solr.SQLHandler">
>    <lst name="defaults">
>        <str name="config">solrconfig.xml</str>
>    </lst>
> </requestHandler>
> 
> 
> To solve this puzzle, I tried these moves:
> 
> Grabbed the solr-core-9.0.0.jar library from
> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> <solr_home>/server/lib/.
> I doubled down and copied the solr-sql-9.0.0.jar from
> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> <solr_home>/server/lib/ext/.
> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> point to the outside library directory:
> 
> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> 
> 
> I'm reaching out to see if I'm on the right track here. If I am, I'm
> planning to keep poking around and maybe get some error logs to show you
> later. But if I'm off the mark, your tips or suggestions for other places
> to look would be awesome.
> 
> Thanks a bunch for your help!
> 
> Cheers,
> Koji

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>	
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.