Skip to content
Browse files

Finishing touches

  • Loading branch information...
1 parent 3569452 commit de872568c728824ab41f135b686f60258732110e @sartak committed Jun 22, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 writing/roaming-elasticsearch.pl
View
10 writing/roaming-elasticsearch.pl
@@ -6,21 +6,19 @@
p { "By default, [ElasticSearch binds to the first **nonloopback** interface](https://github.com/elasticsearch/elasticsearch/issues/185). This is ordinarily what you want for a search server -- you want to let other computers shove data into and rip data out of ElasticSearch. But if you're developing against a local ElasticSearch running on your laptop, that default works against you. The problem is that laptops are roaming mobile devices that connect to multiple different networks. Just in the past day I've connected to two home networks as well as my cellular hotspot. Each time I switched networks I basically broke ElasticSearch. The symptom is:" };
-pre {
- outs_raw << 'HEH';
+code_snippet 'text' => << 'SYMPTOM';
# [Fri Jun 22 14:52:49 2012] Protocol: http, Server: 192.168.1.105:9200
curl -XPOST 'http://127.0.0.1:9200/_bulk?pretty=1' -d ' ... data ... '
Error connecting to '192.168.1.105:9200' : Can't connect to 192.168.1.105:9200 (Operation timed out) (500)
-HEH
-};
+SYMPTOM
-p { "The way I've been dealing with this is violently restarting ElasticSearch so it binds to a sensible interface again. But that's a pain in the ass in a few ways." };
+p { "The way I've been dealing with this is violently restarting ElasticSearch so it binds to a sensible interface again. But that's a pain in the ass in a few ways and totally snags whatever flow I'm in." };
p { "The way you *actually* fix this, I discovered, is by explicitly telling ElasticSearch that you want a loopback interface because you're not an ordinary production server. Edit your ElasticSearch config to include this line:" };
code_snippet yaml => << 'YAML';
- network.host: 127.0.0.1
+network.host: 127.0.0.1
YAML
p { "If you've installed ElasticSearch from homebrew, use `brew info elasticsearch` to find your config file." };

0 comments on commit de87256

Please sign in to comment.
Something went wrong with that request. Please try again.