I get this error while reindex the data. Also while making a search request.
using elasticsearch v1.4.2 and latest stable searchkick version. Removing typhoeus worked, but typhoeus is being used in other part of the project. So, any suggestion or alternative to faraday adapter. Not having require adapter/faraday raises "Ethon::Errors::InvalidOption: The option: disable_ssl_peer_verification is invalid." ... To fix this, need faraday and faraday doesnt work with typhoeus.
What versions of faraday and typhoeus are you on?
Using faraday 0.9.0 and latest typhoeus-0.7.0.pre1
+1
I created a branch for this, and all tests pass with those versions - https://github.com/ankane/searchkick/tree/typhoeus
Not sure what the problem would be.
Also getting this, any developments?
+1
was working fine for a long time, but I have this problem since few hours ago even though I didn't touch any of code.
Rails 4.2.0 + Typhoeus 0.7.0 (also tried with 0.7.0.pre1)
@chrise86 / @sydneyitguy .. have you tried with the new branch that @ankane has created recently? or it just doesnt work? I 'll give it a try soon!
have no idea, but it's just working now.. only thing I did was "curl --help" on command line. lol
seems like it's just a slow loading issue with ElasticSearch daemon.
after I upgraded ES to 1.4.2, it loads much slower than before, and having this issue for about 10 seconds after launch (sometimes, it takes much longer like few minutes)
Hi guys.
I have two OSX hosts with same configuration and getting this error only on one of them.
Trying to reinstall all gems, upgrading all brew packages, have no idea why it happens.
I ran into the same situation randomly! but fixed it via manually assigning elasticsearch host to 127.0.0.1 rather than default localhost in config/initializers/elasticsearch.rb as below:
Searchkick.client = Elasticsearch::Client.new(hosts: ["127.0.0.1:9200", "127.0.0.1:9201"], retry_on_failure: true)
Rails version: 4.1.10
searchkick version: 0.8.7
ES version: 1.5.0
guess it's some kind of localhost loopback issue, hope this helps!
I've used tcpdump and saw Faraday trying to connect to IPv6 address, then found in hosts that address bound to localhost and removed. Not sure why, this wasn't a problem for any other software.
So it was solved.
As it is working for many people with minor config change, i'm closing this issue. I hope @abookyun answer would help.
Thanks all!
thanks all, glad it helps :+1:
Cleaning up issues
Just in case anyone still having problem with typhoeus or faraday,
Adding below code to config/initializer/elasticsearch.rb
require "faraday"
require "typhoeus/adapters/faraday"
Searchkick.client = Elasticsearch::Client.new(hosts: ["127.0.0.1:9200", "127.0.0.1:9201"], retry_on_failure: true)
fixed this issue for me. Answer taken from #393
@ankane @kapildewade - With that fix, I now get "Faraday::ConnectionFailed: Couldn't connect to server" on Heroku.
@nest4less-dev On Heroku, you'll need to point to your Elasticsearch provider, not 127.0.0.1, which points to your local machine.