Connect two laptops, one with elasticsearch on it using a WiFI network


(Mirescu C-tin Radu) #1

Hi!

I have a laptop with ElasticSearch on it registered in a WiFI network.
I want to open the laptop to my colleague in order to allow him to use the same instance.
The firewall on my machine is not activated.

I tried also all the IPv4 ips returned by "ifconfig | grep inet" but all failed with "Connection refused".

I managed to obtain my ip in the wifi network but looks something like "78:4f:43:83:cd:b6", but fails also.

Elasticsearch([{'host': '78:4f:43:83:cd:b6', 'port': 9200}])

failed with

elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x10ed69828>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x10ed69828>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known)

Please help.

Kind regards,

Radu


(Mirescu C-tin Radu) #2

I forgot to mention that both laptops have MacOS on them.

Also i tried to use the python port to elastic search, namely:

from elasticsearch import Elasticsearch


(Abdon Pijpelink) #3

Did you bind Elasticsearch to a network interface that's available from the outside? By default, Elasticsearch will bind to localhost only, meaning you cannot access it from any other machine than the machine it is running on.

Try configuring network.host by setting it to 0.0.0.0. You can do this in the elasticsearch.yml configuration file, or on the command line when you start Elasticsearch:

./bin/elasticsearch -E network.host=0.0.0.0

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.