Q:

nutch indexing fails with io exception

Nutch indexing fails when I run the following command:
root@ubuntu:/home/test-tb/Downloads/apache-nutch-1.10# bin/nutch index mycrl/crawldb/ -dir mycrl/segments/

I am using nutch 1.10 on ubuntu 12.04 LTS.
Error log details are:
2015-07-09 17:07:36,940 INFO  indexer.IndexWriters - Adding    org.apache.nutch.indexwriter.solr.SolrIndexWriter
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: content dest: content
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: title dest: title
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: host dest: host
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: segment dest: segment
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: boost dest: boost
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: digest dest: digest
2015-07-09 17:07:36,970 INFO  solr.SolrMappingReader - source: tstamp dest: tstamp
2015-07-09 17:07:37,030 INFO  solr.SolrIndexWriter - Indexing 100 documents
2015-07-09 17:07:37,136 INFO  solr.SolrIndexWriter - Indexing 100 documents
2015-07-09 17:07:37,166 WARN  mapred.LocalJobRunner - job_local1383488781_0001
org.apache.solr.common.SolrException: Not Found

Not Found

request: http://127.0.0.1:8983/solr/update?wt=javabin&version=2
at  org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:430)
at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
at org.apache.nutch.indexwriter.solr.SolrIndexWriter.close(SolrIndexWriter.java:153)
at org.apache.nutch.indexer.IndexWriters.close(IndexWriters.java:115)
at org.apache.nutch.indexer.IndexerOutputFormat$1.close(IndexerOutputFormat.java:44)
at org.apache.hadoop.mapred.ReduceTask$OldTrackingRecordWriter.close(ReduceTask.java:467)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:535)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:421)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:398)

2015-07-09 17:07:37,957 ERROR indexer.IndexingJob - Indexer: java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1357)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:113)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:177)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:187)

Though I am not specifying a solr indexing option to nutch, this error is returned. Am I missing anything here? Your pointers will be very helpful. Thanks in advance.

A:

First of all, if you are crawling and indexing data, then you should use bin/crawl as it is a better tool.
Second, from the stack trace, it is clear that you are not setting solr url correctly. In general, your solr url should be something like http://domainname:port/solr/corename
But, i see you have localhost:8983/solr/update. So, your url is missing the core name of solr. By default, it is collection1.

