tag:support.flying-sphinx.com,2011-01-05:/discussions/problems/1348-getaddrinfo-error-getaddrinfo-servname-not-supported-for-ai_socktypeFlying Sphinx: Discussion 2016-08-11T01:32:16Ztag:support.flying-sphinx.com,2011-01-05:Comment/330448742014-05-20T03:59:41Z2014-05-20T03:59:42Zgetaddrinfo: Error: getaddrinfo: Servname not supported for ai_socktype<div><p>As Per Request, posting it here:</p>
<p>Hi,</p>
<p>UPDATE:<br>
Found the similar issue here:<br>
<a href=
"http://support.flying-sphinx.com/discussions/problems/301-flying-sphinx-is-failing-to-index-and-start">
http://support.flying-sphinx.com/discussions/problems/301-flying-sp...</a><br>
The conversation doesnt end conclusively.</p>
<p>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.</p>
<p>here's the last few lines of the trace:<br>
Please ignore the timestamps and the process. This is on heroku and
my process is called clock.1.</p>
<p>154 1 2014-05-19T10:05:07.043719+00:00 app clock.1 - - Error:
getaddrinfo: Servname not supported for ai_socktype<br>
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'<br>
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'<br>
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'<br>
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'<br>
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'</p>
<p>i'm using:<br>
ruby 1.9.2p320 (2012-04-20 revision 35421)<br>
Rails 3.2.3<br>
flying-sphinx (0.8.4)<br>
thinking-sphinx (2.0.11)</p>
<p>regards,<br>
Hassan</p></div>Hassan Abdul Rehmantag:support.flying-sphinx.com,2011-01-05:Comment/330448742014-05-20T04:50:35Z2014-05-20T04:50:35Zgetaddrinfo: Error: getaddrinfo: Servname not supported for ai_socktype<div><p>Thanks Hassan - also, one more bit of useful information: what's
the name of your app on Heroku?</p></div>Pat Allantag:support.flying-sphinx.com,2011-01-05:Comment/330448742014-05-20T05:09:27Z2014-05-20T05:09:27Zgetaddrinfo: Error: getaddrinfo: Servname not supported for ai_socktype<div><p>my heroku app is called 'hedgepo'. In the config:</p>
<p>FLYING_SPHINX_HOST: 75.101.192.160<br>
FLYING_SPHINX_PORT: 9351</p>
<p>We'll move this conversation to private if you want api-key and
identifier.</p>
<p>Let me know what else you need.</p></div>Hassan Abdul Rehmantag:support.flying-sphinx.com,2011-01-05:Comment/330448742014-05-20T10:57:24Z2014-05-20T10:57:24Zgetaddrinfo: Error: getaddrinfo: Servname not supported for ai_socktype<div><p>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.</p>
<p>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).</p>
<p>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 :)</p></div>Pat Allan