Here's a solution if anyone has security enabled and
can't get tomcat 3.3 to shutdown via shutdown.sh.

Add this permission to tomcat.policy 
for codebase "file:${tomcat.home}/lib/-"
 
   permission java.net.SocketPermission 
     "xxxx:1024-","accept";

where "xxxx" is the name of the host running tomcat.

If you are connecting with ajp12/13 to an apache server
which is also running on the tomcat host then you probably
already give that permission.

The shutdown problem arises when apache is running on a separate
host and you haven't given "accept" permission to yourself
(the host running tomcat).

This permission was already in my tomcat.policy for that
codebase and wasn't sufficient:

  permission java.net.SocketPermission 
   "localhost:1024-","connect,accept,listen,resolve";


In either case the shutdown script would report

  Stopping Tomcat.
  Stopping tomcat on :8007 null
                
Without the additional SocketPermission, tomcat would keep
merrily running and report no errors, even though it is
run with  -Djava.security.debug=failure.

In org.apache.tomcat.startup.StopTomcat, the
stopTomcat method does a

        address = InetAddress.getLocalHost();

I ran a test and InetAddress.getLocalHost() appears to
returns th IP address associated with the local hostname, 
which is not necessarily 127.0.0.1 or whatever IP address is 
assigned to "localhost".

StopTomcat writes its exception errors to System.out. I don't see
any errors, so I'm assuming it isn't getting an exception -
haven't looked any further.

My configuration:
tomcat 3.3, on Solaris 8, java 1.3.0

  In server.xml:
        <Ajp12Connector  port="8007" />

        
Hope this helps someone, and
Happy new year!

-- 
*****************************************************
Gordon Maclean, Software Engineer
http://www.atd.ucar.edu/homes/maclean
Nat'l Center for Atmospheric Research, Boulder CO USA
*****************************************************

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to