Search error encountered

245 views
Skip to first unread message

LTIPL

unread,
Aug 17, 2019, 10:59:56 AM8/17/19
to AtoM Users

Search error encountered

Elasticsearch error: Elastica\Exception\Connection\HttpException

Back to previous page.







Whenever anyone uses the search at the top of the page we get this error now

Dan Gillean

unread,
Aug 19, 2019, 10:59:58 AM8/19/19
to ICA-AtoM Users
Hi there, 

We'll need a bit more information to help you resolve this error. 
  • What version of AtoM do you have installed?
  • Did you follow our recommended installation instructions? 
    • If yes, what version of Ubuntu are you using? 
    • If no, what changes have you made?
  • What version of Elasticsearch do you have installed?
  • How much RAM do you have available on your server?
First, let's check the version and status of Elasticsearch. Please share the output of the following commands - these commands use cURL (so you an run sudo apt-get install curl to install it if it's not already installed).  Run from the server where ES is installed and using the default port, you could try: 
If you are running AtoM 2.5 or later with Elasticsearch 5.6, you can also run the following command from AtoM's root installation directory (/usr/share/nginx/atom if you have followed our recommended installation instructions. Please share the task output if running 2.5: 
  • php symfony search:status
Other useful ES commands  in Ubuntu 16.04 and 18.04: 
  • sudo systemctl stop elasticsearch
  • sudo systemctl enable elasticsearch
  • sudo systemctl start elasticsearch
  • sudo systemctl status elasticsearch
  • sudo systemctl restart elasticsearch
You could try stopping and restarting ES to see if that helps. 

Another thing you could try is manually deleting the search index from AtoM, and then repopulating it. To manually delete the search index from AtoM, use: 
  • curl -XDELETE 'localhost:9200/atom'
To repopulate it, run the following from AtoM's root installation directory. We will also clear the application cache first: 

My next recommendation is to make sure you have enough system resources - particularly memory - for the installation. Our requirements page includes some notes on what we use when deploying to hosted instances (such as via OVH or DigitalOcean, two external hosting providers we have used in the past for AtoM). There, we list the following recommendations:
  • Processor: 2 vCPUs @ 2.3GHz
  • Memory: 7GB
  • Disk space (processing): 50GB at a minimum for AtoM’s core stack plus more storage would be required for supporting any substantial number of digital objects.
You can likely get away with less memory once AtoM is installed, but ES is a memory hog during installation, so I would try to give it as much memory as you possibly can during installation -  you can always scale it back down after if needed. 

One of the most common problems we see with ES is that there has not been enough memory allocated. The size of the heap is declared in /etc/default/elasticsearch - - specifically the ES_HEAP_SIZE for your install. So you could try changing this value - for example,  you could change the heap size value to  "2g" if you have two GB of memory available. For an small to medium institution with 10,000 - 50,000 descriptions and low traffic, 4 GB of RAM should be sufficient.   For more data or more traffic, higher allocations of RAM may be required. Once the value is changed you have to restart Elasticsearch. 

There are more details here: 

Finally, if none of the above has helped resolve the issue, the next thing you could try is to see if the ES logs have any more information than what you've found in your stack trace. In our recommended Ubuntu installation instructions, the Elasticsearch (ES) log is normally located in /var/log/elasticsearch/elasticsearch.log and you could check there to see if there's more information available. Try doing some web searches with the error message to see if you can find further suggestions online -  and remember to make sure they are for the correct version of ES! 

Let us know how it goes! 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/855d8ef5-6319-44bc-9b8c-ac3649f21eff%40googlegroups.com.

LTIPL

unread,
Aug 20, 2019, 6:51:10 PM8/20/19
to AtoM Users
Hi Dan,

Thank you for the reply. I am using Ubuntu 18.04.3 LTS.

When I run your curl command I get this error
curl: (7) Failed to connect to localhost port 9200: Connection refused

Also please see output from elasticsearch status command

webserver# sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-08-20 18:15:55 EDT; 8min ago
     Docs: http://www.elastic.co
 Main PID: 1137 (code=exited, status=1/FAILURE)

Aug 20 18:15:55 webserver systemd[1]: Started Elasticsearch.
Aug 20 18:15:55 webserver elasticsearch[1137]: Unrecognized VM option 'UseParNewGC'
Aug 20 18:15:55 webserver elasticsearch[1137]: Error: Could not create the Java Virtual Machine.
Aug 20 18:15:55 webserver elasticsearch[1137]: Error: A fatal exception has occurred. Program will exit.
Aug 20 18:15:55 webserver systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 18:15:55 webserver systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Any suggestions?
To unsubscribe from this group and stop receiving emails from it, send an email to ica-ato...@googlegroups.com.

LTIPL

unread,
Aug 20, 2019, 7:18:07 PM8/20/19
to AtoM Users
So I reinstalled Elasticsearch and now it shows as running, however now I am getting http 500 error

This page isn’t working

 is currently unable to handle this request.

HTTP ERROR 500

LTIPL

unread,
Aug 20, 2019, 7:24:11 PM8/20/19
to AtoM Users
  thrown in /usr/share/nginx/atom/plugins/arElasticSearchPl" while reading response header from upstream, client: , server:  request: "GET /index.php/informationobject/browse?names=20777%2C20789%2C20788%2C20785&sort=lastUpdated HTTP/1.1", upstream: "fastcgi://unix:/run/php7.0-fpm.atom.sock:", host: ""
2019/08/20 19:22:48 [error] 1129#1129: *209 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught sfInitializationException: arElasticSearchPlugin needs cURL PHP extension in /usr/share/nginx/atom/plugins/arElasticSearchPlugin/config/arElasticSearchPluginConfiguration.class.php:36
Stack trace:
#0 /usr/share/nginx/atom/vendor/symfony/lib/config/sfApplicationConfiguration.class.php(169): arElasticSearchPluginConfiguration->initialize()
#1 /usr/share/nginx/atom/vendor/symfony/lib/config/sfApplicationConfiguration.class.php(150): sfApplicationConfiguration->initializePlugins()
#2 /usr/share/nginx/atom/vendor/symfony/lib/config/sfApplicationConfiguration.class.php(51): sfApplicationConfiguration->initConfiguration()
#3 /usr/share/nginx/atom/vendor/symfony/lib/config/sfProjectConfiguration.class.php(611): sfApplicationConfiguration->__construct('prod', false, '/usr/share/ngin...', NULL)
#4 /usr/share/nginx/atom/index.php(5): sfProjectConfiguration::getApplicationConfiguration('qubit', 'prod', false)
#5 {main}

LTIPL

unread,
Aug 20, 2019, 7:32:15 PM8/20/19
to AtoM Users
Nevermind seems like still issues with elasticsearch

● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-08-20 19:16:56 EDT; 14min ago
     Docs: http://www.elastic.co
 Main PID: 5345 (code=exited, status=1/FAILURE)

Aug 20 19:16:47 webserver systemd[1]: Starting Elasticsearch...
Aug 20 19:16:47 webserver systemd[1]: Started Elasticsearch.
Aug 20 19:16:47 webserver elasticsearch[5345]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Aug 20 19:16:50 webserver elasticsearch[5345]: [2019-08-20T19:16:50,853][WARN ][o.e.c.l.LogConfigurator  ] ignoring unsupported logging configuration file [/etc/elasticsearch/logging.yml], logging is configured via [/etc/elasticsearch/lo
Aug 20 19:16:56 webserver systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 19:16:56 webserver systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
lines 1-12/12 (END)

Dan Gillean

unread,
Aug 21, 2019, 5:24:15 PM8/21/19
to ICA-AtoM Users
Hi again, 

So just to clarify. You are using Ununtu 18.04 but: 
  • What is the full AtoM version number (found Admin > Settings, or by running php symfony tools:get-version)
  • What version of Elasticsearch do you have installed?
  • How much memory does your installation have available?
  • What do you get when you run the following? java -version
Also, you can try the cURL commands running as the administrator (i.e. using sudo), like so: 
Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/56bf2ec0-843e-4dfe-ac2e-f1261553ab60%40googlegroups.com.

LTIPL

unread,
Aug 24, 2019, 10:56:55 AM8/24/19
to AtoM Users
Hi Dan,

I got checking the logs and turns out elasticsearch wasn't booting due to not enough memory, even though I had 4gb installed. I've been wanting to build a new server and upgrade to ATOM 2.5.1 anyway so I just went that route using this guide and everything works good now. https://groups.google.com/forum/#!searchin/ica-atom-users/upgrade%7Csort:date/ica-atom-users/FgcPITNgg4I/Yf0GQnhYFgAJ

Thank you for your help




Dan Gillean

unread,
Aug 26, 2019, 10:16:22 AM8/26/19
to ICA-AtoM Users
Thanks for updating the thread and letting us know! Glad to hear you're up and running now :)

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/fdcc2b59-09cb-4d9c-8448-cb228f96c2f2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages
Search
Clear search
Close search
Google apps
Main menu