localhost:5005: Debugging Java and Running Rasa

Port 5005 is where Java developers usually expose the remote debugger, through the JDWP agent, and where an IntelliJ or VS Code debugger attaches. It is not a web page, so a browser shows nothing useful. Rasa's conversational server also defaults to 5005 and does answer HTTP requests.

Who uses 5005
ProgramHow 5005 appearsTalks HTTP?
JVM with JDWP agent-agentlib:jdwp=...address=*:5005No, debugger protocol
Maven Surefire debugmvn -Dmaven.surefire.debug testNo, waits on 5005
Rasa serverrasa runYes, REST API

Updated

If a log line says 'Listening for transport dt_socket at address: 5005', the JVM is waiting for a debugger, not a browser. Your job is to attach IntelliJ, Eclipse or VS Code to that port, and if suspend=y is set, the app will not start until you do.

Start a JVM ready for debugging

Agent option and Spring Boot

suspend=n starts the app at once; switch to y to debug startup.

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar app.jar

./mvnw spring-boot:run \
  -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"

Security of the debug port

A JDWP port has no authentication. Anyone reaching it can evaluate expressions and run commands as your app's user, which is why the default on new JDKs is loopback only and why production images should never include the agent.

Debugging a JVM is far from what a small shop owner needs; We.Inc exists for those who just want their site online.

How it works

  1. Start the JVM with the JDWP agent option on port 5005.
  2. Create a Remote JVM Debug configuration in your IDE pointing at localhost:5005.
  3. Start the debug session and set breakpoints.
  4. Use suspend=y only when you need to debug startup code.

Tips

  • Since Java 9 the agent binds to localhost only unless you write address=*:5005, which matters inside Docker.
  • Never expose 5005 on a public server: anyone who connects can run code in your JVM.
  • Spring Boot's Maven plugin accepts the agent through -Dspring-boot.run.jvmArguments.
  • Two JVMs cannot share 5005, so give each service its own debug port in multi-service setups.

Frequently asked questions

What is port 5005 used for?

Mainly Java remote debugging over JDWP, which IntelliJ IDEA uses as its default remote port. Rasa also serves its API on 5005.

Why is my app stuck at 'Listening for transport dt_socket at address: 5005'?

The JVM was started with suspend=y and waits for a debugger before running main. Attach your IDE, or change it to suspend=n.

How do I debug a Java app in Docker on 5005?

Use address=*:5005 in the agent option and publish the port with -p 5005:5005, then attach the IDE to localhost:5005.

Why does localhost:5005 show nothing in my browser?

The debug port speaks JDWP, not HTTP. Only a debugger can use it. If you run Rasa, try localhost:5005/ which returns a short hello message.

Related: localhost:8080, localhost:8081, localhost refused to connect, What is localhost.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap