Faraday unable to connect to opensearch
antarr opened this issue · 0 comments
antarr commented
Describe the bug
I'm trying to use OpenSearch on a self-hosted machine, for a Ruby on Rails application using searchkick. I can connect to the machine using the default credentials(will update), using curl and Postman. But when running rake searchkick:reindex:all
, I get a connection error.
Error
[DEPRECATION] Rack::Attack.blocklisted_response is deprecated. Please use Rack::Attack.blocklisted_responder instead.
[DEPRECATION] Rack::Attack.throttled_response is deprecated. Please use Rack::Attack.throttled_responder instead
Reindexing Bill...
rake aborted!
Faraday::ConnectionFailed: Failed to open TCP connection to admin:0 (getaddrinfo: nodename nor servname provided, or not known)
Caused by:
SocketError: Failed to open TCP connection to admin:0 (getaddrinfo: nodename nor servname provided, or not known)
Caused by:
SocketError: getaddrinfo: nodename nor servname provided, or not known
Tasks: TOP => searchkick:reindex:all
(See full trace by running task with --trace)
.env
OPENSEARCH_URL='admin:admin@remoteserver.com:9200'
Gemfile.lock
railties (>= 5.0.0)
faker (3.1.1)
i18n (>= 1.8.11, < 2)
faraday (2.7.5)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
opensearch-api (2.2.0)
multi_json
opensearch-ruby (2.1.0)
opensearch-api (~> 2.1)
sprockets (> 3.0)
sprockets-rails
tilt
searchkick (5.2.4)
activemodel (>= 5.2)
hashie
seed_dump (3.3.1)