Puneeth,
Some of the steps you could do…
1. Stop Solr
2. Remove SOLR folder
3. Start Solr
4. Ensure your Config file is correct (solr/conf/schema.xml)
5. Run sunspot:reindex
Many times the error occurs because the schema file is not properly generated… we too have faced this kind of issue…
Thanks and Regards
Satish N Kota
Director, Heurion
Creator, TestimonialsFor
@phone: +91 98862 03255
@testifor: http://www.testifor.com/satishnkota
www.testifor.com – What others say, Matters!!!
From: bangal...@googlegroups.com [mailto:bangal...@googlegroups.com] On Behalf Of Puneet Pandey
Sent: Wednesday, April 03, 2013 11:34 AM
To: bangalorerug
Subject: Re: [Bangalore RUG] [Solr + Rails] - rake sunspot:reindex is not working
Tried with creating fresh instance and after deploying when I am trying to execute sunspot:reindex, I am facing the same issue again.
Also, checked the permissions for /data folder and after changing it to 777 when I executed the above command, nothing worked out :(
Any other suggestions?
On Tue, Apr 2, 2013 at 8:39 AM, Vamsee Kanakala <vkan...@gmail.com> wrote:
On Mon, Apr 01, 2013 at 04:01:39PM +0530, Puneet Pandey wrote:
> From the logs, it is clear that re-indexing is failing because of 2 reasons:
>
> A. Unable to create core: collection1
> B. Can't find resource 'solrconfig.xml' in classpath
>
> Based on the errors above, below are the tricks I tried:
>
> A. Checked the folder permission for solr
> B. Manually created collection1 inside solr and copied solrconfig.xml
> inside /solr/collection1/conf.
> C. copied the lib and conf folders from
> /data/APP_NAME/shared/bundled_gems/ruby/1.9.1/bundler/gems/sunspot-87e29212527f/sunspot_solr/solr
> and pasted it in APP_NAME/solr/sunspot_rails folder.
>
As far as I can remember, sunspot should do most of the hard work of creating solr configs for you.
It still looks like a permissions issue to me. Did you check if the /data folder is writable by
the web server process that runs solr? If it's Apache, the folder permissions should be writable
by the www-data user/group.
Vamsee.
--
You received this message because you are subscribed to the Google Groups "BANGALORE RUG-Ruby Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bangalorerug...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Puneet Pandey
Associate Consultant
NOIDA/INDIA - 201301
E: ad...@puneetpandey.com
B: My Blog
Linkedin Profile | GitHub Profile
********Where there is a will, there is a way***********
--
You received this message because you are subscribed to the Google Groups "BANGALORE RUG-Ruby Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bangalorerug...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Puneet,
I am not sure why you are replacing the schema.xml…I think you might want to try using the basic schema created..
Also I tried looking at the errors…it says…
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core: development
Why does it have to create development core on Production???? can you try doing these steps
Replace all “bundle exec rake ….” Tasks with
“RAILS_ENV=production bundle exec rake…. “
This will make your solr to execute as production instead of development mode….
Secondly I also see the error
Caused by: org.apache.solr.common.SolrException: Cannot create directory: /data/APP_NAME/current/solr/data/index
This could be when the user running solr doesnot have necessary previleges…. This many times happens because Your app is running on deploy and solr running or root or vice versa…. Can you verify that too….
Puneet,We had used Sunspot for couple of our projects and it seem very straight forward. It abstracts the Solr APIs very well. I am trying to get a good picture of the problem to check whether I can help you somehow. So couple of questions:
- Are you trying to say that the problem with reindex exists only with the production environment? Does it work fine in Development environment?
- Does the problem exists only with Reindex rake task? What about while indexing after every save? Does that work well from the application?
- Have you tried Model.reindex method? Does that work?