lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Confusing error when creating a new core with TLS, service enabled
Date Tue, 10 Apr 2018 00:04:46 GMT
On 4/9/2018 12:58 PM, Christopher Schultz wrote:
> After playing-around with a Solr 7.2.1 instance launched from the
> extracted tarball, I decided to go ahead and create a "real service" on
> my Debian-based server.
>
> I've run the 7.3.0 install script, configured Solr for TLS, and moved my
> existing configuration into the data directory, here:

What was the *precise* command you used to install Solr?  Looking for
all the options you used, so I know where things are.  There shouldn't
be anything sensitive in that command, so I don't think you need to
redact it at all.  Also, what exactly did you add to
/etc/default/solr.in.sh?  Redact any passwords you put there if you need to.

> When trying to create a new core, I get an NPE running:
>
> $ /usr/local/solr/bin/solr create -V -c new_core
>
> WARNING: Using _default configset with data driven schema functionality.
> NOT RECOMMENDED for production use.
>          To turn off: bin/solr config -c new_core -p 8983 -property
> update.autoCreateFields -value false
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:731)
> 	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:642)
> 	at org.apache.solr.util.SolrCLI$CreateTool.runImpl(SolrCLI.java:1773)
> 	at org.apache.solr.util.SolrCLI$ToolBase.runTool(SolrCLI.java:176)
> 	at org.apache.solr.util.SolrCLI.main(SolrCLI.java:282)

Due to the way the code is written there in version 7.3, the exact
nature of the problem is lost and it's not possible to see it without a
change to the source code.  If you want to build a patched version of
7.3, you could re-run it to see exactly what happened.  Here's an issue
for the NPE problem:

https://issues.apache.org/jira/browse/SOLR-12206

Best guess about the error that it got:  When you ran the create
command, I think that Java was not able to validate the SSL certificate
from the Solr server.  This would be consistent with what I saw in the
source code.

For the problem you had later with "-force" ... this is *exactly* why
you shouldn't run bin/solr as root.  What happened is that the new core
directory was created as root, owned by root.  But then when Solr tried
to add the core, it needed to write a core.properties file to that
directory, but was not able to do so, probably because it's running as
"solr" and has no write permission in a directory owned by root.

The error in the message from the command with "-force" seems to have
schizophrenia.  It says it's trying to create a core named
"cshultz_patients" but the error mentions
/var/solr/data/new_core/core.properties ... which should only happen if
the core is named "new_core".  If you're going to redact log messages,
please be sure to do it in an entirely consistent manner.  If you didn't
edit that log, then that's very strange.

Thanks,
Shawn


Mime
View raw message