tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Tomcat 7 & JDK 7 access permissions: error or bug?
Date Wed, 18 Jan 2012 10:12:24 GMT
2012/1/17 deniz <denizdurmus87@gmail.com>:
> Hi all,
>
> I am getting a weird error on tomcat 7. at first  i deploy my war file and
> everything is smooth.. but after some time - randomly - i cant access
> anything on tomcat and in the log file I see these lines:
> <code>
> Jan 17, 2012 11:37:37 AM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
> SEVERE: Socket accept failed
> java.security.AccessControlException: access denied
> ("java.net.SocketPermission" "127.0.0.1:50092" "accept,resolve")
>        at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
>        at
> java.security.AccessController.checkPermission(AccessController.java:555)
>        at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>        at java.lang.SecurityManager.checkAccept(SecurityManager.java:1174)
>        at java.net.ServerSocket.implAccept(ServerSocket.java:526)
>        at java.net.ServerSocket.accept(ServerSocket.java:490)
>        at
> org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:207)
>        at java.lang.Thread.run(Thread.java:722)
> </code>
>
> i have to kill tomcat and then after some time it happens again... any
> ideas?
>

The catalina.policy file that comes with Tomcat grants AllPermission
to both Tomcat and JRE libs (${catalina.home}/lib/-,
${java.home}/lib/-).

The stacktrace that you show above, as well as ones in [1] all show
only Tomcat or JRE classes,  so all permissions must be granted,
unless there is something that I miss.

What is puzzling is that you say that the failure starts to occur randomly.

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=52482

You have to be more specific about your configuration (OS, JRE
version, Tomcat settings (server.xml without comments)) and try to
provide a scenario to reproduce the issue on a clean installation of
Tomcat.

While the issue cannot be reproduced and if nobody here on users@ is
able to reproduce it or find some clues, filing an issue in bugzilla
is useless, as we cannot proceed from there if the issue is not
understood.  It might as well be some configuration error or
programming error in the web application.

You may want to
1. Reconfigure your logging to use the following formatter:
org.apache.juli.OneLineFormatter

E.g.:
1catalina.org.apache.juli.FileHandler.formatter =
org.apache.juli.OneLineFormatter

It prints current thread name with each log message.

2. Reconfigure your access log to include thread name in the access log (%I)

Maybe you can find what requests were handled by those threads before
the failure starts to occurs.

Thus far I do not observe any issues with Tomcat 7.0.25, JDK 1.7.0.

Best regards,
Konstantin Kolinko

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


Mime
View raw message