New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with solr-instance - _version_ field must exist in schema #84

Closed
mstaniszczak opened this Issue Sep 22, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@mstaniszczak

mstaniszczak commented Sep 22, 2015

I tried to setup c.solr in existing plone instances, but I stuck on starting sorl-instance. After start it, I see in logs (and when I try to reindex solr):

3011 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer  – Error creating core [collection1]: Unable to use updateLog: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
org.apache.solr.common.SolrException: Unable to use updateLog: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:881)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:654)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:491)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to use updateLog: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.update.UpdateLog.init(UpdateLog.java:280)
    at org.apache.solr.update.UpdateHandler.<init>(UpdateHandler.java:134)
    at org.apache.solr.update.UpdateHandler.<init>(UpdateHandler.java:94)
    at org.apache.solr.update.DirectUpdateHandler2.<init>(DirectUpdateHandler2.java:100)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:558)
    at org.apache.solr.core.SolrCore.createUpdateHandler(SolrCore.java:628)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:843)
    ... 8 more
Caused by: org.apache.solr.common.SolrException: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.update.VersionInfo.getAndCheckVersionField(VersionInfo.java:56)
    at org.apache.solr.update.VersionInfo.<init>(VersionInfo.java:82)
    at org.apache.solr.update.UpdateLog.init(UpdateLog.java:277)
    ... 18 more
3013 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – user.dir=/home/mstaniszczak/Projekty/portal/parts/solr-instance
3013 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – SolrDispatchFilter.init() done
3052 [main] INFO  org.eclipse.jetty.server.AbstractConnector  – Started SocketConnector@127.0.0.1:8983

I thought, that is problem with our instance, so I also tested it on vanilla Plone. But with exactly the same result. Here you are buildout which I used for vanilla instances (buildoud.cfg default, just from paster) :

solr.cfg

[buildout]
extends =
  buildout.cfg
  https://github.com/collective/collective.solr/raw/master/solr.cfg
  https://raw.githubusercontent.com/collective/collective.solr/master/solr-4.10.x.cfg

[instance]
eggs += collective.solr

Any idea what can be reason of that? Maybe I missed something?

@mstaniszczak

This comment has been minimized.

mstaniszczak commented Sep 22, 2015

I tested it now also with buildout created by bobtemplates.plone - just creating addon buildout via mrbob -O plonetraining.testing bobtemplates:plone_addon
This same result. My os is Ubuntu 14.04 LTS.

@tisto

This comment has been minimized.

Member

tisto commented Sep 23, 2015

Ok, I can reproduce the problem.

Create package:

$ mrbob -O example.solr bobtemplates:plone_addon
$ cd example.solr/
$ wget https://github.com/collective/collective.solr/raw/master/solr.cfg
$ wget https://raw.githubusercontent.com/collective/collective.solr/master/solr-4.10.x.cfg

buildout.cfg:

[buildout]
extends =
    http://dist.plone.org/release/4.3.6/versions.cfg
    solr.cfg
    solr-4.10.x.cfg
...
parts +=

$ python bootstrap-buildout.py
$ bin/buildout
$ bin/solr-instance fg

org.apache.solr.common.SolrException: Unable to use updateLog: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:881)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:654)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:491)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to use updateLog: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.update.UpdateLog.init(UpdateLog.java:280)
    at org.apache.solr.update.UpdateHandler.<init>(UpdateHandler.java:134)
    at org.apache.solr.update.UpdateHandler.<init>(UpdateHandler.java:94)
    at org.apache.solr.update.DirectUpdateHandler2.<init>(DirectUpdateHandler2.java:100)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:558)
    at org.apache.solr.core.SolrCore.createUpdateHandler(SolrCore.java:628)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:843)
    ... 8 more
Caused by: org.apache.solr.common.SolrException: _version_ field must exist in schema, using indexed="true" or docValues="true", stored="true" and multiValued="false" (_version_ does not exist)
    at org.apache.solr.update.VersionInfo.getAndCheckVersionField(VersionInfo.java:56)
    at org.apache.solr.update.VersionInfo.<init>(VersionInfo.java:82)
    at org.apache.solr.update.UpdateLog.init(UpdateLog.java:277)
    ... 18 more
2102 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – user.dir=/home/timo/workspace/example.solr/parts/solr-instance
2102 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – SolrDispatchFilter.init() done
2116 [main] INFO  org.eclipse.jetty.server.AbstractConnector  – Started SocketConnector@127.0.0.1:8983

@tisto tisto added the bug label Sep 23, 2015

@tisto

This comment has been minimized.

Member

tisto commented Sep 23, 2015

This is actually a collective.recipe.solrinstance issue. Just pin c.r.solrinstance to 5.3.2:

[versions]
collective.recipe.solrinstance = 5.3.2
@tisto

This comment has been minimized.

Member

tisto commented Sep 23, 2015

Bug has been reported here: collective/collective.recipe.solrinstance#49
Will close this issue now.

@tisto tisto closed this Sep 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment