3

I am using Tomcat6.0.29. When I try to close Tomcat using shutdown.bat, it is not shutting down tomcat and also I don't see any update in log file for what happened. If I try to use "catalina stop" at the command prompt, I get the following error.

__Error: transport error 02: bind failed: address already in use
error: JDWP Transport dt_socket failed to initialize. Transport_Init<510>
JDWP exit error AGENT_ERROR_TRANSPORT_INT<197>: No transport initialized{../../..src/
sare/back/debugInit.c:690}
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT<197>__

Please let me know what should I do to fix this error. Thanks in advance

Zypher
  • 36,995
  • 5
  • 52
  • 95
RKodakandla
  • 131
  • 1
  • 4

2 Answers2

3

This problem appears to be because port-specific options (typically for debugging purposes) should be specified in CATALINA_OPTS instead of JAVA_OPTS. On shutdown, any port options in JAVA_OPTS will apply to the shutdown JVM, hence the "address already in use" error and shutdown failing. Please see https://stackoverflow.com/a/8216921/571357 - Jaan has provided a more complete answer.

plasmid87
  • 1,888
  • 15
  • 17
1

Tomcat uses a different port for connections and for the command to shutdown.
By default the port is 8005. E.g. from server.xml

<Server port="8005" shutdown="SHUTDOWN">

The error you get indicates a conflict in ports.
Is it being used by another process? Are you doing remote debugging?
Change the ports to resolve conflict

user76678
  • 349
  • 3
  • 5
  • 16