localhost:9200: Elasticsearch connection and security fixes
Port 9200 is the Elasticsearch HTTP API. Check it with curl and fix HTTPS, password, memory and connection errors.
Open this address: http://localhost:9200This opens on your own computer. It only works if the program is running.
localhost:9200 is where Elasticsearch answers. A JSON reply with the cluster name and version means it works. Newer versions need https and a password.
What runs on localhost:9200
- Elasticsearch HTTP API (default port 9200)
- Docker containers started with
-p 9200:9200 - Used by Kibana on port 5601
Commands to start and test port 9200
curl -k -u elastic https://localhost:9200curl http://localhost:9200docker run -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.15.0sudo sysctl -w vm.max_map_count=262144Find what is using port 9200
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:9200 will not open
- curl: (52) Empty reply or SSL error
- Version 8 turns on security. Use https and the elastic user, and add -k for the self-signed certificate while testing.
- max virtual memory areas vm.max_map_count is too low
- Raise it with the sysctl command above, then start Elasticsearch again.
- Connection refused
- Elasticsearch is not running or still starting. It can take a minute.
- master_not_discovered_exception
- A multi-node setup cannot find its master. For a single test node, set discovery.type to single-node.
Other ports like 9200
| Port | Usually used by |
|---|---|
| localhost:11434 | Ollama (AI models) |
| localhost:5601 | Kibana |
| localhost:11501 | Not a standard port: check what is using it |
| localhost:5672 | RabbitMQ |
| localhost:15672 | RabbitMQ admin page |
| localhost:9090 | Prometheus |
| localhost:9229 | Node.js debugger |
Questions about localhost:9200
- What is port 9200?
- The HTTP API of Elasticsearch.
- What is the Elasticsearch password?
- In version 8 and later, a password for the elastic user is created the first time it starts and shown in the terminal. You can reset it with the elasticsearch-reset-password tool.
- Is localhost:9200 safe?
- Yes while it stays on localhost. Tools like this often show sensitive data, so keep them off the public internet and put a login in front of them if other people can reach the port.
- Can I use a different port instead of 9200?
- Yes. Pick a free port above 1024, set it in the program, and open that number instead. If other programs connect to this port, change it there as well.
- How do I check what is using port 9200?
- Use the port checker on this page. It shows the command for Windows, macOS and Linux and does not send anything to this site.
Free tools that help
- Common ports listSearch a list of common TCP and UDP port numbers: SSH 22, HTTP 80, HTTPS 443, MySQL 3306, PostgreSQL 5432 and more, with dev server ports.