Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I unable to kill my JBoss process?

I’m using JBoss wildfly 10.0.0.CR2 on Mac Yosemite. I was looking for a foolproof way to kill JBoss so and was suggested this command

pgrep -d" " -f "wildfly" | xargs kill;

So I run this command and then I go into my $JBOSS_HOME/bin directory and run “sh standalone.sh” and get this disappointing output …

Daves-MacBook-Pro-2:bin davea$ sh standalone.sh 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/wildfly-10.0.0.CR2

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

=========================================================================

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 [debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
standalone.sh: line 302:  3096 Abort trap: 6           "java" -D"[Standalone]" -server -Xms64m -Xmx512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n "-Dorg.jboss.boot.log.file=/opt/wildfly-10.0.0.CR2/standalone/log/server.log" "-Dlogging.configuration=file:/opt/wildfly-10.0.0.CR2/standalone/configuration/logging.properties" -jar "/opt/wildfly-10.0.0.CR2/jboss-modules.jar" -mp "/opt/wildfly-10.0.0.CR2/modules" org.jboss.as.standalone -Djboss.home.dir="/opt/wildfly-10.0.0.CR2" -Djboss.server.base.dir="/opt/wildfly-10.0.0.CR2/standalone"

Does anyone know a foolproof way to kill JBoss once and for all?

like image 421
Dave Avatar asked Dec 08 '15 20:12

Dave


2 Answers

Can't remember who provided this answer but here is how to kill the WIldfly process

pgrep -d" " -f "wildfly" | xargs kill -9;
like image 64
Dave Avatar answered Nov 23 '22 22:11

Dave


As you don't provide a signal number it defaults to TERM signal.

You can use the following command to kill the process definitely:

kill -9 [PID]

See this man page

And also this question: Find (and kill) process locking port 3000 on Mac

like image 44
Rémi Bantos Avatar answered Nov 24 '22 00:11

Rémi Bantos