ERROR: transport error 202: bind failed when starting Tomcat 7 in debug mode

Viewed 105353

I have installed tomcat 7.0.68 on windows7-64bit machine.

If I run catalina.bat jpda start , it just opens and closes and no logs are generated.

If I run catalina.bat jpda run I get below error

Using CATALINA_BASE:   "C:\apache-tomcat-7.0.68"
Using CATALINA_HOME:   "C:\apache-tomcat-7.0.68"
Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.68\temp"
Using JRE_HOME:        "C:\Java\jre7"
Using CLASSPATH:       "C:\apache-tomcat-7.0.68\bin\bootstrap.jar;C:\apache- 
                         tomcat-7.0.68\bin\tomcat-juli.jar"
Picked up _JAVA_OPTIONS: -Xmx512M
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
       JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports  
        initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized,
                       jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
8 Answers

Try killing the processes with a single line command -

pkill -9 -f tomcat

This question seems to be duplicated. And, I think using CATALINA_OPTS is more simple and suitable.

Tomcat failed to shutdown

The answer above said below.

Looking into catalina.sh, one can see CATALINA_OPTS is only used by the "start" and "start-security" commands, whereas JAVA_OPTS is also used by the "stop" command (at least with Tomcat 6.0.33 on openSUSE 12.1).

Windows answer

1.Detect PID

netstat -ano

find port you need and corresponding PID

2.Kill process

taskkill /F /PID 1234

replace 1234 with your PID

I also got the same issue while the hybris server start.

When I started the hybris (which runs on the tomcat server) in debug mode using "hybrisserver.bat debug", a similar error I got.

So run the server without debug mode (i.e "hybrisserver.bat").

Hope this is helpful for hybris developers!

In my case i have several tomcat running,In two tomcat I have given same jpda address,so one of tomcat was not able to start because address was already in use.

Kill existing process (kill -8 {PID}) and re-start. The above mentioned error should eliminate

Related