Solr with Rails - rake sunspot:reindex is not working -


hope fine , doing good! stuck strange issue looking inputs.

my problem is:

after deploying application on production using capistrano, when doing solr re-indexing, giving me below error:

$ bundle exec rake sunspot:reindex --trace ** invoke sunspot:reindex (first_time) ** invoke environment (first_time) ** execute environment ** execute sunspot:reindex skipping progress bar: progress reporting, add gem 'progress_bar' gemfile rake aborted! rsolr::error::http - 404 not found error:     not found  request data: "<?xml version=\"1.0\" encoding=\"utf-8\"?><delete>query>type:occupationdata</query></delete>" backtrace: /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive' (eval):2:in `post' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:67:in `update' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:131:in `delete_by_query' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/indexer.rb:55:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `block in remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive' (eval):2:in `post' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:67:in `update' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.9/lib/rsolr/client.rb:131:in `delete_by_query' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/indexer.rb:55:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `block in remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot.rb:464:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/searchable.rb:178:in `solr_remove_all_from_index' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/searchable.rb:197:in `solr_reindex' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/tasks.rb:58:in `block (3 levels) in <top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/class_set.rb:16:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/class_set.rb:16:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/tasks.rb:57:in `block (2 levels) in <top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/bin/rake:19:in `load' /data/app_name/shared/bundled_gems/ruby/1.9.1/bin/rake:19:in `<main>' tasks: top => sunspot:reindex 

to investigate more, when looked @ sunspot production log, saw:

info: creating solrcore 'collection1' using instancedir: /data/app_name/releases/20130325112326/solr/collection1 apr 1, 2013 2:38:16 org.apache.solr.core.solrresourceloader <init> info: new solrresourceloader directory: '/data/app_name/releases/20130325112326/solr/collection1/' apr 1, 2013 2:38:16 org.apache.solr.core.corecontainer recordandthrow severe: unable create core: collection1 org.apache.solr.common.solrexception: not load config solrconfig.xml     @ org.apache.solr.core.corecontainer.createfromlocal(corecontainer.java:991)     @ org.apache.solr.core.corecontainer.create(corecontainer.java:1051)     @ org.apache.solr.core.corecontainer$3.call(corecontainer.java:634)     @ org.apache.solr.core.corecontainer$3.call(corecontainer.java:629)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:441)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662) caused by: java.io.ioexception: can't find resource 'solrconfig.xml' in classpath or '/data/app_name/releases/20130325112326/solr/collection1/conf/', cwd=/data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr     @ org.apache.solr.core.solrresourceloader.openresource(solrresourceloader.java:318)     @ org.apache.solr.core.solrresourceloader.openconfig(solrresourceloader.java:283)     @ org.apache.solr.core.config.<init>(config.java:103)     @ org.apache.solr.core.config.<init>(config.java:73)     @ org.apache.solr.core.solrconfig.<init>(solrconfig.java:117)     @ org.apache.solr.core.corecontainer.createfromlocal(corecontainer.java:989)     ... 11 more apr 1, 2013 2:38:16 org.apache.solr.common.solrexception log severe: null:org.apache.solr.common.solrexception: unable create core: collection1     @ org.apache.solr.core.corecontainer.recordandthrow(corecontainer.java:1672)     @ org.apache.solr.core.corecontainer.create(corecontainer.java:1057)     @ org.apache.solr.core.corecontainer$3.call(corecontainer.java:634)     @ org.apache.solr.core.corecontainer$3.call(corecontainer.java:629)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:441)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662) caused by: org.apache.solr.common.solrexception: not load config solrconfig.xml     @ org.apache.solr.core.corecontainer.createfromlocal(corecontainer.java:991)     @ org.apache.solr.core.corecontainer.create(corecontainer.java:1051)     ... 10 more caused by: java.io.ioexception: can't find resource 'solrconfig.xml' in classpath or '/data/app_name/releases/20130325112326/solr/collection1/conf/', cwd=/data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr     @ org.apache.solr.core.solrresourceloader.openresource(solrresourceloader.java:318)     @ org.apache.solr.core.solrresourceloader.openconfig(solrresourceloader.java:283)     @ org.apache.solr.core.config.<init>(config.java:103)     @ org.apache.solr.core.config.<init>(config.java:73)     @ org.apache.solr.core.solrconfig.<init>(solrconfig.java:117)     @ org.apache.solr.core.corecontainer.createfromlocal(corecontainer.java:989)     ... 11 more apr 1, 2013 2:38:16 org.apache.solr.servlet.solrdispatchfilter init info: user.dir=/data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr apr 1, 2013 2:38:16 org.apache.solr.servlet.solrdispatchfilter init info: solrdispatchfilter.init() done 

from logs, clear re-indexing failing because of 2 reasons:

a. unable create core: collection1
b. can't find resource 'solrconfig.xml' in classpath

based on errors above, below tricks tried:

a. checked folder permission solr
b. manually created collection1 inside solr , copied solrconfig.xml inside /solr/collection1/conf.
c. copied lib , conf folders /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr , pasted in app_name/solr/sunspot_rails folder.

but none of solutions worked. :-(

kindly suggest.

[updated]: gemfile looks this:

gem "sunspot", "~> 1.3.3" gem 'sunspot_rails', '~> 1.3.0' gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git' gem 'sunspot_cell_jars', :git => 'https://github.com/mrcsparker/sunspot_cell_jars.git' gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git" 

[updated]: of 4/4/2013: tried steps below, still no luck: please check details, maybe understand if heading towards right direction.

1. stopped solr <br /> ${path_to_app}: bundle exec rake sunspot:solr:stop  2. remove solr folder ${path_to_app}: rm -rf solr  3. start solr ${path_to_app}: bundle exec rake sunspot:solr:start --backtrace java version "1.6.0_30" java(tm) se runtime environment (build 1.6.0_30-b12) java hotspot(tm) 64-bit server vm (build 20.5-b03, mixed mode) copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/solrconfig.xml => /data/app_name/releases/20130402102051/solr/conf/solrconfig.xml copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/spellings.txt => /data/app_name/releases/20130402102051/solr/conf/spellings.txt copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/synonyms.txt => /data/app_name/releases/20130402102051/solr/conf/synonyms.txt copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/elevate.xml => /data/app_name/releases/20130402102051/solr/conf/elevate.xml copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/admin-extra.html => /data/app_name/releases/20130402102051/solr/conf/admin-extra.html copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/schema.xml => /data/app_name/releases/20130402102051/solr/conf/schema.xml copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/protwords.txt => /data/app_name/releases/20130402102051/solr/conf/protwords.txt copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/scripts.conf => /data/app_name/releases/20130402102051/solr/conf/scripts.conf copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/stopwords.txt => /data/app_name/releases/20130402102051/solr/conf/stopwords.txt copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/conf/mapping-isolatin1accent.txt => /data/app_name/releases/20130402102051/solr/conf/mapping-isolatin1accent.txt copying /data/app_name/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr/solr/solr.xml => /data/app_name/releases/20130402102051/solr started solr ...  4. ensure config file correct (solr/conf/schema.xml) used link schema.xml: http://stackoverflow.com/a/14700918/649868 , overwrite schema.xml file under {path_to_app}/solr/conf  5. run sunspot re-index ${path_to_app}: bundle exec rake sunspot:reindex  --backtrace rake aborted! rsolr::error::http - 404 not found error:     not found  request data: "<?xml version=\"1.0\" encoding=\"utf-8\"?><delete><query>type:jobseeker</query></delete>" 

one thing noticed is, when executed bundle exec rake sunspot:solr:start command , checked log files, found this:

severe: null:org.apache.solr.common.solrexception: unable create core: development caused by: org.apache.solr.common.solrexception: cannot create directory: /data/app_name/current/solr/data/index 

but when visited directory index folder there.

interesting see solr creates solr.xml file in production mode, whereas it's not there in staging environment. please see solr.xml (after changing it):

<?xml version="1.0" encoding="utf-8" ?> <solr persistent="true"> <cores adminpath="/admin/cores" host="${host:}" hostport="${jetty.port:}">     <core name="default"     instancedir="/data/app_name/current/solr" datadir="/data/app_name/current/solr/data"/>     <core name="development" instancedir="/data/app_name/current/solr" datadir="/data/app_name/current/solr/data"/>     <core name="test"        instancedir="/data/app_name/current/solr" datadir="/data/app_name/current/solr/data"/> </cores> </solr> 

any idea this?

thanks help.

[updated]: on 5th-april-2013 deployed fresh build on production instance , after that, when do:

$ rails_env=production bundle exec rake sunspot:reindex --trace 

i got this:

** invoke sunspot:reindex (first_time) ** invoke environment (first_time) ** execute environment ** execute sunspot:reindex skipping progress bar: progress reporting, add gem 'progress_bar' gemfile  rake aborted! rsolr::error::http - 404 not found error:     not found  request data: "<?xml version=\"1.0\" encoding=\"utf-8\"?><delete>query>type:occupationdata</query></delete>" backtrace: /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:230:in `adapt_response' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:167:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:161:in `send_and_receive' (eval):2:in `post' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:67:in `update' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:131:in `delete_by_query' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/indexer.rb:55:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `block in remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'/data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:230:in `adapt_response' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:167:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:161:in `send_and_receive' (eval):2:in `post' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:67:in `update' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rsolr-1.0.8/lib/rsolr/client.rb:131:in `delete_by_query' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/indexer.rb:55:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `block in remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session.rb:181:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot.rb:464:in `remove_all' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/searchable.rb:178:in `solr_remove_all_from_index' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/searchable.rb:197:in `solr_reindex' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/tasks.rb:58:in `block (3levels) in <top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/class_set.rb:16:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot-1.3.3/lib/sunspot/class_set.rb:16:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/sunspot_rails-1.3.3/lib/sunspot/rails/tasks.rb:57:in `block (2levels) in <top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `call' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain' /usr/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' /data/app_name/shared/bundled_gems/ruby/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>' /data/app_name/shared/bundled_gems/ruby/1.9.1/bin/rake:19:in `load' /data/app_name/shared/bundled_gems/ruby/1.9.1/bin/rake:19:in `<main>' tasks: top => sunspot:reindex 

below model:

class occupationdata < activerecord::base     attr_accessible :onetsoc_code, :title, :description      searchable :auto_index => false         text :title         text :description     end end 

tried run sunspot rake tasks specifying rails_env=production , cross checked if solr running root or deploy, , got this:

/data/app_name/current $ ps -ef | grep solr deploy    2342     1  0 apr04 ?        00:00:30 /usr/lib/jvm/sun-jdk-1.6/bin/java -djetty.port=8983 -dsolr.data.dir=/data/app_name/releases/20130404095808/solr/data/production -dsolr.solr.home=/data/app_name/releases/20130404095808/solr -djava.util.logging.config.file=/tmp/logging.properties20130404-2342-17k2tsp -jar start.jar deploy    9770  9461  0 06:42 pts/0    00:00:00 grep --colour=auto solr 

it tells me solr running on deploy. not in situation provide solr logs, because failing sunspot:reindex not generating log level information well. :-(

9th-april-2013 - [update] [solution]

hi everyone,

after struggling lot re-indexing, found solution of this. error occurring due wrong gem mentioned in gemfile.

here's old copy of gemfile:

gem "sunspot", "~> 1.3.3" gem 'sunspot_rails', '~> 1.3.0' gem 'sunspot_cell', :git => 'git://github.com/zheileman/sunspot_cell.git' gem 'sunspot_cell_jars', :git => 'https://github.com/mrcsparker/sunspot_cell_jars.git' gem 'sunspot_solr', :git => "git://github.com/sunspot/sunspot.git" 

when browsed link: https://github.com/mrcsparker/sunspot_cell_jars, came know have use updated sunspot_solr gem in order keep work.

so using:

gem 'sunspot_solr', :git => "https://github.com/mrcsparker/sunspot.git" 

and created jar files again "rails g command" , when ran sunspot:reindex worked. hope someone.

had same problem different on error logging. in case like:

2013-07-18 10:26:47.750:info:oejw.standarddescriptorprocessor:no jsp support /solr, did not find org.apache.jasper.servlet.jspservlet null identity service, trying login service: null finding identity service: null 

what i'm using solr 4, has better admin interface, gemfile:

gem 'sunspot_solr', github: 'sunspot/sunspot', branch: 'master' gem 'sunspot_rails', github: 'sunspot/sunspot', branch: 'master' 

and that's it, no more. notice github: part. did similar did: deleted solr directory, then,

bundle install 

then,

rails generate sunspot_rails:install 

and then,

bundle exec rake sunspot:solr:start 

and started work.

next, run

bundle exec rake sunspot:reindex 

one thing have admit, before above procedure, since have solr 4, replaced xml files these from here. not sure whether critical.

hope helps someone.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -