You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "lufeng (JIRA)" <ji...@apache.org> on 2014/08/26 04:17:57 UTC
[jira] [Commented] (NUTCH-1828) bin/crawl : incorrect handling of
nutch errors
[ https://issues.apache.org/jira/browse/NUTCH-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14110177#comment-14110177 ]
lufeng commented on NUTCH-1828:
-------------------------------
Can you provide a patch for Nutch 2.x? I found this issue has also effect Nutch2.x.
Thanks Mathieu.
> bin/crawl : incorrect handling of nutch errors
> ----------------------------------------------
>
> Key: NUTCH-1828
> URL: https://issues.apache.org/jira/browse/NUTCH-1828
> Project: Nutch
> Issue Type: Bug
> Components: nutchNewbie
> Affects Versions: 1.9, 2.2.1
> Environment: Ubuntu Server 14.04, OpenJDK 7
> Reporter: Mathieu Bouchard
> Attachments: apache-nutch-1.9-crawl-fix-retcode.patch
>
>
> We are using Solr with Nutch to provide a complete search engine for our website.
> I created a cron job that would use Nutch to crawl and update the Solr index each night. This cron job is trying to automatically correct some errors that could result in a corrupt crawldb. However, it seems that the bin/crawl command doesn't correctly propagate errors coming from bin/nutch.
> Here is an exemple from the bin/crawl script :
> $bin/nutch inject $CRAWL_PATH/crawldb $SEEDDIR
> if [ $? -ne 0 ]
> then exit $?
> fi
> Even if there is an error in the nutch inject command, the crawl script always returns 0. The way I understand it, the exit code returned is the result of the shell test and not the result of the nutch inject command.
> To correct this, we would need to modify the script with something like :
> $bin/nutch inject $CRAWL_PATH/crawldb $SEEDDIR
> RETCODE=$?
> if [ $RETCODE -ne 0 ]
> then exit $RETCODE
> fi
--
This message was sent by Atlassian JIRA
(v6.2#6252)