-
1. Re: shutdown.sh doesn't work when JBoss started as root
pope Oct 15, 2002 10:52 AM (in response to cunparis)I have just tried the shutdown script and it is working. There seems to me to be no problems.
Detail it !
There are only solutions !
---
Pope -
2. Re: shutdown.sh doesn't work when JBoss started as root
joelvogt Oct 15, 2002 8:02 PM (in response to cunparis)Please post what versions of jboss and os you are using, as well as any custom config you have done. Is this is a clean install?
-
3. Re: shutdown.sh doesn't work when JBoss started as root
cunparis Oct 17, 2002 8:19 AM (in response to cunparis)This is a clean install of the latest version 3.0.3 (with Jetty) on Linux (Mandrake 8.2). I'm using the jboss run.sh & shutdown.sh scripts, and the only environment variable I set is for JAVA_HOME. If I start it with root, the shutdown doesn't work. If I start it with a non-root account, shutdown works. I can't figure it out.
-
4. Re: shutdown.sh doesn't work when JBoss started as root
kosulin Oct 18, 2002 12:12 PM (in response to cunparis)I have the same problem with JBoss 3.0.3/JDK1.4.1_01/RedHat 7.3. shutdown.sh does not work for 'root'. And 'jboss_init_redhat.sh stop' does not work, too.
-
5. Re: shutdown.sh doesn't work when JBoss started as root
kosulin Oct 18, 2002 2:22 PM (in response to cunparis)Do you have HTTP disabled? If yes, here is the problem: Shutdown.java uses JMX-console to shutdown server, and it uses hardcoded HTTP as protocol:
public class Shutdown
{
private static final String COMMAND=
"/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system%3Atype%3DServer&methodName=shutdown";
/**
* Parse the command line and shutdown the remote server.
*
* @param argv Command line arguments.
* @throws Exception Invalid port number.
*/
public static void main(final String argv[]) throws Exception
{
String host = "localhost";
int port = 8080;
if (argv.length >= 1)
{
host = argv[0];
}
if (argv.length >= 2)
{
port = Integer.parseInt(argv[1]);
}
shutdown(host, port);
}
/**
* Connect to the JBoss servers HTML JMX adapter and invoke the
* shutdown service.
*
* @param host The hostname of the JMX server.
* @param port The port of the JMX server.
*
*/
public static void shutdown(final String host, final int port)
{
try
{
System.out.println("Shutting down server "+host+":"+port);
URL url = new URL("http", host, port, COMMAND);
url.getContent();
}
catch (Exception ignore)
{
// we do nothing because even if everything went
// right, ie JBoss is shutdown, we'd get an exception
}
System.out.println("Shutdown complete");
}
}
I am going to open a bug report now. -
6. Re: shutdown.sh doesn't work when JBoss started as root
kosulin Oct 18, 2002 2:23 PM (in response to cunparis)Addition: may be root can not shutdown because by default root cann not access port 80, which is required by Shutdown.java
-
7. Re: shutdown.sh doesn't work when JBoss started as root
dwong Oct 18, 2002 11:53 PM (in response to cunparis)Hi, which port does it use to shutdown with HTTP ? Is it 8080 ? I can't see JBoss listens to port 8080. Can it configure it ?
For me, I even cannot shutdown with any kind of users. I just use kill command. Is it a proper way to do that ? I am using JBoss 3.0.3. -
8. Re: shutdown.sh doesn't work when JBoss started as root
ronia Nov 15, 2002 4:30 PM (in response to cunparis)Hi, You have to modify the shutdown.sh
and replace
exec $JAVA \
$JAVA_OPTS \
-classpath $JBOSS_CLASSPATH \
org.jboss.Shutdown "$@"
by
exec $JAVA \
$JAVA_OPTS \
-classpath $JBOSS_CLASSPATH \
org.jboss.Shutdown "$@" localhost 80
Ronia