Thanks Mark, let's deal by parts:

On Wed, Sep 23, 2009 at 16:33, Mark Thomas <ma...@apache.org> wrote:
> Alan wrote:
>> Ok, I downloaded the latest and did:
>>
>> wget -c 
>> http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
>> tar xvfz apache-tomcat-5.5.28.tar.gz # gnu tar
>
> What is going on here? Which version of Tomcat are you using?

amadeus[2195]:~/Programmes% $CATALINA_HOME/bin/catalina.sh version
Using CATALINA_BASE:   /Users/alan/Programmes/apache-tomcat-6.0.20
Using CATALINA_HOME:   /Users/alan/Programmes/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /Users/alan/Programmes/apache-tomcat-6.0.20/temp
Using JRE_HOME:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
Server version: Apache Tomcat/6.0.20
Server built:   May 14 2009 01:13:50
Server number:  6.0.20.0
OS Name:        Mac OS X
OS Version:     10.6.1
Architecture:   x86_64
JVM Version:    1.6.0_15-b03-219
JVM Vendor:     Apple Inc.

>> cd ~/Programmes/apache-tomcat-6.0.20
>> export CATALINA_HOME=$PWD
>> amadeus[2161]:~/Programmes/apache-tomcat-6.0.20%
>> $CATALINA_HOME/bin/catalina.sh run -securityUsing CATALINA_BASE:
>> /Users/alan/Programmes/apache-tomcat-6.0.20
>> Using CATALINA_HOME:   /Users/alan/Programmes/apache-tomcat-6.0.20
>> Using CATALINA_TMPDIR: /Users/alan/Programmes/apache-tomcat-6.0.20/temp
>> Using JRE_HOME:
>> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
>
> Which JVM is this? What does:
> java -version
> return?

amadeus[2197]:~/Programmes% java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)

>> Using Security Manager
>> Please use CMSClassUnloadingEnabled in place of
>> CMSPermGenSweepingEnabled in the future
>
> Hmm. You shouldn't see that with a default Tomcat install so it looks
> like you aren't running what you think you are running.

Indeed, testing on Ubuntu, I don't get this message.

More below.

>> Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
>> java.security.AccessControlException: access denied
>> (java.lang.RuntimePermission setContextClassLoader)
>>       at 
>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
>> [snip]
>
> This works out of the for me on Leopard. I don't have access to a
> machine with Snow Leopard although it is unlikely that is the issue.
>
>> So, how do I do to make at least the webapps examples that come with
>> tomcat to run smoothly with security manager? How to tweak
>> catalina.policy in order to not see all this issues in log?
>
> Indications are you aren't running a vanilla Tomcat 6.0.20 install. A
> clean install works for me in Windows, OSX and linux.
>
> Mark

I frankly don't understand what's going on, so I will put in a sort of
script-like what I did. First I got tomcat from
http://tomcat.apache.org/download-60.cgi (Binary distr. -> Core).
Should I get the source code and compile myself?

#------------------------------------------------------
# commands
cd
# get binary core package from a mirror
wget -c 
http://mirror.lividpenguin.com/pub/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz

# uncompress with gnu tar
tar xvfz apache-tomcat-6.0.20.tar.gz

cd apache-tomcat-6.0.20
export CATALINA_HOME=$PWD

$CATALINA_HOME/bin/catalina.sh version

$CATALINA_HOME/bin/catalina.sh run -security
#------------------------------------------------------

I did the same commands in a clean install of Ubuntu Linux 9.04 64
bits and got the same problem. I would love to see what you get doing
the commands above, or please tell me what should I change if they are
not OK.

>From Ubuntu:

a...@ubuntu:~/apache-tomcat-6.0.20/logs$ $CATALINA_HOME/bin/catalina.sh version
Using CATALINA_BASE:   /home/alan/apache-tomcat-6.0.20
Using CATALINA_HOME:   /home/alan/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home/alan/apache-tomcat-6.0.20/temp
Using JRE_HOME:       /usr
Server version: Apache Tomcat/6.0.20
Server built:   May 14 2009 01:13:50
Server number:  6.0.20.0
OS Name:        Linux
OS Version:     2.6.28-15-generic
Architecture:   amd64
JVM Version:    1.6.0_16-b01
JVM Vendor:     Sun Microsystems Inc.

a...@ubuntu:~/apache-tomcat-6.0.20/logs$
$CATALINA_HOME/bin/catalina.sh run -security
Using CATALINA_BASE:   /home/alan/apache-tomcat-6.0.20
Using CATALINA_HOME:   /home/alan/apache-tomcat-6.0.20
Using CATALINA_TMPDIR: /home/alan/apache-tomcat-6.0.20/temp
Using JRE_HOME:       /usr
Using Security Manager
Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
java.security.AccessControlException: access denied
(java.lang.RuntimePermission setContextClassLoader)
        at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at 
java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
[snip]

Cheers,
Alan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to