2013-10-30 26 views
1

我們在從主站到從站的複製過程中不斷收到此異常。 我們的索引尺寸爲9.7 G,我們正試圖從頭開始複製一個奴隸。solr ReplicationHandler - SnapPull無法下載文件

2013年10月30日18:22:16,996 [explicit-fetchindex-cmd]錯誤ReplicationHandler - SnapPull失敗:org.apache.solr.common.SolrException:無法完全下載_41c_Lucene41_0.doc。下載0!= 107464871 在org.apache.solr.handler.SnapPuller $ DirectoryFileFetcher.cleanup(SnapPuller.java:1266) 在org.apache.solr.handler.SnapPuller $ DirectoryFileFetcher.fetchFile(SnapPuller.java:1146) at org.apache.solr.handler.SnapPuller.downloadIndexFiles(SnapPuller.java:741) at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:405) at org.apache.solr.handler.ReplicationHandler .doFetch(ReplicationHandler.java:319) 在org.apache.solr.handler.ReplicationHandler $ 1.run(ReplicationHandler.java:220)

我在某些線程讀取,有Solr中4.1相關的錯誤,但我們使用solr 4.3並且也嘗試了4.5.1。 它接近DirectoryFileFetcher有時無法下載文件,文件被下載到大小爲零的軟件。

這是主設置:

<requestHandler name="/replication" class="solr.ReplicationHandler" > 
    <lst name="master"> 
    <str name="replicateAfter">commit</str> 
    <str name="replicateAfter">startup</str> 
    <str name="confFiles">stopwords.txt,spellings.txt,synonyms.txt,protwords.txt,elevate.xml,currency.xml</str> 
    <str name="commitReserveDuration">00:00:50</str> 
    </lst> 
</requestHandler> 

和從設置:

<requestHandler name="/replication" class="solr.ReplicationHandler" > 
    <lst name="master"> 
    <str name="replicateAfter">commit</str> 
    <str name="replicateAfter">startup</str> 
    <str name="confFiles">stopwords.txt,spellings.txt,synonyms.txt,protwords.txt,elevate.xml,currency.xml</str> 
    <str name="commitReserveDuration">00:00:50</str> 
    </lst> 
</requestHandler> 

回答

0

問題似乎與HttpClient的。 我打開了所有庫的調試日誌記錄,並在失敗之​​前看到來自httpclient的消息「垃圾迴應」。

這是一個日誌片段:

31 Oct 2013 18:10:40,360 [explicit-fetchindex-cmd] DEBUG DefaultClientConnection - Sending request: GET /solr-master/replication?comman 

d = filecontent &代= 6814 & QT =%2Freplication &文件= _aa7_Lucene41_0.pos &校驗=真&重量= FILESTREAM HTTP/1.1 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - >>「GET/solr-master/replication?command = filecontent & generation = 6814 & qt =%2Freplication & file = _aa7_Lucene41_0.pos & checksum = true & wt = filestream HTTP/1.1 [\ r] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - >>」User-Agent:Solr [org。 apache.solr.client.solrj.impl.HttpSolrServer] 1.0 [\ r] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - >>」Host:solr-master .saltdev.sealdoc.com:8081 [\ r] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - >>」Connection:Keep-Alive [\ r] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - >>」[\ r] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG頭文件 - >> GET/solr-master/replication?command = filecontent & generation = 6814 & qt =%2Freplication & file = _aa7_Lucene41_0.pos & checksum = true & wt = filestream HTTP/1.1 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG標頭 - >> User-Agent:Solr [org.apache.solr。 client.solrj.impl.HttpSolrServer ] 1。0 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG標題 - >>主機:solr-master.saltdev.sealdoc.com:8081 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd ] DEBUG標題 - >>連接:保持活動 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - < <「[\ r] [\ n]」 31 Oct 2013 18:10 :40361 [顯式fetchindex-CMD] DEBUG DefaultHttpResponseParser - 垃圾響應: 2013年10月31日18:10:40361 [顯式fetchindex-CMD] DEBUG絲 - < < 「4 [\ R] [\ n]的」 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG DefaultHttpResponseParser - 垃圾回覆:4 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - < <「[0x0] [0x0] [0x0] [0x0] [\ r] [\ n]」 31 Oct 2013 18:10 :40,361 [explicit-fetchindex-cmd] DEBUG DefaultHttpResponseParser - 垃圾迴應:^ @^@^@^@ 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - < <「0 [\ r ] [\ n]「 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG DefaultHttpResponseParser - 垃圾回覆:0 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG wire - < <「[\ r] [\ n]」 2013年10月31日18:10:40,361 [explicit-fetchindex-cmd] DEBUG DefaultHttpResponseParser - 垃圾回覆: 2013年10月31日18:10:40,398 [explicit-fetchindex-cmd] DEBUG DefaultClientConnection - Connection 0.0.0.0:55266 < - > 172.16.77.121:8081 closed 2013年10月31日18:10:40,398 [explicit-fetchindex-cmd] DEBUG DefaultClientConnection - Connection 0.0.0.0:55266 < - > 172.16.77.121:8081關閉 2013年10月31日18:10:40,398 [explicit-fetchindex-cmd] DEBUG DefaultClientConnection - Connection 0.0.0.0:55266 < - > 172.16.77.121:8081 closed 2013年10月31日18:10:40,398 [explicit-fetchindex- cmd] DEBUG PoolingClientConnectionManager - 已發佈連接:[id:0] [route:{} - > http://solr-master.saltdev.sealdoc.com:8081] [total kept alive:1;分配的路由:10000箇中的1個; Total allocation:1 of 10000] 2013年10月31日18:10:40,425 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 釋放目錄:/ opt/watchdox/solr-slave/data/index 2 false 31 Oct 2013 18:10 :40,425 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 重用緩存的目錄:CachedDir DEBUG CachingDirectoryFactory - 釋放目錄:/ opt/watchdox/solr-slave/data 0 false 2013年10月31日18:10:40,425 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 重用緩存目錄:CachedDir <> 2013年10月31日18:10:40,427 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 釋放目錄:/ opt/watchdox/solr-slave/data 0 false 2013年10月31日18:10:40,428 [explicit-fetchindex-cmd] DE BUG CachingDirectoryFactory - Done with dir:CachedDir <> 2013年10月31日18:10:40,428 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 釋放目錄:/opt/watchdox/solr-slave/data/index.20131031180837277 0 true 31 Oct 2013 18:10:40,428 [explicit-fetchindex-cmd] INFO CachingDirectoryFactory - 正在關閉/opt/watchdox/solr-slave/data/index.20131031180837277 [CachedDir <>] 2013年10月31日18:10:40,428 [顯式INFO CachingDirectoryFactory - 關閉目錄:/opt/watchdox/solr-slave/data/index.20131031180837277 2013年10月31日18:10:40,428 [explicit-fetchindex-cmd] INFO CachingDirectoryFactory - 刪除核心關閉前的目錄:的/ opt/watchdox/solr的從站/數據/索引。20131031180837277 2013年10月31日18:10:40,878 [explicit-fetchindex-cmd] DEBUG CachingDirectoryFactory - 釋放目錄:/ CachedDir <> 2013年10月31日18:10:40,878 opt/watchdox/solr-slave/data/index 1 false 2013年10月31日18:10:40,879 [explicit-fetchindex-cmd]錯誤ReplicationHandler - SnapPull失敗:org.apache.solr.common.SolrException:無法下載_aa7_Lucene41_0 .pos完全。 org.apache.solr.handler.SnapPuller $ DirectoryFileFetcher.cleanup(SnapPuller.java:1212) at org.apache.solr.handler.SnapPuller $ DirectoryFileFetcher.fetchFile(SnapPuller.java:1092) at org.apache.solr.handler.SnapPuller.downloadIndexFiles(SnapPuller.java:719) at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:397) at org.apache.solr.handler.ReplicationHandler .doFetch(ReplicationHandler.java:317) 在org.apache.solr.handler.ReplicationHandler $ 1.run(ReplicationHandler.java:218)

2013年10月31日18:10:40910 [HTTP-BIO-8080-EXEC -8] DEBUG CachingDirectoryFactory - 重用高速緩存目錄:CachedDir <>

因此,我將httpcomponents jar升級到最新的4.3.x版本,問題消失了。 在4.2.x版本中,我升級到httpclient-4.3.1,httpcore-4.3和httpmime-4.3.1的solrj依賴關係的httpcomponents jar我現在幾次運行復制,完全沒有問題,它現在按預期工作。 它接縫升級是必要的只有在奴隸一方,但我也要升級主人。