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?


  • 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 2017
    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 2017
    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.
  • I carved out a little bit of time to work on this question again; one step I tried was to delete half of the database (in the experimental one) and see if the problem is simply a limitation on memory.  

     I started to use the binaries from the .tar files in the hopes that would help solve the problem.  When I tried to reindex the database today, I received this error:

    [2017-12-26 12:00:25,025][DEBUG][action.bulk              ] [Spidercide] [collectiveaccess][4] failed to execute bulk item (index) index {[collectiveaccess][ca_objects][736], source[_na_]}
    MapperParsingException[failed to parse, document is empty]
        at org.elasticsearch.index.mapper.DocumentParser.parseDocument(
        at org.elasticsearch.index.mapper.DocumentMapper.parse(
        at org.elasticsearch.index.shard.IndexShard.prepareIndex(
        at org.elasticsearch.index.shard.IndexShard.prepareIndexOnPrimary(
        at org.elasticsearch.action.index.TransportIndexAction.prepareIndexOperationOnPrimary(
        at org.elasticsearch.action.index.TransportIndexAction.executeIndexRequestOnPrimary(
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(
        at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(
        at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(
        at org.elasticsearch.transport.TransportService$4.doRun(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$

    I am using version 1.7.6, Schema Revision 150 of Providence

    Any thoughts on how I can fix this problem? Hopefully this error message is more useful than the last one I posted.
  • edited December 2017
    Other potentially useful details about the system:

    Ubuntu 17.10
    PHP 7.1
    MySQL 5.7
    java version "1.8.0_151"
    Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
    ETA: ElasticSearch 2.4.4

  • After rereading your post, I found an old hard drive to play around with so that I could install php7.0 on an Ubuntu 16.04 machine. I am trying the binaries for ES and I am still getting problems with bulk import and now I am getting this error:

    [2017-12-28 09:36:24,605][DEBUG][action.admin.indices.mapping.put] [Sweetface] failed to put mappings on indices [[collectiveaccess]], type [ca_objects]
    MapperParsingException[No handler for type [text] declared on field [ca_objects/source_id]]
        at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(
        at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(
        at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(
        at org.elasticsearch.index.mapper.DocumentMapperParser.parse(
        at org.elasticsearch.index.mapper.DocumentMapperParser.parse(
        at org.elasticsearch.index.mapper.MapperService.parse(
        at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(
        at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(
        at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(
        at org.elasticsearch.cluster.service.InternalClusterService$
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$

  • I have gotten my testing version of the database to run ElasticSearch; I must have skipped the step to increase the mmap counts (see this page).
Sign In or Register to comment.