2010-06-22 52 views
0

通常情況下我的應用程序在這裏位於我如何更新太陽黑子,Solr的路徑:後,我改變我的應用程序名稱

/數據/網站/電流/

但現在它的:

/數據/站點2 /電流/

我試圖腳本/控制檯進去,重新索引,並收到以下錯誤導致我相信,新的路徑是扔它關閉:

RSolr::RequestError: Solr Response: Failed_to_acquire_random_test_lock_please_verify_filesystem_for_lock_directory_solrdataindex_supports_locking__javalangRuntimeException_Failed_to_acquire_random_test_lock_please_verify_filesystem_for_lock_directory_solrdataindex_supports_locking__at_orgapachelucenestoreNativeFSLockFactoryacquireTestLockNativeFSLockFactoryjava88__at_orgapachelucenestoreNativeFSLockFactorymakeLockNativeFSLockFactoryjava126__at_orgapachelucenestoreDirectorymakeLockDirectoryjava131__at_orgapacheluceneindexIndexWriterinitIndexWriterjava1544__at_orgapacheluceneindexIndexWriterinitIndexWriterjava1402__at_orgapachesolrupdateSolrIndexWriterinitSolrIndexWriterjava190__at_orgapachesolrupdateUpdateHandlercreateMainIndexWriterUpdateHandlerjava98__at_orgapachesolrupdateDirectUpdateHandler2openWriterDirectUpdateHandler2java173__at_orgapachesolrupdateDirectUpdateHandler2deleteByQueryDirectUpdateHandler2java325__at_orgapachesolrupdateprocessorRunUpdateProcessorprocessDeleteRunUpdateProcessorFactoryjava71__at_orgapachesolrhandlerXMLLoaderprocessDeleteXMLLoaderjava234__at_orgapachesolrhandlerXMLLoaderprocessUpdateXMLLoaderjava180__at_orgapachesolrhandlerXMLLoaderloadXMLLoaderjava69__at_orgapachesolrhandlerContentStreamHandlerBasehandleRequestBodyContentStreamHandlerBasejava54__at_orgapachesolrhandlerRequestHandlerBasehandleRequestRequestHandlerBasejava131__at_orgapachesolrcoreSolrCoreexecuteSolrCorejava1316__at_orgapachesolrservletSolrDispatchFilterexecuteSolrDispatchFilterjava338__at_orgapachesolrservletSolrDispatchFilterdoFilterSolrDispatchFilterjava241__at_orgmortbayjettyservletServletHandler$CachedChaindoFilterServletHandlerjava1089__at_orgmortbayjettyservletServletHandlerhandleServletHandlerjava365__at_orgmortbayjettysecuritySecurityHandlerhandleSecurityHandlerjava216__at_orgmortbayjettyservletSessionHandlerhandleSessionHandlerja 
from /usr/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/connection/requestable.rb:39:in `request' 
from /usr/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:34:in `request' 
from /usr/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:22:in `update' 
from /usr/lib/ruby/gems/1.8/gems/rsolr-0.12.1/lib/rsolr/client.rb:76:in `delete_by_query' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot/indexer.rb:55:in `remove_all' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot/session.rb:145:in `remove_all' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot/session.rb:145:in `each' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot/session.rb:145:in `remove_all' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' 
from /usr/lib/ruby/gems/1.8/gems/sunspot-1.0.5/lib/sunspot.rb:406:in `remove_all' 
from /usr/lib/ruby/gems/1.8/gems/sunspot_rails-1.0.5/lib/sunspot/rails/searchable.rb:163:in `solr_remove_all_from_index' 
from /usr/lib/ruby/gems/1.8/gems/sunspot_rails-1.0.5/lib/sunspot/rails/searchable.rb:182:in `reindex' 
from (irb):2 

我該如何改變Sunspot-Solr的默認目錄?

回答

0

這是因爲sunspot-solr gems沒有安裝在服務器上,因此這裏所有的調用gem錯誤。當我安裝我的寶石時,我也必須用一個pkill來殺死它的進程。

我跑

$> ps aux | grep solr 

看到它正在運行的過程,所以我跑了pkill的:

pkill -term -f '/usr/lib/jvm/sun-jdk-1.6/bin/java -Djava.net.preferIPv4Stack=true -Dsolr.solr.home=solr -jar start.jar' 

殺了它,並重新啓動它。問題解決了。

相關問題