localhost:4040: what runs on it and how to open it
Port 4040 is used by the ngrok inspector and the Apache Spark web UI. How to open it and fix errors.
Open this address: http://localhost:4040This opens on your own computer. It only works if the program is running.
localhost:4040 shows the ngrok request inspector while an ngrok tunnel is running, and the Apache Spark web page while a Spark application is running. If nothing is running, the page will not open.
What runs on localhost:4040
- ngrok web interface, shown while a tunnel is running
- Apache Spark application web UI, shown while an application runs
Commands to start and test port 4040
ngrok http 3000http://127.0.0.1:4040Find what is using port 4040
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:4040 will not open
- This site can’t be reached (ERR_CONNECTION_REFUSED)
- The server is not running. Start it and keep that terminal open. See the full checklist.
- Spark: the page is on port 4041
- When 4040 is busy, Spark uses the next ports. Check the terminal output for the right address.
- Port 4040 is already in use
- Another program is on port 4040. Find it with the tool below and stop it, or start yours on another port.
Other ports like 4040
| Port | Usually used by |
|---|---|
| localhost:11434 | Ollama (AI models) |
| localhost:5601 | Kibana |
| localhost:11501 | Not a standard port: check what is using it |
| localhost:9200 | Elasticsearch |
| localhost:5672 | RabbitMQ |
| localhost:15672 | RabbitMQ admin page |
| localhost:9090 | Prometheus |
Questions about localhost:4040
- What runs on localhost:4040?
- The ngrok inspector while ngrok runs, or the Spark UI while a Spark application runs.
- Is localhost:4040 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 4040?
- Yes. Most programs let you choose the port with a setting or a command option. Pick a free port above 1024 and open that number instead, for example localhost:4041.
- How do I check what is using port 4040?
- 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.