You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by davewark <da...@bt.com> on 2007/08/07 17:46:53 UTC

Tomcat 5.5 unable to access 'deployed' webapp

I see from the past postings that Linux permissions and web archive
deployment don't get on too well. I've tried following some of the advice in
other posts such as updating the policy files to grant all permissions and
changing permissions of some file systems directly, but I still seem to have
no joy. 

Basically, I've managed to deploy a web archive using the Tomcat 5.5 manager
command
server:8080/manager/deploy?path=/{path}&war=file:/{local war file}

It gave me a reassuring "OK. Web app deployed at such and such a path..."
type message and it now appears in the deployed applications list, and in
the {$catalina-home}/webapps directory. But when I attempt to access it via
the specified path I get the following error:

---------------------

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw
exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	java.lang.Thread.run(Thread.java:595)

root cause

java.security.AccessControlException: access denied (java.io.FilePermission
/var/cache/tomcat5.5/Catalina/localhost read)

java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
	java.security.AccessController.checkPermission(AccessController.java:427)
	java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
	java.lang.SecurityManager.checkRead(SecurityManager.java:871)
	java.io.File.exists(File.java:700)
	java.io.File.mkdirs(File.java:1145)
	java.io.File.mkdirs(File.java:1158)
	java.io.File.mkdirs(File.java:1158)
	org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:315)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:585)
	org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
	java.security.AccessController.doPrivileged(Native Method)
	javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:114)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	java.lang.Thread.run(Thread.java:595)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5 logs.

----------------

I'm completely new to Tomcat and so I don't really understand what
permissions need changed or what policies need altered.

I understand there may be no further guidance than what has been mentioned
in similar posts, but if anyone has any input on this I would be greatly
appreciative

Thanks,

David
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5-unable-to-access-%27deployed%27-webapp-tf4230973.html#a12036935
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 5.5 unable to access 'deployed' webapp

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David,

davewark wrote:
> I see from the past postings that Linux permissions and web archive
> deployment don't get on too well. I've tried following some of the advice in
> other posts such as updating the policy files to grant all permissions and
> changing permissions of some file systems directly, but I still seem to have
> no joy. 

Are you intending to run with a SecurityManager? If not, then disable
it. In fact, you ought to disable it, anyway, just to make sure that
nothing else is wrong. Once you confirm that your application deploys
correctly and runs, then you can turn the SecurityManager back on and
give it the correct access.

> java.security.AccessControlException: access denied (java.io.FilePermission
> /var/cache/tomcat5.5/Catalina/localhost read)

So, your application is attempting to read this particular directory.
Have you granted such access to this directory in your catalina.policy file?

> I'm completely new to Tomcat and so I don't really understand what
> permissions need changed or what policies need altered.

You can find catalina.policy in $CATALINA_HOME/conf. I would recommend
that you make a backup copy of the original before you start messing
around with it.

Hope that helps you get started,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuJr19CaO5/Lv0PARAqszAJ9+SqI3rwuz0wZAurcEtv3PjhHfKgCePCWv
MOdV2EloY0Xu2d6yBUFztUU=
=XqOq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org