{"action":"created","issue":{"url":"https://api.github.com/repos/toptal/chewy/issues/472","repository_url":"https://api.github.com/repos/toptal/chewy","labels_url":"https://api.github.com/repos/toptal/chewy/issues/472/labels{/name}","comments_url":"https://api.github.com/repos/toptal/chewy/issues/472/comments","events_url":"https://api.github.com/repos/toptal/chewy/issues/472/events","html_url":"https://github.com/toptal/chewy/issues/472","id":204935746,"number":472,"title":"The chewy:reset task is unable to join Elasticsearch server from a Docker container","user":{"login":"hdl-paris","id":22434501,"avatar_url":"https://avatars.githubusercontent.com/u/22434501?v=3","gravatar_id":"","url":"https://api.github.com/users/hdl-paris","html_url":"https://github.com/hdl-paris","followers_url":"https://api.github.com/users/hdl-paris/followers","following_url":"https://api.github.com/users/hdl-paris/following{/other_user}","gists_url":"https://api.github.com/users/hdl-paris/gists{/gist_id}","starred_url":"https://api.github.com/users/hdl-paris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdl-paris/subscriptions","organizations_url":"https://api.github.com/users/hdl-paris/orgs","repos_url":"https://api.github.com/users/hdl-paris/repos","events_url":"https://api.github.com/users/hdl-paris/events{/privacy}","received_events_url":"https://api.github.com/users/hdl-paris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-02T17:05:48Z","updated_at":"2017-02-03T09:02:59Z","closed_at":null,"body":"I get this error when I execute this task in Rails container:\r\n\r\n> Faraday::ConnectionFailed: Couldn't connect to server\r\n\r\nHere is my log:\r\n\r\n> [Faraday::ConnectionFailed] Couldn't connect to server {:host=>\"localhost\", :port=>9200, :protocol=>\"http\"}\r\n\r\nand my config/initializer/chewy.rb:\r\n`\r\nChewy.transport_logger = Rails.logger\r\nChewy.settings = {host: \"elasticsearch:9200\" }\r\n`\r\nI don't understand why the host is always displayed as 'localhost' in my logs. 'elasticsearch' seems not to be taken account by the rails task.\r\n\r\nWhen I go to console, it  works fine:\r\nChewy.configuration render:\r\n'{:host=>\"elasticsearch:9200\", :logger=>#<ActiveSupport::Logger:0x0000000a24aab8 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x0000000a24a9f0 @datetime_format=nil>, @formatter=#<ActiveSupport::Logger::SimpleFormatter:0x0000000b7737a0 @datetime_format=nil, @thread_key=\"activesupport_tagged_logging_tags:96181200\">, @logdev=#<Logger::LogDevice:0x0000000a24a9a0 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<File:/var/www/airkemist_ror/web_container/log/development.log>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x0000000a24a900>>, @local_levels=#<Concurrent::Map:0x0000000a24a810 entries=0 default_proc=nil>>}'\r\n\r\nWe can see the host is correct above. And when I do some queries, I get the results form Elasticsearch.\r\n\r\nThen, why the rails command doesn't work in the right way for me ?\r\nWhy rails chewy:reset is unable to join the server ?"},"comment":{"url":"https://api.github.com/repos/toptal/chewy/issues/comments/277197632","html_url":"https://github.com/toptal/chewy/issues/472#issuecomment-277197632","issue_url":"https://api.github.com/repos/toptal/chewy/issues/472","id":277197632,"user":{"login":"pyromaniac","id":88852,"avatar_url":"https://avatars.githubusercontent.com/u/88852?v=3","gravatar_id":"","url":"https://api.github.com/users/pyromaniac","html_url":"https://github.com/pyromaniac","followers_url":"https://api.github.com/users/pyromaniac/followers","following_url":"https://api.github.com/users/pyromaniac/following{/other_user}","gists_url":"https://api.github.com/users/pyromaniac/gists{/gist_id}","starred_url":"https://api.github.com/users/pyromaniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyromaniac/subscriptions","organizations_url":"https://api.github.com/users/pyromaniac/orgs","repos_url":"https://api.github.com/users/pyromaniac/repos","events_url":"https://api.github.com/users/pyromaniac/events{/privacy}","received_events_url":"https://api.github.com/users/pyromaniac/received_events","type":"User","site_admin":false},"created_at":"2017-02-03T09:02:59Z","updated_at":"2017-02-03T09:02:59Z","body":"So strange, you probably have to debug it or so. Have no any idea from the top of my head, sorry."}}
{"actor":{"display_login":"pyromaniac"}}