我正在尝试使用盆景添加在Heorku上运行Elasticsearch,但我一直收到以下错误:
Faraday::ConnectionFailed (Connection refused - connect(2)):
然后这有时也是
Completed 500 Internal Server Error in 131ms (Searchkick: 5.7ms | ActiveRecord: 11.1ms)
Faraday::ConnectionFailed (Connection refused - connect(2)):
我听说这是因为找不到盆景网址,但我相信我是用/config/initializer/bonsai.rb启动的
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL']
有什么想法吗?基本上整个应用程序已停止工作。它本地运行良好,这只是生产。
我也安装了gem 'bonsai-elasticsearch-rails', '~> 0.0.4'
但仍无法正常工作。
我也去了并重建了索引,根据这个并且仍然是同样的错误
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XPOST [MYURL]/pallet-index
{"acknowledged":true}
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XPOST [MYURL]/hello -d '{"title":"Hello world"}'
{"_index":"pallet-index","_type":"test","_id":"hello","_version":1,"created":true}
rs191919:~/workspace/sample_app (bonsai-more-more) $ curl -XGET '[MYURL]/pallet-index/te
{"_index":"pallet-index","_type":"test","_id":"hello","_version":1,"found":true,"_source":{"title":"Hello world"}}