Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

ElasticSearch Questions

I was able to get the ElasticSearch plug in working in a test database; however, I ended up using version 2.4.6 rather 6.0, and I had to change "max_indexing_buffer_size" field in the search.conf file from 500,000 to 50,000. (I also set ElasticSearch not to upgrade so I don't end up with a broken installation). Has anyone been successful in getting ElasticSearch 6.0 to work? If so, how did you do it?

Comments

  • It looks like I declared victory too soon. I created a tiny instance of CollectiveAccess and the reindexing works just fine, but the full size instance states that it cannot find any live nodes. I suspect the problem lies in running out of memory during the reindex. Any suggestions on how to get around the memory issue?
  • The current release uses the older 2.x ElasticSearch client and is only compatible with ElasticSearch 1.x and 2.x. I committed changes last week in the GitHub development branch that provide compatibility with Elasticsearch 5.x as well. I have not tried 6.x yet. 

    Where is it running out of memory? If PHP is not barfing with a fatal error then it's probably not memory. Look in the logs and let me know if you see any CURL-related errors. We just had a user with ElasticSearch failing with "no live nodes" and it ended up being a PHP 7.1-specific bug relating to CURL (which the Elastic client uses). Downgrading to PHP 7.0 resolved the issue. Not a satisfying solution, but it works.
  • The error I am getting when running bin/caUtils rebuild-search-index is:

     PHP Fatal error: Uncaught Elasticsearch\Common\Exceptions\BadRequest400Exception: {"error":"Incorrect HTTP method for uri [//collectiveaccess] and method [DELETE], allowed: [POST]","status":405} in /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:669
    Stack trace:
    #0 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(640): Elasticsearch\Connections\Connection->tryDeserializeError(Array, 'Elasticsearch\\C...')
    #1 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(561): Elasticsearch\Connections\Connection->tryDeserialize400Error(Array)
    #2 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(262): Elasticsearch\Connections\Connection->process4xxError(Array, Array, Array)
    #3 /var/www/html/providence/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{clos in /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php on line 572

    This computer is running Ubuntu 17.10, Elasticsearch 6.0 and PHP 7.1, so I am going to downgrade Elasticsearch and PHP to see if that solves the problem. 
  • Definitely downgrade to 5.0. We don't do 6.0 at all yet.
  • edited December 6
    I migrated to ElasticSearch 2.4.6 and PHP 7.0, but I am getting this error again when I nearly get through the object section of the rebuilding the search index:

    PHP Fatal error:  Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51
    Stack trace:
    #0 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(71): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection()
    #1 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(89): Elasticsearch\Transport->getConnection()
    #2 /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(229): Elasticsearch\Transport->performRequest('POST', '//_all/_bulk', Array, '{"index":{"_ind...', Array)
    #3 /var/www/html/providence/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}(Array)
    #4 /var/www/html/providence/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.p in /var/www/html/providence/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php on line 51

    ETA: The log from Elasticsearch reads "failed to execute bulk item (index) index {[collectiveaccess][ca_objects][39291], source[_na_]}
    MapperParsingException[failed to parse, document is empty]
    "

    Second Edit: I forgot to include that I am running the development branch of Providence 1.7.6, Schema Revision 150


  • edited December 7
    I am now wondering if I am missing a step in the installation of Elasticsearch. Here is what I did:
    • Install Elasticsearch as  Deb File
    • Hold Elasticsearch, so it won't upgrade to 6.0
    • Set Elasticsearch as a service
    • Edit app.conf to go from SQLSearch to ElasticSearch
    • Edit search.conf to denote which version of Elasticsearch I am using <-ETA
    • Try to reindex the search

    I have also in the elasticsearch.yml file, I have tried to set the network host to the IP address of this machine, localhost, etc.I have always had to go back to localhost to get the program appearing to work. When I log into Providence, the program says it's running elasticsearch, but when I reindex the search fields, I keep getting one error or another.

  • Without seeing the actual system it's really hard to say where things are going wrong. The "no alive nodes" message is pretty generic and can be caused by a number of disparate issues.
  • Ah, ok. Thanks for your help. I will keep trying.
Sign In or Register to comment.