2013-01-08 28 views
3

我正在使用SOLR索引文檔。我從mysql數據庫創建索引。我從PHP服務器上運行的PHP創建索引。我正在使用SOLR PHP客戶端來創建索引。當我從部署SOLR的服務器創建索引時,一切正常。但是,當我嘗試從不同的機器上建立索引,我收到以下錯誤:SOLR'0'狀態:通信錯誤

「0」狀態:通信錯誤

我試圖改變PHP的插座超時,Solr的commitlocktimeout和Solr writelocktimeout。但是我仍然得到同樣的錯誤。當我從Solr服務器itslef創建索引時,沒有錯誤。

PHP版本:5.2.2 SOLR版本:1.4.1

爲什麼發生這種情況的任何想法?

謝謝

以下是我的堆棧跟蹤:

'0' Status: Communication Error#0 C:\wamp\www\nist\application\library\SolrPhpClient\Apache\Solr\Service.php(672): Apache_Solr_Service->_sendRawPost('http://129.107....', '<add allowDups=...') 
#1 C:\wamp\www\nist\application\library\SolrPhpClient\Apache\Solr\Service.php(736): Apache_Solr_Service->add('<add allowDups=...') 
#2 C:\wamp\www\nist\application\library\Nist\Console\NistSolrIndex.php(106): Apache_Solr_Service->addDocuments(Array) 
#3 C:\wamp\www\nist\application\library\Nist\Console\CrawlUNT.php(346): Nist_Console_NistSolrIndex->createIndex() 
#4 C:\wamp\www\nist\application\library\Nist\Console\CrawlUNT.php(89): Nist_Console_CrawlUNT->CrawlParseAndIndexProfiles() 
#5 C:\wamp\www\nist\application\Bootstrap.php(107): Nist_Console_CrawlUNT->run(Object(Zend_Console_Getopt)) 
#6 C:\wamp\www\nist\application\Bootstrap.php(78): Bootstrap->_runConsoleApp() 
#7 C:\wamp\www\dkumar\mentis-libs\Zend\Application.php(366): Bootstrap->run() 
#8 C:\wamp\www\nist\index.php(37): Zend_Application->run() 
+0

您是否檢查過防火牆設置? – saarp

+0

@ user1959447請與我們分享您的完整Solr堆棧跟蹤。 – lightonphiri

+0

我忘了提及。當我向SOLR添加文檔時,我將其分批添加爲50.因爲我的表有很多記錄,所以由於內存限制,我必須批量執行。 '通信錯誤'僅出現在一些批次中。對於其他批次,可以正確添加文檔。 –

回答

1

我們有同樣的問題,當我們改變了我們的密碼。它是由新密碼中的特殊字符引起的。刪除'@','/''()'解決了這個問題。

Solr:4.9,PHP:5.6