Elasticsearch运行时异常客户端需要curl_multi_exec()函数

时间:2015-11-02 02:09:15

标签: php laravel elasticsearch

我的队列工作人员不断抛出以下错误:

[Elasticsearch\Common\Exceptions\RuntimeException]      
curl_multi_exec() function is required for the client.

laravel日志中的堆栈跟踪是:

[2015-11-02 01:52:35] local.ERROR: exception 'Elasticsearch\Common\Exceptions\RuntimeException' with message 'curl_multi_exec() function is required for the client.' in /opt/bitnami/frameworks/laravel/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php:89
Stack trace:
#0 /opt/bitnami/frameworks/laravel/app/Services/ElasticSearchClient.php(35): Elasticsearch\Client->__construct(Array)
#1 /opt/bitnami/frameworks/laravel/app/Providers/ElasticSearchServiceProvider.php(29): App\Services\ElasticSearchClient->__construct()
#2 [internal function]: App\Providers\ElasticSearchServiceProvider->boot()
#3 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(503): call_user_func_array(Array, Array)
#4 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->call(Array)
#5 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(717): Illuminate\Foundation\Application->bootProvider(Object(App\Providers\ElasticSearchServiceProvider))
#6 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(App\Providers\ElasticSearchServiceProvider), 19)
#7 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(718): array_walk(Array, Object(Closure))
#8 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#9 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#10 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(208): Illuminate\Foundation\Application->bootstrapWith(Array)
#11 /opt/bitnami/frameworks/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(105): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 /opt/bitnami/frameworks/laravel/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}

我不知道如何解决它。

我正在使用bitnami灯堆来运行laravel应用程序。

我也在使用https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html

在php.ini文件中,是否需要添加以下行?:

extension=php_curl.dll

还是我需要做些额外的事情?

1 个答案:

答案 0 :(得分:0)

通过安装php5-curl修复。但那不知何故卸载了php5-mysql。所以重新安装了那个和php5-mcrypt,我很高兴。