elasticsearch和yii1.1错误

时间:2018-10-12 09:27:12

标签: elasticsearch yii

我想提出有关yii1.1和elasticsearch的项目。

我使用https://github.com/codemix/YiiElasticSearch

我尝试运行

/opt/php55/bin/php yiic elastic index --model=Business

但是启动后会发生错误..

root@100691:/var/www/******/protected# /opt/php55/bin/php yiic elastic index --model=Business --commitSize=10000 --offset=1970000 --iteration=1
Skipping the first 1970000 entries
Adding 10000 'Business' records from table '{{business}}' to index 'dev613'
 0% exception 'Guzzle\Http\Exception\ClientErrorResponseException' with message 'Client error response
[status code] 400
[reason phrase] Bad Request
[url] http://localhost:9200/_bulk' in /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php:43
Stack trace:
#0 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Message\Response))
#1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /var/www/******/protected/extensions/YiiElasticSearch/vendor/symfony/event-dispatcher/EventDispatcher.php(184): call_user_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 /var/www/******/protected/extensions/YiiElasticSearch/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'request.error', Object(Guzzle\Common\Event))
#4 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(589): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('request.error', Object(Guzzle\Common\Event))
#5 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(378): Guzzle\Http\Message\Request->processResponse(Array)
#6 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php(49): Guzzle\Http\Message\Request->setState('complete', Array)
#7 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(303): Guzzle\Http\Message\EntityEnclosingRequest->setState('complete', Array)
#8 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(257): Guzzle\Http\Curl\CurlMulti->processResponse(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Curl\CurlHandle), Array)
#9 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(240): Guzzle\Http\Curl\CurlMulti->processMessages()
#10 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(224): Guzzle\Http\Curl\CurlMulti->executeHandles()
#11 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(111): Guzzle\Http\Curl\CurlMulti->perform()
#12 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php(94): Guzzle\Http\Curl\CurlMulti->send()
#13 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php(284): Guzzle\Http\Curl\CurlMultiProxy->send()
#14 /var/www/******/protected/extensions/YiiElasticSearch/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php(198): Guzzle\Http\Client->send(Object(Guzzle\Http\Message\EntityEnclosingRequest))
#15 /var/www/******/protected/extensions/YiiElasticSearch/src/YiiElasticSearch/Connection.php(275): Guzzle\Http\Message\Request->send()
#16 /var/www/******/protected/extensions/YiiElasticSearch/src/YiiElasticSearch/SearchableBehavior.php(251): YiiElasticSearch\Connection->bulk('{"index":{"_ind...')
#17 [internal function]: YiiElasticSearch\SearchableBehavior->bulkIndexElasticDocuments('{"index":{"_ind...')
#18 /var/www/******/framework/base/CComponent.php(261): call_user_func_array(Array, Array)
#19 /var/www/******/framework/db/ar/CActiveRecord.php(227): CComponent->__call('bulkIndexElasti...', Array)
#20 /var/www/******/protected/extensions/YiiElasticSearch/src/YiiElasticSearch/ConsoleCommand.php(225): CActiveRecord->__call('bulkIndexElasti...', Array)
#21 /var/www/******/protected/extensions/YiiElasticSearch/src/YiiElasticSearch/ConsoleCommand.php(225): Business->bulkIndexElasticDocuments('{"index":{"_ind...')
#22 [internal function]: YiiElasticSearch\ConsoleCommand->actionIndex(false)
#23 /var/www/******/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs(Object(YiiElasticSearch\ConsoleCommand), Array)
#24 /var/www/******/framework/console/CConsoleCommandRunner.php(71): CConsoleCommand->run(Array)
#25 /var/www/******/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)
#26 /var/www/******/framework/base/CApplication.php(184): CConsoleApplication->processRequest()
#27 /var/www/******/framework/yiic.php(33): CApplication->run()
#28 /var/www/******/protected/yiic.php(9): require_once('/var/www/www-ro...')
#29 /var/www/******/protected/yiic(4): require_once('/var/www/www-ro...')
#30 {main}

以哪种方式查找问题? php guzzle已安装 elasticsearch运行了...

0 个答案:

没有答案