User Tools

Site Tools


faq:linux:cannot_stop_the_jboss_service

I Cannot stop the JBoss service

Under normal circumstances you can stop the JBoss server under Linux in one of the following two ways:

% /etc/init.d/jboss stop (old fashion)
% service jboss stop (modern service interface, some Linuxes don't have it)

However, after updating GECAMed with the Linux installer (which is the same as the updater) the problem might occur that the JBoss service cannot be stopped any more in the normal way. In such casses an error is displayed saying that you are not authenticated for this action. The cause for this behavior is that the updater has inadvertedly changed the admin password on the server side, thereby making it different from the password given in the stop script.

To solve the problem, we suggest to restore the password at the server-side to what it was before the update. Do the following:

  1. Open the JBoss service script, /etc/init.d/jboss, with a text editor of your choice.
  2. Search a line like this:
    CMD_STOP="java -classpath $JBOSSCP org.jboss.Shutdown -u admin -p THEPASSWORD -S"

    What stands after the -p parameter is the password used for the JBoss admin user. Copy it.

  3. Open the file /usr/local/jboss/server/default/conf/props/jmx-console-users.properties with an editor.
  4. The file should contain something like this:
    # A sample users.properties file for use with the UsersRolesLoginModule
    admin=THEPASSWORD

    The password written here must be exactly the same as one in the JBoss service script (no additional quotes or anything).

  5. Replace the password in the jmx-console-users.properties file with the password from the JBoss service file.
  6. Stop the JBoss service

If the password was the same in both files or if after changing the password the JBoss still doesn't want to stop, you need to shut down the JBoss service by hand at the Linux process level.
To do so, you need to identify the JBoss process first. You can do this with the ps command. % ps aux | grep java This will show you all running java processes (plus the grep command). Identify the JBoss service and its process ID and use the kill command:

% kill PROCESS_ID

This will shut down the JBoss properly.

Be careful with the kill command, because there may be other Java processes you do NOT want to kill.
Make sure you use the correct PROCESS_ID from the grep command!
faq/linux/cannot_stop_the_jboss_service.txt · Last modified: 2014/12/18 11:46 (external edit)