Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D9A917666 for ; Fri, 29 May 2015 17:03:19 +0000 (UTC) Received: (qmail 83360 invoked by uid 500); 29 May 2015 17:03:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 83285 invoked by uid 500); 29 May 2015 17:03:18 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 83272 invoked by uid 99); 29 May 2015 17:03:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2015 17:03:18 +0000 Date: Fri, 29 May 2015 17:03:18 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-7512) SolrOutputFormat creates an invalid solr.xml in the solr home zip for MapReduceIndexerTool MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-7512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14565063#comment-14565063 ] Uwe Schindler commented on SOLR-7512: ------------------------------------- bq. For some reason that method in `TestUtil` wasn't correctly unpacking the zip and using relative paths. Maybe that's another issue, in itself. I switched to the hadoop fs `FileUtil.unZip`. The reason could be a "incorrectly packed ZIP file". There are some ZIP files out there that use backslashes as separator. Maybe the one you uses had this problem. > SolrOutputFormat creates an invalid solr.xml in the solr home zip for MapReduceIndexerTool > ------------------------------------------------------------------------------------------ > > Key: SOLR-7512 > URL: https://issues.apache.org/jira/browse/SOLR-7512 > Project: Solr > Issue Type: Bug > Components: contrib - MapReduce > Affects Versions: 5.1 > Reporter: Adam McElwee > Priority: Blocker > Attachments: SOLR-7512.patch, SOLR-7512.patch > > > Sometime after Solr 4.9, the `MapReduceIndexerTool` got busted because invalid `solr.xml` contents were being written to the solr home dir zip. My guess is that a 5.0 change made the invalid file start to matter. > The error manifests as: > {code:java} > Error: java.lang.IllegalStateException: Failed to initialize record writer for org.apache.solr.hadoop.MapReduceIndexerTool/SolrMapper, attempt_1430953999892_0012_r_000001_1 > at org.apache.solr.hadoop.SolrRecordWriter.(SolrRecordWriter.java:126) > at org.apache.solr.hadoop.SolrOutputFormat.getRecordWriter(SolrOutputFormat.java:163) > at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.(ReduceTask.java:569) > at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:643) > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:394) > at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:175) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548) > at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:170) > Caused by: org.apache.solr.common.SolrException: org.xml.sax.SAXParseException; Premature end of file. > at org.apache.solr.core.Config.(Config.java:156) > at org.apache.solr.core.SolrXmlConfig.fromInputStream(SolrXmlConfig.java:127) > at org.apache.solr.core.SolrXmlConfig.fromFile(SolrXmlConfig.java:110) > at org.apache.solr.core.SolrXmlConfig.fromSolrHome(SolrXmlConfig.java:138) > at org.apache.solr.core.CoreContainer.(CoreContainer.java:142) > at org.apache.solr.hadoop.SolrRecordWriter.createEmbeddedSolrServer(SolrRecordWriter.java:162) > at org.apache.solr.hadoop.SolrRecordWriter.(SolrRecordWriter.java:119) > ... 9 more > Caused by: org.xml.sax.SAXParseException; Premature end of file. > at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) > at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) > at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) > at org.apache.solr.core.Config.(Config.java:145) > ... 15 more > {code} > The last version that I've successfully used `MapReduceIndexerTool` was 4.9, and I verified that this patch resolves the issue for me (testing on 5.1). I spent a couple hours trying to write a simple test case to exhibit the error, but I haven't quite figured out how to deal with the {noformat}java.security.AccessControlException: java.io.FilePermission ...{noformat} errors. > Pull request for bugfix [here|https://github.com/apache/lucene-solr/pull/147] -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org