我在SugarCRM 8.0.0的一个临时示例上创建了一个捆绑在一个包中的自定义modules
。为了迁移这些modules
,我决定将包publish
,这样我就可以将一个可安装的zip文件上传到另一个示例上。不幸的是,当我试图使用模块加载器将zip文件上传到接收示例上时,安装在80%时挂起,在sugarlog中给出错误
我正在运行ElasticSearch 5.4
,它与我正在运行的Sugar示例兼容。这是日志中显示的错误:
Thu Mar 28 17:54:19 2019 [1786][1][FATAL] Elasticsearch request failure: no such index [index: ab164c0013004724c8eba5f5f6f3f646_shared]
Thu Mar 28 17:54:19 2019 [1786][1][FATAL] Exception in Controller: Elastica\Exception\ResponseException: no such index [index: ab164c0013004724c8eba5f5f6f3f646_shared] in /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:179
Stack trace:
# 0 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Request.php(193): Elastica\Transport\Http->exec(Object(Elastica\Request), Array)
# 1 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Client.php(674): Elastica\Request->send()
# 2 /var/www/html/SugarPro-Full-8/src/Elasticsearch/Adapter/Client.php(355): Elastica\Client->request('ab164c001300472...', 'PUT', Array, Array)
# 3 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Client.php(706): Sugarcrm\Sugarcrm\Elasticsearch\Adapter\Client->request('ab164c001300472...', 'PUT', Array, Array)
# 4 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Index.php(562): Elastica\Client->requestEndpoint(Object(Elasticsearch\Endpoints\Indices\Mapping\Put))
# 5 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Type.php(523): Elastica\Index->requestEndpoint(Object(Elasticsearch\Endpoints\Indices\Mapping\Put))
# 6 /var/www/html/SugarPro-Full-8/vendor/ruflin/elastica/lib/Elastica/Type/Mapping.php(250): Elastica\Type->requestEndpoint(Object(Elasticsearch\Endpoints\Indices\Mapping\Put))
# 7 /var/www/html/SugarPro-Full-8/src/Elasticsearch/Index/IndexManager.php(486): Elastica\Type\Mapping->send()
# 8 /var/www/html/SugarPro-Full-8/src/Elasticsearch/Index/IndexManager.php(390): Sugarcrm\Sugarcrm\Elasticsearch\Index\IndexManager->sendMapping(Object(Elastica\Type\Mapping))
# 9 /var/www/html/SugarPro-Full-8/src/Elasticsearch/Index/IndexManager.php(285): Sugarcrm\Sugarcrm\Elasticsearch\Index\IndexManager->createIndices(Object(Sugarcrm\Sugarcrm\Elasticsearch\Index\IndexCollection), Object(Sugarcrm\Sugarcrm\Elasticsearch\Analysis\AnalysisBuilder), Object(Sugarcrm\Sugarcrm\Elasticsearch\Mapping\MappingCollection), false)
# 10 /var/www/html/SugarPro-Full-8/src/Elasticsearch/Index/IndexManager.php(200): Sugarcrm\Sugarcrm\Elasticsearch\Index\IndexManager->syncIndices(Array, false)
# 11 /var/www/html/SugarPro-Full-8/src/SearchEngine/Engine/Elastic.php(113): Sugarcrm\Sugarcrm\Elasticsearch\Index\IndexManager->addMappings(Array)
# 12 /var/www/html/SugarPro-Full-8/ModuleInstall/ModuleInstaller.php(3489): Sugarcrm\Sugarcrm\SearchEngine\Engine\Elastic->addMappings(Array)
# 13 /var/www/html/SugarPro-Full-8/ModuleInstall/ModuleInstaller.php(168): ModuleInstaller->setup_elastic_mapping()
# 14 /var/www/html/SugarPro-Full-8/modules/Administration/UpgradeWizard_commit.php(342): ModuleInstaller->install('cache/upgrades/...')
# 15 /var/www/html/SugarPro-Full-8/include/MVC/View/SugarView.php(489): require_once('/var/www/html/S...')
# 16 /var/www/html/SugarPro-Full-8/include/MVC/View/views/view.classic.php(43): SugarView->includeClassicFile('cache/upgrades/...')
# 17 /var/www/html/SugarPro-Full-8/include/MVC/View/SugarView.php(152): ViewClassic->display(Array)
# 18 /var/www/html/SugarPro-Full-8/include/MVC/Controller/SugarController.php(351): SugarView->process(Array)
# 19 /var/www/html/SugarPro-Full-8/include/MVC/Controller/SugarController.php(299): SugarController->processView()
# 20 /var/www/html/SugarPro-Full-8/include/MVC/SugarApplication.php(198): SugarController->execute()
# 21 /var/www/html/SugarPro-Full-8/index.php(27): SugarApplication->execute()
# 22 {main}
Thu Mar 28 17:54:19 2019 [1786][1][FATAL] ERROR: rmdir_recursive(): argument cache/upgrades/temp/ICB8l3 is not a file or a dir.
我已经尝试修复和重建了几次,也尝试再次发布软件包,以重新检查是否有任何我可能没有注意到的错误。我尝试使用另一个示例进行上载,以防我的当前示例可能损坏,但仍然观察到了相同的情况。我不知道可能是什么导致了这个问题。
1条答案
按热度按时间kg7wmglp1#
这表明Elasticsearch索引丢失(或损坏)。
如何修复:
此步骤很重要。如果您忘记选取此核取方块,重新建立索引将会失败(因为它会尝试重新填充现有的索引,而不是从头开始重新建立索引)。
备注:
config.php
中$sugar_config['unique_key']
的值。更改此值并重建缓存将导致Sugar查找新的索引名称。您必须如上所述触发重新索引(除非您在Elasticsearch中重命名索引,以便再次找到它)。bin/sugarcrm search:silent_reindex --clearData
(速度慢,仅在单个cpu内核上运行)或bin/sugarcrm search:silent_reindex_mp --clearData
(速度快,可使用多个cpu内核)文件
bin/sugarcrm
必须对此具有可执行权限。(The第一和单线程方式也可以通过改为前缀
php
来工作)如果您的Sugar版本非常过时,则最后一个(或两个)命令可能不可用。