Support Questions

Find answers, ask questions, and share your expertise

Solr on HDP 2.5.3 Fails to understand NameService

avatar
Expert Contributor

Hello Team,

I have a running 2.5.3 cluster. Downloaded the Solr repo and got it added to Ambari as per the documentation available.

The SolrCloud is configured to use HDFS and I also see the directory /solr created in HDFS.

Below is the startup command that is getting executed, when I start the service from Ambari and the service successfully starts.

I issue is see is with -Dsolr.hdfs.home=hdfs://nameservice/solr which should also include the port. How can we modify this.

I tried setting the hdfs home property with the complete defaultfs path. hdfs://nameserivce is getting appended in every case.

Execute['/opt/lucidworks-hdpsearch/solr/bin/solr start -h solr-host -cloud -z zk1:2181,zk2:2181,zk3:2181/solr -Dsolr.directoryFactory=HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.hdfs.home=hdfs://nameservice/solr -p 8983 -m 512m >> /var/log/service_solr/solr-service.log 2>&1'] {'environment': {'JAVA_HOME': '/usr/java/default'}, 'user': 'solr'}

However, not able to create a collection or run the service check. 

solr Log says unknown host nameservice.

"ERROR [c:collection1 s:shard2 r:core_node2 x:collection1_shard2_replica1] org.apache.solr.core.CoreContainer (CoreContainer.java:826) - Error creating core [collection1_shard2_replica1]: java.net.UnknownHostException: nameservice"
1 ACCEPTED SOLUTION

avatar
Master Guru

Hi @Sundara Palanki

Can you check your solr.hdfs.home and solr.hdfs.confdir. Your solr.hdfs.home looks good, so check confdir, it should point to /etc/hadoop/conf/ and your hadoop conf files like core-site.xml should be there.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

I have been running this by using command line with active Namenode as host name in hdfs path now.

Tried hadoop-httpfs. was able to do a get (read). However, creating a collection failed with error No File System for scheme http ( protocol for hadoop-httpfs).

avatar
Master Guru

Hi @Sundara Palanki

Can you check your solr.hdfs.home and solr.hdfs.confdir. Your solr.hdfs.home looks good, so check confdir, it should point to /etc/hadoop/conf/ and your hadoop conf files like core-site.xml should be there.