Solr version: 4.2.1 

I'm creating a collection via Java using this function call: 

String collection = "profile-2"; 
CoreAdminRequest.Create createRequest = new CoreAdminRequest.Create(); 
createRequest.setCoreName(collection); 
createRequest.setCollection(collection); 
createRequest.setInstanceDir(collection); 
createRequest.setNumShards(1); 
createRequest.process(server); 

It is timing out with this exception (from the solr.out logs): 

SEVERE: org.apache.solr.common.SolrException: Error CREATEing SolrCore 
'profile-2': Could not get shard_id for core: profile-2 
coreNodeName:192.168.1.152:8983_solr_profile-2 
at 
org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:483)
 
at 
org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:140)
 
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 
at 
org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:591)
 
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:192)
 
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
 
... 
Caused by: org.apache.solr.common.SolrException: Could not get shard_id for 
core: profile-2 coreNodeName:192.168.1.152:8983_solr_profile-2 
at 
org.apache.solr.cloud.ZkController.doGetShardIdProcess(ZkController.java:1221) 
at org.apache.solr.cloud.ZkController.preRegister(ZkController.java:1290) 
at org.apache.solr.core.CoreContainer.registerCore(CoreContainer.java:861) 

In a "development" environment the zookeeper/solr instances are running with 
elevated permissions and this function worked without error. 
In a "test" environment (which matches the "production" environment) the 
permissions are more restricted. I made sure the group/owner of the 
/usr/local/solr directory are set up to be the correct user. 


Any insight into potential file permissions that I may be overlooking? 


Thank you, 
Mark 

Reply via email to