I am unable to start Tomcat in debug mode. I have searched and see that lots of people are having similar issues. I tried all the fixes that were proposed and none of them seem to work.
Here is what I have at the moment. I have a file /Library/Tomcat/bin/setenv with the following content # Trying to start Tomcat in debug mode... # # CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n" JPDA_ADDRESS=8000 JPDA_TRANSPORT=dtsocket JPDA_SUSPEND=n Note that I tried setting the JPDA environment both ways (using CATALINA_OPTS and JPDA_* vars) and the result is the same. To restart tomcat, I do the following command: echo "" > /Library/Tomcat/logs/catalina.out ; /Library/Tomcat/bin/shutdown.sh; sleep 2; /Library/Tomcat/bin/catalina.sh jpda start; echo "Restarted tomcat, catalina.out is:"; cat /Library/Tomcat/logs/catalina.out This produces the following output: Using CATALINA_BASE: /Library/Tomcat Using CATALINA_HOME: /Library/Tomcat Using CATALINA_TMPDIR: /Library/Tomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar Using CATALINA_BASE: /Library/Tomcat Using CATALINA_HOME: /Library/Tomcat Using CATALINA_TMPDIR: /Library/Tomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar Tomcat started. Restarted tomcat, catalina.out is: 16-Jul-2018 07:35:12.366 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance. 16-Jul-2018 07:35:12.366 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.426 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"] 16-Jul-2018 07:35:12.483 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] 16-Jul-2018 07:35:12.517 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.520 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"] 16-Jul-2018 07:35:12.523 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"] 16-Jul-2018 07:35:12.523 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"] When I go to http://localhost:8000, I get “This site can’t be reached”. Same if I go to http://localhost:8080/. But… if I restart tomcat using the same command as above, except without the ‘jpda’ argument to Catalina.sh, then 8080 is started fine, but not 8000 (which Is to be expected). I checked to see if port 8000 is already busy by issueing this command: sudo lsof -iTCP -sTCP:LISTEN -n -P | grep 8000 But is shows no process listening on that port. And I know that this command works because when I successfully start tomcat without ‘jpda’, if I use this command to check for port 8080, I get: java 1925 desilets 60u IPv6 0xad510ad8630ef821 0t0 TCP *:8080 (LISTEN) Not sure what to try next… have pretty much run out of options at this point. Any help will be greatly appreciated. Thx. Alain Désilets National Research Council of Canad