Solr 6.1.0 loses cores after restart - solr

I installed a new solr instance for testing. I used this documentation: Take solr to production
It's working fine but on restart I'm losing all cores. They are not deleted but on start solr does not find them.
Any idea what is wrong?
.

You are most likely restarting Solr with a wrong solr home, as discussed in the document you linked to.
You can check the core location in the Admin UI's Overview screen for that core. Your home is above that location, where solr.xml file lives. Or you can look for the solr.solr.home variable in the Java Properties screen.

check
/opt/solr/server/solr/solr.xml
or
/var/solr/data/solr.xml
update coreRootDirectory
<solr>
<str name="coreRootDirectory">/path/to/solr/data/</str>
<solrcloud>

I solved this by restarting the service

Related

SolrCloud is always starting in Example. Solr Home configuration is not working

Solr Cloud always starts in example and configuration specified in solr.in.sh is not working.
What are changes required to start with custom configuration ?
I have setup Zookeeper in ensemble mode and also do changes in solr.in.sh. But, it seems Solr is always starts with Example
I saw your answer in comments, yet completing the answer for others.
To start solr in cloud mode you need to add "-cloud":- solr start -cloud
-e start in interactive mode with one example. This is just for newbies to get started with solrcloud

How to setup DIH scheduler on Solr 5.1.0

The wiki page explains how to setup scheduling in older version of Solr but it hasn't been updated for Solr 5.1.0. The problem is I can't configure the dataimport.properties file.
The instructions in the wiki:
regardless of whether you have single or multiple-core Solr, use
dataimport.properties located in your solr.home/conf (NOT solr.home/core/conf)
In Solr 5.1 there is no dataimport.properties located in solr.home/conf, and it doesn't work if I use the one in the core.
Is there any way I can get this to work?
I have similar problem in my application.I have setup separate application to schedule delta/full-import.Wiki page you mentioned is not committed to Solr code base.
Hope this helps.

Solr instance for sitecore 7

I am trying to implement solr into sitecore but could not find any way for creating a Solr instance for the same. I have few PDFs from SDN I could find any way to create Solr instance in any. Considering that I am new to CMS I hope I could get some help here. Thank you
There are lots of resources available for setting up Solr, and integrating Sitecore.
Essentially Sitecore is ignorant with respects to how you setup Solr (barring a few exceptions), so you need to follow standard methods to set Solr up. If you are doing this on your local machine, then I recommend you simply download Solr and get it running through the provided Jetty App Server.
Once Solr is running, download the Solr Extensions from SDN, then follow the search scaling guide to integrate Solr. This really only boils down to the following;
Remove Lucene config files
Add Solr config files and binaries
Add Solr endpoint into relevant config
Generate Solr Schema via Sitecore -> Control Panel -> Search (within Sitecore)
Add Schema file to Solr Core configuration
et voila
There is a great guide here: http://www.dansolovay.com/2013/05/setting-up-solr-with-sitecore-7.html

Changing Schema.xml in SolrCloud setup

how do i change the schema.xml for a collection in SolrCloud?
I have set up a zookeeper-ensemble on 3 nodes and i guess i could make the changes there, but don't know exactly.
You can reload schema.xml for cores on SolrCloud by using zkCli.sh
More details in the Stackoverflow link: Reloading Zoo keeper solr conf (schema.xml)
As of Solr 5.x released, a Schema API was implemented to change the Schema more easily:
https://cwiki.apache.org/confluence/display/solr/Schema+API
The easiest way would be to use 1 node as a bootstrapper, you may add a bootstrap_configdir pointing to your configuration directory. Restarting the service would upload configuration files.
Another option is to use the ZkCli - you can find the usage examples here: http://wiki.apache.org/solr/SolrCloud

Disappearing cores in Solr

I am new to Solr.
I have created two cores from the admin page, let's call them "books" and "libraries", and imported some data there. Everything works without a hitch until I restart the server. When I do so, one of these cores disappears, and the logging screen in the admin page contains:
SEVERE CoreContainer null:java.lang.NoClassDefFoundError: net/arnx/jsonic/JSONException
SEVERE SolrCore REFCOUNT ERROR: unreferenced org.apache.solr.core.SolrCore#454055ac (papers) has a reference count of 1
I was testing my query in the admin interface; when I refreshed it, the "libraries" core was gone, even though I could normally query it just a minute earlier. The contents of solr.xml are intact. Even if I restart Tomcat, it remains gone.
Additionally, I was trying to build a query similar to this: "Find books matching 'war peace' in libraries in Atlanta or New York". So given cores "books" and "libraries", I would issue "books" the following query (which might be wrong, if it is please correct me):
(title:(war peace) blurb:(war peace))
AND _query_:"{!join
fromIndex=libraries from=libraryid to=libraryid
v='city:(new york) city:(atlanta)'}"
When I do so, the query fails with "libraries" core disappears, with the above symptoms. If I re-add it, I can continue working (as long as I don't restart the server or issue another join query).
I am using Solr 4.0; if anyone has a clue what is happening, I would be very grateful. I could not find out anything about the meaning of the error message, so if anyone could suggest where to look for that, or how go about debugging this, it would be really great. I can't even find where the log file itself is located...
I would avoid the Debian package which may be misconfigured and quirky. And it contains (a very early build of?) solr 4.0, which itself may have lingering issues; being the first release in a new major version. The package maintainer may not have incorporated the latest and safest Solr release into his package.
A better way is to download Solr 4.1 yourself and set it up yourself with Tomcat or another servlet container.
In case you are looking to install SOLR 4.0 and configure, you can following the installation procedure from here
Update the solr config for the cores to be persistent.
In your solr.xml, update <solr> or <solr persistent="false"> to <solr persistent="true">

Resources