You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by deniz <de...@gmail.com> on 2012/01/17 04:44:33 UTC

Tomcat 7 & JDK 7 access permissions: error or bug?

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?

--
View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3679835.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

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


Re: Tomcat 7 & JDK 7 access permissions: error or bug?

Posted by deniz <de...@gmail.com>.
Well thank you for your kind responses... i have found out the problem
today... i have been focused on a wrong place... although logs were showing
clear exceptions and errors, the problem was in java classes of my webapp
not jsps nor tomcat itself... 

--
View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3874666.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

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


Re: Tomcat 7 & JDK 7 access permissions: error or bug?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/1/17 deniz <de...@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


Re: Tomcat 7 & JDK 7 access permissions: error or bug?

Posted by deniz <de...@gmail.com>.
7.0.23


is this a bug in this version?

--
View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3680278.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

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


Re: Tomcat 7 & JDK 7 access permissions: error or bug?

Posted by ep...@orpheus.fr.
> Exactly which version, Tomcat 7.0.?

7.0.23

> On 17/01/2012 03:44, deniz wrote:
>> 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:
>
> Exactly which version, Tomcat 7.0.?
>
>
> p
>
>
>> <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?
>>
>> --
>> View this message in context:
>> http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3679835.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> --
>
> [key:62590808]
>
>



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


Re: Tomcat 7 & JDK 7 access permissions: error or bug?

Posted by Pid <pi...@pidster.com>.
On 17/01/2012 03:44, deniz wrote:
> 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: 

Exactly which version, Tomcat 7.0.?


p


> <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?
> 
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-JDK-7-access-permissions-error-or-bug-tp3679835p3679835.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


-- 

[key:62590808]