Coder Social home page Coder Social logo

Connect to localhost about elasticsearch-head HOT 6 CLOSED

mobz avatar mobz commented on September 23, 2024
Connect to localhost

from elasticsearch-head.

Comments (6)

mobz avatar mobz commented on September 23, 2024

The default connection that elasticsearch-head attempts is to http://localhost:9200/ if you are running es on your own machine - this should work. If not check your es ports, check firewalls and other network security software. Maybe something is already running on that port? localhost traffic does not travel on the network - so firewalls shouldn't be a problem

This already works for most people

from elasticsearch-head.

furlongm avatar furlongm commented on September 23, 2024

I'm not running it on my local machine, but I would it to connect to localhost on the machine it is running on, so e.g. I don't need to leave port 9200 open to the world unnecessarily.

from elasticsearch-head.

mobz avatar mobz commented on September 23, 2024

so elasticsearch and elasticsearch-head use plain old HTTP (over port 9200) to talk. elasticsearch-head is just a web page, so don't expect it to do any fancy networking for you! You need to investigate network security - have a look at things like tunnelling over ssh or reverse proxies. These topics are beyond the scope of an elasticsearch-head issue though.

from elasticsearch-head.

furlongm avatar furlongm commented on September 23, 2024

I don't expect it to do networking for me. It's a question of where "localhost" resolves to. If it's just the browser resolving it, it will be my local machine.

For what I'm trying to achieve, think of how e.g. phpmyadmin on a remote server can connect to a mysql server instance on running on the same machine via localhost:3306. The remote machine only needs to run a web server on port 80, and the web server then connects to the mysql server on localhost:3306. To connect to that mysql instance via phpmyadmin, mysql does not need to be open to the world.

from elasticsearch-head.

mobz avatar mobz commented on September 23, 2024

Please understand the fundamental difference between phpmyadmin (which is server software - written in php and running on a server) compared to elasticsearch-head which is a HTML app running in a browser. They simply don't have the same networking / security capabilities. To achieve what you are asking I would need to write a php wrapper for es-head which duplicates the functionality of a reverse proxy. It's simpler for people to set up the network securely the way they want - perhaps involving off the shelf reverse proxy software. Also you need to understand what localhost means in a networking context. Your usage of it is very confusing.

from elasticsearch-head.

gugod avatar gugod commented on September 23, 2024

@furlongm What I do is to setup ssh tunnel to forward port 9200 to localhost:

ssh -L9200:localhost:9200 my.search.server

And everything in es head basically works as if ES is running on localhost.

from elasticsearch-head.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.