Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8969

SQLHandler causes NPE in non-cloud mode

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.3, 7.0
    • Component/s: Parallel SQL
    • Labels:
      None

      Description

      It should instead throw a proper error message. Stack trace:

      1233075 INFO  (qtp97730845-21) [   x:logs] o.a.s.c.S.Request [logs]  webapp=/solr path=/sql params={stmt=SELECT+uid+FROM+logs} status=0 QTime=18
      1233095 INFO  (qtp97730845-21) [   x:logs] o.a.s.c.c.SolrZkClient Using default ZkCredentialsProvider
      1233109 ERROR (qtp97730845-21) [   x:logs] o.a.s.c.s.i.s.ExceptionStream org.apache.solr.common.SolrException: java.lang.NullPointerException
              at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:169)
              at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:115)
              at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:105)
              at org.apache.solr.common.cloud.ZkStateReader.<init>(ZkStateReader.java:200)
              at org.apache.solr.client.solrj.impl.CloudSolrClient.connect(CloudSolrClient.java:466)
              at org.apache.solr.client.solrj.io.SolrClientCache.getCloudSolrClient(SolrClientCache.java:48)
              at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:237)
              at org.apache.solr.client.solrj.io.stream.SelectStream.open(SelectStream.java:153)
              at org.apache.solr.client.solrj.io.stream.ExceptionStream.open(ExceptionStream.java:47)
              at org.apache.solr.handler.StreamHandler$TimerStream.open(StreamHandler.java:362)
              at org.apache.solr.response.TextResponseWriter.writeTupleStream(TextResponseWriter.java:301)
              at org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:167)
              at org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:183)
              at org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:299)
              at org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:95)
              at org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:60)
              at org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)
              at org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:725)
              at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:469)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:229)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
              at org.eclipse.jetty.server.Server.handle(Server.java:518)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
              at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
              at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
              at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
              at org.apache.zookeeper.client.ConnectStringParser.<init>(ConnectStringParser.java:50)
              at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:443)
              at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:380)
              at org.apache.solr.common.cloud.SolrZooKeeper.<init>(SolrZooKeeper.java:43)
              at org.apache.solr.common.cloud.ZkClientConnectionStrategy.createSolrZooKeeper(ZkClientConnectionStrategy.java:103)
              at org.apache.solr.common.cloud.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:37)
              at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:144)
              ... 44 more
      
      1. fix-static-sqlhandler.patch
        2 kB
        Kevin Risden
      2. SOLR-8969.patch
        5 kB
        Kevin Risden
      3. SOLR-8969.patch
        5 kB
        Kevin Risden

        Issue Links

          Activity

          Hide
          joel.bernstein Joel Bernstein added a comment -

          Yeah, it should.

          Show
          joel.bernstein Joel Bernstein added a comment - Yeah, it should.
          Hide
          risdenk Kevin Risden added a comment -

          Adding a patch with a test that prints "/sql Handler only works in Solr Cloud mode"

          Not 100% sure this is the right approach but saw that I had this patch and forgot to attach it.

          Show
          risdenk Kevin Risden added a comment - Adding a patch with a test that prints "/sql Handler only works in Solr Cloud mode" Not 100% sure this is the right approach but saw that I had this patch and forgot to attach it.
          Hide
          risdenk Kevin Risden added a comment -

          Moved zkHost null check before the stmt check. Tests pass for me.

          Joel Bernstein - can you take a peek?

          Show
          risdenk Kevin Risden added a comment - Moved zkHost null check before the stmt check. Tests pass for me. Joel Bernstein - can you take a peek?
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b00f10916bfdcd1bdf138ba46a8204091e0bb428 in lucene-solr's branch refs/heads/master from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b00f109 ]

          SOLR-8969: Resolve NPE for SQLHandler when in non-cloud mode

          Show
          jira-bot ASF subversion and git services added a comment - Commit b00f10916bfdcd1bdf138ba46a8204091e0bb428 in lucene-solr's branch refs/heads/master from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b00f109 ] SOLR-8969 : Resolve NPE for SQLHandler when in non-cloud mode
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2e03aa97b281fe95bed7f01f4ec1ebe33474f625 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2e03aa9 ]

          SOLR-8969: Resolve NPE for SQLHandler when in non-cloud mode

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2e03aa97b281fe95bed7f01f4ec1ebe33474f625 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2e03aa9 ] SOLR-8969 : Resolve NPE for SQLHandler when in non-cloud mode
          Show
          risdenk Kevin Risden added a comment - Caused two failures due to order of tests: https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/18025 https://jenkins.thetaphi.de/job/Lucene-Solr-6.x-Windows/511
          Hide
          risdenk Kevin Risden added a comment -

          Reopening to commit fix for test failures.

          Show
          risdenk Kevin Risden added a comment - Reopening to commit fix for test failures.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 7660dde458fd6f10cc7481d54a52ad7519b1a545 in lucene-solr's branch refs/heads/master from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7660dde ]

          SOLR-8969: Fix static cloud check

          Show
          jira-bot ASF subversion and git services added a comment - Commit 7660dde458fd6f10cc7481d54a52ad7519b1a545 in lucene-solr's branch refs/heads/master from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7660dde ] SOLR-8969 : Fix static cloud check
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 98827c5cad9fd8d0c26f34274509f55d9f6014d0 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=98827c5 ]

          SOLR-8969: Fix static cloud check

          Show
          jira-bot ASF subversion and git services added a comment - Commit 98827c5cad9fd8d0c26f34274509f55d9f6014d0 in lucene-solr's branch refs/heads/branch_6x from Kevin Risden [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=98827c5 ] SOLR-8969 : Fix static cloud check
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Closing after 6.3.0 release.

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.3.0 release.

            People

            • Assignee:
              risdenk Kevin Risden
              Reporter:
              markus17 Markus Jelsma
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development