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:
$ sudo ls -l /var/solr/data
drwxr-xr-x 4 solr solr 4096 Mar 5 15:12 test_core
-rw-r----- 1 solr solr 2117 Apr 9 09:49 solr.xml
-rw-r----- 1 solr solr 975 Apr 9 09:49 zoo.cfg
I have a single node, no ZK.
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
There is nothing being printed in the log files.
I thought it might be because I enabled TLS.
My /etc/default/solr.in.sh (which was created during installation)
contains the minor configuration required for TLS, among other obvious
things such as where my data resides.
I checked the /usr/local/solr/bin/solr script, and I can see that
/etc/default/solr.in.sh in indeed checked and run it readable.
The Solr installer (reasonably) makes all scripts, etc. readable only by
the Solr user, and I'm never logged-in as Solr, so I can't read this
file normally. I therefore ended up having to run the command like this:
$ sudo /usr/local/solr/bin/solr create -V -c new_core
This was unexpected, because "everything goes through the web service."
Well, everything except for figuring out how to connect to the web
service, of course.
I think maybe the bin/solr script should maybe dump a message saying
"Can't read file $configfile ; might not be able to connect to Solr" or
something? It would have saved me a ton of time.