getaddrinfo: Error: getaddrinfo: Servname not supported for ai_socktype
As Per Request, posting it here:
Hi,
UPDATE:
Found the similar issue here:
http://support.flying-sphinx.com/discussions/problems/301-flying-sp...
The conversation doesnt end conclusively.
Very rarely, but i see this issue when trying to update an attribute of a model that has indexes defined on it. This crashes causing the object to NOT be saved.
here's the last few lines of the trace:
Please ignore the timestamps and the process. This is on heroku and
my process is called clock.1.
154 1 2014-05-19T10:05:07.043719+00:00 app clock.1 - - Error:
getaddrinfo: Servname not supported for ai_socktype
184 1 2014-05-19T10:05:07.043721+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:575:in
initialize' 177 1 2014-05-19T10:05:07.043722+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:575:innew'
191 1 2014-05-19T10:05:07.043724+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:575:in
initialise_socket' 199 1 2014-05-19T10:05:07.043726+00:00 app
clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/0.9.9/client.rb:8:ininitialise_connection'
185 1 2014-05-19T10:05:07.043728+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:501:in
open_socket' 181 1 2014-05-19T10:05:07.043729+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:538:inconnect'
181 1 2014-05-19T10:05:07.043740+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:625:in
request' 180 1 2014-05-19T10:05:07.043742+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/riddle-1.5.3/lib/riddle/client.rb:423:inupdate'
229 1 2014-05-19T10:05:07.043743+00:00 app clock.1 - -
/app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:44:in
update_index' 249 1 2014-05-19T10:05:07.043745+00:00 app clock.1 -
-
/app/vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:23:inblock
in update_attribute_values'
i'm using:
ruby 1.9.2p320 (2012-04-20 revision 35421)
Rails 3.2.3
flying-sphinx (0.8.4)
thinking-sphinx (2.0.11)
regards,
Hassan
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Pat Allan on 20 May, 2014 04:50 AM
Thanks Hassan - also, one more bit of useful information: what's the name of your app on Heroku?
2 Posted by Hassan Abdul Re... on 20 May, 2014 05:09 AM
my heroku app is called 'hedgepo'. In the config:
FLYING_SPHINX_HOST: 75.101.192.160
FLYING_SPHINX_PORT: 9351
We'll move this conversation to private if you want api-key and identifier.
Let me know what else you need.
Support Staff 3 Posted by Pat Allan on 20 May, 2014 10:57 AM
Your app name is enough for me to get the rest of the details... but the host is what I was particularly curious about (some hosts in the system are IPs, some are ec2-ip-address.amazon.com domains). It turns out that with v3 of the API, you're receiving the latter, even though the environment variable (which is a fallback should the Flying Sphinx API be down) is an IP address.
I've just changed your specific server to use the IP address consistently. When you have a chance, restart your app, and see how things behave from that point on. Googling the specific error message doesn't confirm that it's DNS related, but I think we'll start there (partially because I'm not currently sure what other steps are possible).
For the record, v4 of the API is used by the flying-sphinx gem since v1.0.0, and is more reliable across the board (it uses websockets instead of polling). I'm currently working on v5, which will be even better :)