ps aux | grep elasticsearch
cd app/currect
&& RAILS_ENV=production bin/rails c
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
Elasticsearch已停止,导入无效,为什么?
我使用的是Ubuntu 14,Puma服务器,SQLite数据库。这有关系吗?
附加说明:
https://github.com/rusikf/pmi_parser/blob/master/Gemfile.lock
- 来自项目的gemfile.lock
http://pastebin.com/J6Wi8qBF
- elasticsearch config
http://pastebin.com/3BKmZG4G
- elasticsearch log
在User.import之前
ps aux | grep elasticsearch
显示弹性搜索过程
在User.import之后
ps aux | grep elasticsearch
没有显示过程
如何检查elasticsearch是否使用9200端口?
答案 0 :(得分:1)
通过将ip更改为vps ip地址来解决问题:9200 +在rails控制台中运行Model_name.__elasticsearch__.create_index! force: true