Ruby on rails 从模型导入数据后,Elasticsearch停止 我将我的应用程序部署到vps 启动Elasticsearch,并使用ps aux | grep Elasticsearch检查它 cd-app/currect和&RAILS\u ENV=production bin/RAILS c
Ruby on rails 从模型导入数据后,Elasticsearch停止 我将我的应用程序部署到vps 启动Elasticsearch,并使用ps aux | grep Elasticsearch检查它 cd-app/currect和&RAILS\u ENV=production bin/RAILS c,ruby-on-rails,ruby,
elasticsearch,Ruby On Rails,Ruby,
elasticsearch,User.import 输出: Scoped order and limit are ignored, it's forced to be batch order and batch size User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 10 Faraday::ConnectionFailed: connection refused: localhost:9200
User.import
输出:
Scoped order and limit are ignored, it's forced to be batch order and batch size
User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 10
Faraday::ConnectionFailed: connection refused: localhost:9200
https://github.com/rusikf/pmi_parser/blob/master/Gemfile.lock
-项目中的gemfile.lock
http://pastebin.com/J6Wi8qBF
-elasticsearch配置
http://pastebin.com/3BKmZG4G
-弹性搜索日志
在User.import之前
ps aux| grep elasticsearch
显示弹性搜索过程
在User.import之后
ps aux| grep elasticsearch
不显示进程
如何检查elasticsearch是否使用9200端口?通过将ip更改为vps ip地址来解决此问题:9200+正在运行
Model\u name.\uuuu elasticsearch\uu.创建\u索引!force:true
在rails控制台中您使用的是elasticsearch模型
gem吗?请添加到问题中:gemfile的相关部分,版本(rails、sqlite、elasticsearch-*)、ruby版本、如何定义elasticsearch索引和映射。这可能是一个简单的连接问题。elasticsearch在哪个端口上运行?看起来您无法连接到elasticsearch-确保它正在运行,确保它绑定到localhost,确保它绑定到端口9200,并确保没有阻止您连接的网络事物。您的ES日志怎么说?各位黑客好,感谢回复,我为上面的问题添加了附加注释