views:

27

answers:

1

Normally my app was located here at :

/data/Site/current/

but now it's:

/data/Site2/current/

I tried to script/console into it, and reindex, and received the following error which lead me to believe that the new path is throwing it off:

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

How would I go about changing Sunspot-Solr's default dir?

A: 

This is because the sunspot-solr gems were not installed on the server thus all the call to gem errors here. When I installed my gems, I also had to kill its process with a pkill.

I ran

$> ps aux | grep solr

Saw it was running a process, so I ran a pkill :

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

Killed it and restarted it. Problem solved.

Trip