You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by rzo <rz...@gmx.de> on 2009/05/03 15:09:24 UTC

SolrIndexer crashes. Please Help

Hello,

I am using nutch together with solr.
Here an extract from hadoop.log

2009-05-03 14:41:32,290 INFO  solr.SolrIndexer - SolrIndexer: starting
2009-05-03 14:41:32,290 INFO  indexer.IndexerMapReduce - 
IndexerMapReduce: crawldb: Z:/dev/searching/nutch-1.0/crawl_test/crawldb
2009-05-03 14:41:32,290 INFO  indexer.IndexerMapReduce - 
IndexerMapReduce: linkdb: Z:/dev/searching/nutch-1.0/crawl_test/linkdb
2009-05-03 14:41:32,290 INFO  indexer.IndexerMapReduce - 
IndexerMapReduces: adding segment: 
Z:/dev/searching/nutch-1.0/crawl_test/segments/*
2009-05-03 14:41:34,040 WARN  util.NativeCodeLoader - Unable to load 
native-hadoop library for your platform... using builtin-java classes 
where applicable
2009-05-03 14:41:34,040 INFO  plugin.PluginRepository - Plugins: looking 
in: Z:\dev\searching\nutch-1.0\plugins
2009-05-03 14:41:34,134 INFO  plugin.PluginRepository - Plugin 
Auto-activation mode: [true]
2009-05-03 14:41:34,134 INFO  plugin.PluginRepository - Registered Plugins:
2009-05-03 14:41:34,134 INFO  plugin.PluginRepository -     the nutch 
core extension points (nutch-extensionpoints)
...
2009-05-03 14:43:28,118 INFO  indexer.IndexingFilters - Adding 
org.apache.nutch.indexer.anchor.AnchorIndexingFilter
2009-05-03 14:43:37,853 FATAL solr.SolrIndexer - SolrIndexer: 
java.io.IOException: Job failed!
    at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1232)
    at 
org.apache.nutch.indexer.solr.SolrIndexer.indexSolr(SolrIndexer.java:73)

Could anyone help me to figure out what is going wrong or where to find 
more information why the solr indexer job fails.

Once this exception occurs it will happen with each call to the solr 
indexer.

The only workaround I found was to remove all nutch data and recrawl. :((

- Ron


RE: Re-direct in Nutch does not seem to work : solution

Posted by "Lukas, Ray" <Ra...@idearc.com>.
 I thought I would post the solution I am going to use to fix my
problem.. Maybe it will help someone else out as well.. You guys have
helped me a lot so.. 

I did not see a way to do such an "odd thing" in Nutch.. So decided to
write a chunk of code that that would "translate" the url from our
dataset to the final url which I need to crawl and construct indexes
from.. 
Maybe this will be of some help for someone else.. 



package Driver;

import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;


public class Driver {
	public static void main(String[] args) {
		Driver driver = new Driver();
	
System.out.println(driver.getFinalURL("http://www.3menandaladyhandyman.s
mrated.com"));
	}
	private String getFinalURL(String urlString){
		String redirectLocation = null;
		HttpClient client = new HttpClient();
		GetMethod method = new GetMethod(urlString);	
	
		// does not seem to work as I thought??
		//Header locationHeader =
method.getRequestHeader("Host");
		
		try {
			client.executeMethod(method);
			System.out.println("Method failed: " +
method.getStatusLine());
		} catch (Exception e) {
			e.printStackTrace();
		}
		Header[] headers = (Header[])method.getRequestHeaders();
		for (int index=0; index< headers.length; index++) {
			if
(headers[index].getName().equalsIgnoreCase("Host")) {
				System.out.println("name=>" +
headers[index].getName());
				redirectLocation =
headers[index].getValue();
			}
		}

		return redirectLocation;
	}
}

-----Original Message-----
From: Lukas, Ray [mailto:Ray.Lukas@idearc.com] 
Sent: Monday, May 04, 2009 2:14 PM
To: nutch-user@lucene.apache.org
Subject: RE: Re-direct in Nutch does not seem to work

I think that my nutch-site.xml setting will kill re-directs..
Just remembered this

	<property>
  	<name>db.ignore.external.links</name>
  	<value>true</value>
  	<description>
  	Don't go to External Links, just stay in the domain 
  	that I passed into you
  	</description>
	</property> 

I only want to scan within the domain I requested... Unless that url
instantly re-directs me to a different URL and then I want to only use
that one. Any thoughts.. 
Am I understanding this correctly?

Ray

-----Original Message-----
From: Lukas, Ray [mailto:Ray.Lukas@idearc.com] 
Sent: Monday, May 04, 2009 1:56 PM
To: nutch-user@lucene.apache.org
Subject: Re-direct in Nutch does not seem to work


 Re-direct in Nutch 1.0 does not seem to work..
If I point to a url that is "re-directed to" (the result of a
re-direction,  everything works great, if I point to the page that is
re-directing me to the working one, I get a corrupted index.
Can nutch handle re-direction and if so what magic is required?

ray 

RE: Re-direct in Nutch does not seem to work

Posted by "Lukas, Ray" <Ra...@idearc.com>.
I think that my nutch-site.xml setting will kill re-directs..
Just remembered this

	<property>
  	<name>db.ignore.external.links</name>
  	<value>true</value>
  	<description>
  	Don't go to External Links, just stay in the domain 
  	that I passed into you
  	</description>
	</property> 

I only want to scan within the domain I requested... Unless that url
instantly re-directs me to a different URL and then I want to only use
that one. Any thoughts.. 
Am I understanding this correctly?

Ray

-----Original Message-----
From: Lukas, Ray [mailto:Ray.Lukas@idearc.com] 
Sent: Monday, May 04, 2009 1:56 PM
To: nutch-user@lucene.apache.org
Subject: Re-direct in Nutch does not seem to work


 Re-direct in Nutch 1.0 does not seem to work..
If I point to a url that is "re-directed to" (the result of a
re-direction,  everything works great, if I point to the page that is
re-directing me to the working one, I get a corrupted index.
Can nutch handle re-direction and if so what magic is required?

ray 

Re-direct in Nutch does not seem to work

Posted by "Lukas, Ray" <Ra...@idearc.com>.
 Re-direct in Nutch 1.0 does not seem to work..
If I point to a url that is "re-directed to" (the result of a
re-direction,  everything works great, if I point to the page that is
re-directing me to the working one, I get a corrupted index.
Can nutch handle re-direction and if so what magic is required?

ray 

Re: SolrIndexer crashes. Please Help

Posted by rzo <rz...@gmx.de>.
Andrzej,

I am not using a cluster. It is local.
There are no errors in solr.

- Ron

Andrzej Bialecki wrote:
> rzo wrote:
>> Hello,
>>
>> I am using nutch together with solr.
>> Here an extract from hadoop.log
>
> Are you running this on a cluster, or using "local" job tracker ?
>
> Please also check the Solr logs.
>
>


Re: SolrIndexer crashes. Please Help

Posted by Andrzej Bialecki <ab...@getopt.org>.
rzo wrote:
> Hello,
> 
> I am using nutch together with solr.
> Here an extract from hadoop.log

Are you running this on a cluster, or using "local" job tracker ?

Please also check the Solr logs.


-- 
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com