Skip to content
Advertisement

Why is searching not returning results in Magento 1.9 with error messages appearing in nginx logs for FastCGI and Elastica?

I’m running Magento 1.9.4 on Ubuntu 18.04, PHP 7.2 with nginx 1.14 fronting it all. The shopping site is loading and navigable. However, when I search for a term, it does not list the matches in the drop-down and shows the no results page.

I can see the following message in the nginx error logs:

2020/05/22 14:54:51 [error] 1213#1213: *270 FastCGI sent in stderr: "PHP message: PHP Warning:  array_keys() expects parameter 1 to be array, null given in /var/www/example.com/lib/Elastica/Status.php on line 69
PHP message: PHP Warning:  in_array() expects parameter 2 to be array, null given in /var/www/example.com/lib/Elastica/Status.php on line 81
PHP message: PHP Notice:  Undefined index: version in /var/www/example.com/lib/Elastica/Client.php on line 108" while reading response header from upstream, client: 72.71.71.72, server: www.example.com, request: "GET /catalogsearch/result/?q=trouser HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.com", referrer: "https://www.example.com/boutique/"

This was working prior to upgrading from Ubuntu 14.04 and PHP 7.0.

Advertisement

Answer

I need to find another job.

Magento is using Elastica client which in turn is pointing to AWS ElasticSearch service. I had to whitelist the host (Magento site) in the AWS ElasticSearch access policy in order for it to access the service.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement