Plone 5.1.2/collective.solr - version conflicts

I'm trying to install collective.solr on my Plone 5.1 site, but I unfortunately am running into version conflicts when I run buildout.

Got five.formlib 2.0.
Getting distribution for 'Zope'.
Got Zope 4.0b7.
Version and requirements information containing zope.formlib:
  [versions] constraint on zope.formlib: 4.0.6
  Requirement of collective.solr: zope.formlib
  Requirement of zope.formlib: zope.datetime
  Requirement of zope.formlib: zope.traversing
  Requirement of zope.formlib: zope.security
  Requirement of zope.formlib: zope.schema>=3.5.1
  Requirement of zope.formlib: zope.publisher
  Requirement of zope.formlib: zope.lifecycleevent
  Requirement of zope.formlib: zope.interface
  Requirement of zope.formlib: zope.i18nmessageid
  Requirement of zope.formlib: zope.i18n
  Requirement of zope.formlib: zope.event
  Requirement of zope.formlib: zope.component
  Requirement of zope.formlib: zope.browserpage>=3.11.0
  Requirement of zope.formlib: zope.browser>=1.1
  Requirement of zope.formlib: pytz
  Requirement of zope.formlib: setuptools
  Requirement of five.formlib>=1.0.2: zope.formlib>=4.4
While:
  Installing instance.
Error: The requirement ('zope.formlib>=4.4') is not allowed by your [versions] constraint (4.0.6)

Unfortunately when I try to pin zope.formlib to 4.4 underneath the versions, I run into another error with zExceptions.
I did download solr.cfg and solr-4.10.x.cfg and included them underneath extensions and also placed underenath versions collective.recipe.solrinstance = 5.3.2.

I tried a brand new UnifiedInstallation (Plone-5.1.2-UnifiedInstaller) so that it was a brand new buildout-cache and ran into the same issue.

Is there a missing package I need that will set the correct versions? Or do I need to change the version of something?

collective.solr is not yet ready for 5.1 AFAIK.

  • master branch on github supports only solr 7.4 and 7.5 and Plone 5.0.x release series
  • last release on pypi (5.0.3) supports solr 4.10 and Plone 4.3.x and 5.0.x release series

/cc @tisto did I say anything wrong?

2 Likes

I have this Configuration for a Test with Plone 5.1.4. Put all files in a directory of your choice.

# requirements.txt
zc.buildout == 2.11.4
setuptools == 39.1.0
# bootstrap.sh
#!/bin/sh
virtualenv --clear .
./bin/pip install -r requirements.txt
./bin/buildout $*
# buildout.cfg
[buildout]

index =
    https://pypi.org/simple/

extends =
    https://dist.plone.org/release/5-latest/versions.cfg
    solr.cfg
    solr4.cfg

versions = versions

parts += 
    instance

[instance]
recipe = plone.recipe.zope2instance
eggs =
    Plone
    Pillow
    collective.solr

[versions]
collective.solr = 6.0a1
collective.recipe.solrinstance = 6.0.0b3
# solr.cfg
[buildout]
parts +=
    solr-download
    solr-instance

[settings]
solr-host = 127.0.0.1
solr-port = 8983
jmx-host = 127.0.0.1
jmx-port = 8984
solr-min-ram = 128M
solr-max-ram = 256M


[solr-download]
recipe = hexagonit.recipe.download
strip-top-level-dir = true


[solr-instance]
recipe = collective.recipe.solrinstance
solr-location = ${solr-download:location}
host = ${settings:solr-host}
port = ${settings:solr-port}
basepath = /solr
# autoCommitMaxTime = 900000
max-num-results = 500
section-name = SOLR
unique-key = UID
logdir = ${buildout:directory}/var/solr
default-search-field = default
unique-key = UID
solr-version = 4
default-operator = AND
updateLog = true
requestParsers-enableRemoteStreaming = true
java_opts =
  -Dcom.sun.management.jmxremote
  -Djava.rmi.server.hostname=${settings:jmx-host}
  -Dcom.sun.management.jmxremote.port=${settings:jmx-port}
  -Dcom.sun.management.jmxremote.ssl=false
  -Dcom.sun.management.jmxremote.authenticate=false
  -server
  -Xms${settings:solr-min-ram}
  -Xmx${settings:solr-max-ram}

index =
    name:allowedRolesAndUsers   type:string stored:true multivalued:true
    name:created                type:date stored:true
    name:Creator                type:string stored:true
    name:Date                   type:date stored:true
    name:default                type:text indexed:true stored:false multivalued:true
    name:Description            type:text copyfield:default stored:true
    name:effective              type:date stored:true
    name:exclude_from_nav       type:boolean indexed:false stored:true
    name:expires                type:date stored:true
    name:getIcon                type:string indexed:false stored:true
    name:getId                  type:string indexed:false stored:true
    name:getRemoteUrl           type:string indexed:false stored:true
    name:is_folderish           type:boolean stored:true
    name:Language               type:string stored:true
    name:modified               type:date stored:true
    name:object_provides        type:string stored:true multivalued:true
    name:path_depth             type:integer indexed:true stored:true
    name:path_parents           type:string indexed:true stored:true multivalued:true
    name:path_string            type:string indexed:false stored:true
    name:portal_type            type:string stored:true
    name:review_state           type:string stored:true
    name:SearchableText         type:text copyfield:default stored:true
    name:searchwords            type:string stored:true multivalued:true
    name:showinsearch           type:boolean stored:true
    name:Subject                type:string copyfield:default stored:true multivalued:true
    name:Title                  type:text copyfield:default stored:true
    name:Type                   type:string stored:true
    name:UID                    type:string stored:true required:true
# solr4.cfg
[buildout]
parts += solr-download

[solr-download]
url = https://archive.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz
md5sum = 8ae107a760b3fc1ec7358a303886ca06

Run the commands:

./bootstrap.sh

Trink a Coffee

bin/solr-instance fg
bin/instance fg

Read this: Solr Training Plone 5

1 Like

@gforcada is correct. I'd recommend to try collective.solr master branch if you want to use it with Plone 5.1. We found plenty of incompatibilities with Plone 5.1 that we had to fix, so you will for sure run into issues when using the latest pypi release.

We just have to fix one issue with the sorting in Solr before we can make a first collective.solr 7.0.0 alpha release.

1 Like

Thank you very much for your response. I am really sorry for my late response.
I used the master version and it compiled. I tried running a plone instance and the utility showed up in the plone management. However, I forgot I needed to run 'bin/solr-instance start', but it didn't add solr-instance to the bin directory. I tried bin/buildout -c solr.cfg, but a message said I needed zc.buildout>=2.12.0:

Uninstalling unifiedinstaller.
Version and requirements information containing zc.buildout:
  [versions] constraint on zc.buildout: >=2.11.2
  Requirement of plone.recipe.unifiedinstaller: zc.buildout
  Requirement of zc.recipe.egg: zc.buildout>=2.12.0
  Requirement of zc.buildout: setuptools>=8.0
While:
  Installing.
  Uninstalling unifiedinstaller.
  Installing recipe plone.recipe.unifiedinstaller.
Error: There is a version conflict.
We already have: zc.buildout 2.11.2

This is unfortunately a seperate problem, but I am not sure how to update zc.buildout. Pinning the version in buildout.cfg isn't working.

Thank you sharing. I really appreciate it. I apologize my response is late.

no problem