【问题标题】:Elasticsearch Runtime Exception curl_multi_exec() function is required for the client客户端需要 Elasticsearch 运行时异常 curl_multi_exec() 函数
【发布时间】:2015-11-02 21:11:55
【问题描述】:

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

[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

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

【问题讨论】:

  • 试试这个echo function_exists('curl_multi_select'); 如果不打印"1",你没有启用这个功能。那么解决方案将是:升级 PHP 或/并检查php.ini(禁用功能)。是的,您应该安装并启用 curl lib。
  • 在此之前提出的非常相似的问题:stackoverflow.com/questions/33469459/…

标签: php laravel elasticsearch


【解决方案1】:

通过安装 php5-curl 修复。但这以某种方式卸载了php5-mysql。所以重新安装了那个和php5-mcrypt,我很高兴。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-17
    • 1970-01-01
    • 2023-03-24
    • 1970-01-01
    • 2021-01-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多