Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

bin/adminconsole sulu:build dev fails with ZendSearch\Lucene\Exception\RuntimeException #807

Closed
pascalwacker opened this issue Mar 25, 2017 · 5 comments

Comments

@pascalwacker
Copy link

Q A
Bug? yes
New Feature? no
Sulu Version current (composer create-project sulu/sulu-minimal my-project -n)
Browser Version None

Actual Behavior

Sulu throws an Exception while initialization:

          [ZendSearch\Lucene\Exception\RuntimeException]  
          Can't obtain shared reading index lock  

The command used is: bin/adminconsole sulu:build dev, it works until Target: phpcr, there the last thing, that seams to work is creating the homepage:

Target: phpcr

    sulu:document:initialize
    
        sulu_document_manager.initializer.workspace
          [...] // additional output, shortened for the sake of length!
        sulu_core.webspace.document_manager.webspace_initializer
          [+] homepage: [homepage] /cmf/sulu_l/contents (de)
        
                                                          
          [ZendSearch\Lucene\Exception\RuntimeException]  
          Can't obtain shared reading index lock  

The same thing happens when running the command with sudo in front, or when changing dev to prod

Expected Behavior

Initialization

Steps to Reproduce

Happens in a Ubuntu 16.04 Vagrant, running on VMWare Workstation, using Apache, PHP-FPM (PHP 7.0.17) and MySQL 5.7.17

Fresh installation following: http://docs.sulu.io/en/latest/book/getting-started.html (except for changing the name of the webspace to sulu.l.xml, the default language to de and updating the environments to use de as language).

There's so far no Lucene search engine installed on the server. Is this a requirement? If so, which one? Apache Solr or Elastic Search?

@pascalwacker
Copy link
Author

I tried to install Sulu again today, with the only difference, of using PHP 5.6 instead of PHP 7.0, otherwise exactly the same VM setup. Is there an issue with ZendSearch on PHP 7?

@pascalwacker
Copy link
Author

After some additional testing: it seams that installing the package libjackrabbit-java and assigning more memory to the vm (from 512 MB to 1536 MB) solves the issue for PHP7.

@pascalwacker
Copy link
Author

Coming back to this today. It turned out, this time, the issue was running it in Vagrant within a synced folder.

@danrot
Copy link
Contributor

danrot commented Jun 12, 2017

Side note: If you get strange errors like this, it could also be that the search index is broken for some reason (can e.g. happen if you cancel the indexing process in the wrong moment...). Just clearing the app/data folder might help then.

@tackerm
Copy link

tackerm commented Mar 16, 2018

For the record, I was running into the same issue with sulu minimal. The problem here seems to be the the slow filesystem throughput rate with the synced vagrant folder (causing some kind of race condition...)

It can be resolved by moving var/indexes (and optionally also var/cache and var/logs) away from the synced folder, for example by softlinking it to /run/shm/website/ or so. More details here: sulu/sulu-minimal#89

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants