<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120996#M83759</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/2229/jamesjones.html" nodeid="2229"&gt;@james.jones&lt;/A&gt;  There are a series of symlinks involved but all the permissions look OK.  All the directories and files are, at least, readable by all &lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 06:02:36 GMT</pubDate>
    <dc:creator>tony_bolt</dc:creator>
    <dc:date>2017-03-01T06:02:36Z</dc:date>
    <item>
      <title>SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120992#M83755</link>
      <description>&lt;P&gt;Following an upgrade to SOLR 6.4.1, it appears that access to HDFS via a NameService name (High Availability) is no longer working.&lt;/P&gt;&lt;P&gt;We have a solrconfig.xml which defines a HDFSDirectoryFactory as follows:&lt;/P&gt;&lt;PRE&gt; &amp;lt;directoryFactory name="DirectoryFactory"
                    class="${solr.directoryFactory:solr.HdfsDirectoryFactory}"&amp;gt;

  &amp;lt;str name="solr.hdfs.home"&amp;gt;hdfs://XXXXHDPDEV1/data/DEV/solr&amp;lt;/str&amp;gt;
  &amp;lt;bool name="solr.hdfs.blockcache.enabled"&amp;gt;true&amp;lt;/bool&amp;gt;
  &amp;lt;int name="solr.hdfs.blockcache.slab.count"&amp;gt;32&amp;lt;/int&amp;gt;
  &amp;lt;bool name="solr.hdfs.blockcache.direct.memory.allocation"&amp;gt;true&amp;lt;/bool&amp;gt;
  &amp;lt;int name="solr.hdfs.blockcache.blocksperbank"&amp;gt;16384&amp;lt;/int&amp;gt;
  &amp;lt;bool name="solr.hdfs.blockcache.read.enabled"&amp;gt;true&amp;lt;/bool&amp;gt;
  &amp;lt;bool name="solr.hdfs.nrtcachingdirectory.enable"&amp;gt;true&amp;lt;/bool&amp;gt;
  &amp;lt;int name="solr.hdfs.nrtcachingdirectory.maxmergesizemb"&amp;gt;16&amp;lt;/int&amp;gt;
  &amp;lt;int name="solr.hdfs.nrtcachingdirectory.maxcachedmb"&amp;gt;192&amp;lt;/int&amp;gt;
  &amp;lt;str name="solr.hdfs.confdir"&amp;gt;/etc/hadoop/conf/&amp;lt;/str&amp;gt;
&amp;lt;/directoryFactory&amp;gt;&lt;/PRE&gt;&lt;P&gt;In this definition the value of solr.hdfs.home is hdfs://XXXXHDPDEV1/data/DEV/solr, where XXXXHDPDEV1 is the nameService name for a Hadoop cluster.&lt;/P&gt;&lt;P&gt;To enable this form of reference to the Hadoop cluster, we also include solr.hdfs.confdir which identifies a local directory that contains the Hadoop config files such as hdfs-site.xml  These files map the nameservice name to multiple name nodes and should allow the HDFS client to discover the active name node.  Using this nameservice name works fine when using command-line hdfs commands from the same SOLR server.&lt;/P&gt;&lt;P&gt;Under V6.4.1, when we try to create a collection based on the config that contains this solrconfig.xml file, the HDFS objects are successfully created - but the CREATE COLLECTION fails because it fails to instantiate the Update Handler, solr.DirectUpdateHandler2.   We get the following traceback:&lt;/P&gt;&lt;PRE&gt;2017-02-23 11:42:16.419 ERROR (qtp225493257-77) [c:aircargo s:shard1  x:aircargo_shard1_replica1] o.a.s.c.CoreContainer Error creating core [aircargo_shard1_replica1]: SolrCore 'aircargo_shard1_replica1' is not available due to init failure: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
org.apache.solr.common.SolrException: SolrCore 'aircargo_shard1_replica1' is not available due to init failure: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
        at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1151)
        at org.apache.solr.cloud.ZkController.publish(ZkController.java:1198)
        at org.apache.solr.cloud.ZkController.preRegister(ZkController.java:1372)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:885)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:827)
        at org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:88)
        at org.apache.solr.handler.admin.CoreAdminOperation$$Lambda$28/50699452.execute(Unknown Source)
        at org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:377)
        at org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:379)
        at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:165)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
        at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:664)
        at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:445)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
        at org.eclipse.jetty.server.Server.handle(Server.java:534)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
        at org.apache.solr.core.SolrCore.&amp;lt;init&amp;gt;(SolrCore.java:959)
        at org.apache.solr.core.SolrCore.&amp;lt;init&amp;gt;(SolrCore.java:823)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:890)
        ... 36 more
Caused by: org.apache.solr.common.SolrException: Error Instantiating Update Handler, solr.DirectUpdateHandler2 failed to instantiate org.apache.solr.update.UpdateHandler
        at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:767)
        at org.apache.solr.core.SolrCore.createUpdateHandler(SolrCore.java:815)
        at org.apache.solr.core.SolrCore.initUpdateHandler(SolrCore.java:1065)
        at org.apache.solr.core.SolrCore.&amp;lt;init&amp;gt;(SolrCore.java:930)
        ... 38 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:753)
        ... 41 more
Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: DIBPHDPDEV1
        at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:378)
        at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:310)
        at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:176)
        at org.apache.hadoop.hdfs.DFSClient.&amp;lt;init&amp;gt;(DFSClient.java:678)
        at org.apache.hadoop.hdfs.DFSClient.&amp;lt;init&amp;gt;(DFSClient.java:619)
        at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2653)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:368)
        at org.apache.solr.update.HdfsUpdateLog.init(HdfsUpdateLog.java:145)
        at org.apache.solr.update.UpdateHandler.&amp;lt;init&amp;gt;(UpdateHandler.java:137)
        at org.apache.solr.update.UpdateHandler.&amp;lt;init&amp;gt;(UpdateHandler.java:94)
        at org.apache.solr.update.DirectUpdateHandler2.&amp;lt;init&amp;gt;(DirectUpdateHandler2.java:102)
        ... 46 more
Caused by: java.net.UnknownHostException: XXXXHDPDEV1
        ... 58 more


&lt;/PRE&gt;&lt;P&gt;Right at the end of the above log you will see UnknownHostException: XXXXHDPDEV1.  It appears that the instantiation of the update handler thinks that the hadoop nameService name is a host name. We can avoid this error by hard-coding the server address and port of the active name node (e.g. XXXXn1:8020). &lt;/P&gt;&lt;P&gt;e.g.
&lt;/P&gt;&lt;PRE&gt;&amp;lt;str name="solr.hdfs.home"&amp;gt;hdfs://XXXXn1:8020/data/DEV/solr&amp;lt;/str&amp;gt;&lt;/PRE&gt;&lt;P&gt; However, in the event of a name node switch, the collection becomes inaccessible.&lt;/P&gt;&lt;P&gt;Is this a bug in V6.4.1?   (Note. This approach worked fine in V5.3.0)&lt;/P&gt;&lt;P&gt;There is a very similar problem reported in &lt;A href="https://community.hortonworks.com/questions/43006/hdpsearch-failed-to-create-collection-unknownhoste.html"&gt;HDPSearch - failed to create collection - UnknownHostException&lt;/A&gt;l  However, this is from an earlier version and was solved by fixing a problem in uploading the config to zookeeper.  (The fact that we can get our config to work by hard-coding the server name, suggests that we have our zookeeper update process under control.)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 13:52:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120992#M83755</guid>
      <dc:creator>tony_bolt</dc:creator>
      <dc:date>2017-02-23T13:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120993#M83756</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/12820/tonybolt.html" nodeid="12820"&gt;@Tony Bolt&lt;/A&gt;&lt;P&gt;It seems like the solr.hdfs.confdir is not being used. It's unlikely to be the problem, have you checked permissions?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 11:29:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120993#M83756</guid>
      <dc:creator>james_jones</dc:creator>
      <dc:date>2017-02-24T11:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120994#M83757</link>
      <description>&lt;P&gt;I have duplicated this problem, and filed an issue in the Solr community: &lt;A href="https://issues.apache.org/jira/browse/SOLR-10215" target="_blank"&gt;https://issues.apache.org/jira/browse/SOLR-10215&lt;/A&gt;. I don't know what is causing it, but it seems limited to Solr 6.4. I tried the same setup with Solr 6.3.0 and it worked fine.&lt;/P&gt;&lt;P&gt;If you don't mind, I'd like to post a comment to that issue with a link to this forum thread to show that others have had the same problem.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 23:39:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120994#M83757</guid>
      <dc:creator>cassandra</dc:creator>
      <dc:date>2017-02-28T23:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120995#M83758</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/14915/cassandra.html" nodeid="14915"&gt;@Cassandra Targett&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Very happy for you to include the link.  I'm also happy to supply extra info and/or test a fix.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 05:43:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120995#M83758</guid>
      <dc:creator>tony_bolt</dc:creator>
      <dc:date>2017-03-01T05:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120996#M83759</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/2229/jamesjones.html" nodeid="2229"&gt;@james.jones&lt;/A&gt;  There are a series of symlinks involved but all the permissions look OK.  All the directories and files are, at least, readable by all &lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 06:02:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120996#M83759</guid>
      <dc:creator>tony_bolt</dc:creator>
      <dc:date>2017-03-01T06:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120997#M83760</link>
      <description>&lt;P&gt;Great, thanks &lt;A rel="user" href="https://community.cloudera.com/users/12820/tonybolt.html" nodeid="12820"&gt;@Tony Bolt&lt;/A&gt;. I was able to trace the cause of the problem to a seemingly unrelated commit that occurred for the 6.4.0 release, and the good news is the fix has already been committed for an upcoming 6.4.2 release. The release process for that has already started, and we'd expect it to be out within 1-2 weeks.&lt;/P&gt;&lt;P&gt;There is no patch to apply, but if you have the ability to build Solr from source, you could try to build locally with "branch_6_4", which is where 6.4.2 will come from, or "branch_6x", which also contains the same fix. If you can't do a local build for any reason, we do already have a 2nd confirmation that the problem is fixed with this upcoming release, so it's certainly not required or expected of you to test it at this point.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 21:51:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120997#M83760</guid>
      <dc:creator>cassandra</dc:creator>
      <dc:date>2017-03-01T21:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: SOLR V6.4.1 Unable to Create collection when using HDFS and referencing HDFS using NameService name</title>
      <link>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120998#M83761</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/14915/cassandra.html" nodeid="14915"&gt;@Cassandra Targett&lt;/A&gt;  
I am happy to wait for the 6.4.2 release.  The team here are impressed with how fast this issue was resolved.   Thanks for following this up for us.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 09:58:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/SOLR-V6-4-1-Unable-to-Create-collection-when-using-HDFS-and/m-p/120998#M83761</guid>
      <dc:creator>tony_bolt</dc:creator>
      <dc:date>2017-03-02T09:58:36Z</dc:date>
    </item>
  </channel>
</rss>

