简体   繁体   English

Elasticsearch SocketError(getaddrinfo:名称或服务未知)

[英]Elasticsearch SocketError (getaddrinfo: Name or service not known)

I'm using the Tire gem in Ruby on Rails to use Elasticsearch for searching. 我正在Ruby on Rails中使用Tire宝石来使用Elasticsearch进行搜索。 On my local machine it works great. 在我的本地计算机上,它运行良好。

On my staging server I (randomly?) get this error: SocketError (getaddrinfo: Name or service not known) 在我的登台服务器上(随机?),出现以下错误: SocketError (getaddrinfo: Name or service not known)

Sometimes it works great and is very fast, and sometimes it just throws that error. 有时它运行良好且非常快,有时它会抛出该错误。

Elasticsearch is running on the same server and the url it uses is: http://localhost:9200 Elasticsearch在同一服务器上运行,其使用的URL为: http://localhost:9200

I have this in my hosts file: 我的主机文件中有这个:

127.0.0.1   staging-server.mydomain.com staging-server

Where subdomain and domain are set correctly. 正确设置子域和域的位置。

What could be the cause of the errors and why does it only happen sometimes? 错误的可能原因是什么,为什么它有时仅会发生?

I had to add 我必须添加

127.0.0.1       localhost

to my hosts file... 到我的主机文件...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails Heroku SocketError:getaddrinfo:名称或服务未知 - Rails Heroku SocketError: getaddrinfo: Name or service not known 「rescue500 => SocketError : getaddrinfo: Name or service not known」无法解析 - 「rescue500 => SocketError : getaddrinfo: Name or service not known」 cannot be resolved 在狂欢中面临问题 SocketError (getaddrinfo: Name or service not known) - Facing issue SocketError (getaddrinfo: Name or service not known) in spree 无法启动Rails服务器! “ getaddrinfo:名称或服务未知(SocketError)” - Can't start Rails server! “getaddrinfo: Name or service not known (SocketError)” aws-sdk gem:SocketError:getaddrinfo:名称或服务未知 - aws-sdk gem: SocketError: getaddrinfo: Name or service not known UsuariosController#forgot中的SocketError-getaddrinfo:名称或服务未知 - SocketError in UsuariosController#forgot - getaddrinfo: Name or service not known Rails服务器错误“初始化”:getaddrinfo:名称或服务未知(SocketError) - rails server error `initialize': getaddrinfo: Name or service not known (SocketError) SSL 证书 getaddrinfo:名称或服务未知(SocketError)Rails-4.2.0 - SSL Certificate getaddrinfo: Name or service not known (SocketError) Rails-4.2.0 Rails 3机械化-SocketError:getaddrinfo:主机或名称未知 - Rails 3 Mechanize - SocketError: getaddrinfo: Host or name not known 部署到EC2后,sidekiq现在报告SocketError:getaddrinfo:名称或服务未知 - After a deploy to EC2 sidekiq now reports SocketError: getaddrinfo: Name or service not known
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM