DataStax Help Center

Solr core creation fails with "Missing core name"

Summary

DSE users attempting to create a Solr core are seeing Missing core name failure entries in the Cassandra system.log.

Symptoms

When attempting to load or reload a Solr core on the command-line with curl, the command returns HTTP error 400 (bad request).

Here is an example DSE 4.5.1 log entries:

WARN [http-8983-4] 2015-03-27 10:33:34,347 SolrCoreResourceManager.java (line 695) Missing core name
ERROR [http-8983-4] 2015-03-27 10:33:34,348 SolrException.java (line 124) org.apache.solr.common.SolrException: Missing core name
at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.checkCoreName(SolrCoreResourceManager.java:696)
at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.createCore(SolrCoreResourceManager.java:234)
at com.datastax.bdp.search.solr.handler.admin.CassandraCoreAdminHandler.handleCreateAction(CassandraCoreAdminHandler.java:117)
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:152)
...
INFO [http-8983-4] 2015-03-27 10:33:34,348 SolrDispatchFilter.java (line 672) [admin] webapp=null path=/admin/cores params={action=CREATE} status=400 QTime=2
ERROR [http-8983-4] 2015-03-27 10:33:34,348 SolrDispatchFilter.java (line 696) Error request exception: Missing core name
org.apache.solr.common.SolrException: Missing core name
at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.checkCoreName(SolrCoreResourceManager.java:696)
at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.createCore(SolrCoreResourceManager.java:234)
at com.datastax.bdp.search.solr.handler.admin.CassandraCoreAdminHandler.handleCreateAction(CassandraCoreAdminHandler.java:117)
...
ERROR [http-8983-4] 2015-03-27 10:33:34,349 SolrDispatchFilter.java (line 697) Error request params: action=CREATE

Cause

The URL used to create the core is not getting posted completely by the curl command due to the ampersand character (&) being interpreted differently by the unix shell.

In the example above, only action=CREATE is getting posted as the HTTP request parameters and the rest are truncated.

Solution

When creating the core on the command-line, enclose the URL in double quotes as follows:

$ curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=ks.table"

This will ensure the full URL is getting posted to Solr.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk