Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.servlet.ServletException: errno: 13 error: Unable to open directory /proc/self/fd #16

Closed
GoogleCodeExporter opened this issue Jun 25, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

When running under Ubuntu (Karmic server) with the OpenJDK runtime, get
this exception.


$ curl http://localhost:8080/cware/monitoring

<html><head><title>Apache Tomcat/6.0.20 - Error report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:w
hite;background-color:#525D76;font-size:22px;} H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525
D76;font-size:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-s
ize:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:w
hite;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px
;}A
{c
olor : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head><body><h1>HTTP Status 500 - </h1><HR size="
1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
<u></u></p><p><b>description</b> <u>The server
 encountered an internal error () that prevented it from fulfilling this
request.</u></p><p><b>exception</b> <pre>javax.
servlet.ServletException: errno: 13 error: Unable to open directory
/proc/self/fd


org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
</pre></p><p><b>root cause</b> <pre>java.lang.InternalError: errno: 13
error: Unable to open directory /proc/self/fd


com.sun.management.UnixOperatingSystem.getOpenFileDescriptorCount(Native
Method)

net.bull.javamelody.JavaInformations.&lt;init&gt;(JavaInformations.java:152)

net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:426)

net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:284)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:43)
        java.lang.reflect.Method.invoke(Method.java:616)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:537)

org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is
available in the Apache Tomcat/6.0.20 logs.</u></p
><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.20</h3></body></html>




$ uname -a
Linux 172 2.6.31-17-generic-pae #54-Ubuntu SMP Thu Dec 10 17:23:29 UTC 2009
i686 GNU/Linux
$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)


Original issue reported on code.google.com by ajitnila...@gmail.com on 22 Mar 2010 at 9:07

@GoogleCodeExporter
Copy link
Author

First, thanks for sharing the information.

Then, an InternalError is supposed to "indicate some unexpected internal error 
has
occurred in the Java Virtual Machine" (catching the InternalError type is not
something we are supposed to do).
And you use IcedTea, which is a jvm I have not tested.

So can it be an issue with IcedTea or Ubuntu ? Do you have the same issue with 
a jdk
from java.sun.com ?
Did you have this issue always/once a day/just once ?
Thanks

Original comment by evernat@free.fr on 24 Mar 2010 at 11:57

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Hi:

I think I've found the source of the problem:  Karmic Ubuntu uses "jsvc" to 
launch
Tomcat. It starts off as root, but drops down to user tomcat6.

This is mentioned in various bug reports: e.g.
 http://issues.apache.org/jira/browse/DAEMON-120
 http://issues.apache.org/jira/browse/DAEMON-16

In net.bull.javamelody.JavaInformations  is it possible to put a 
try/catch(Throwable)
around the calls to 
com.sun.management.UnixOperatingSystem.getOpenFileDescriptorCount ?

Thanks !

Original comment by ajitnila...@gmail.com on 25 Mar 2010 at 1:42

@GoogleCodeExporter
Copy link
Author

Hi,

This might end up being a non-issue because the next release of Ubuntu (Lucid 
Lynx)
seems to be dropping the use of jsvc.
  See: http://blogs.mulesoft.org/a-better-tomcat-for-ubuntu-and-debian/
However, in the meantime, it would still be nice if the error was caught in the 
code.
Thanks!

Original comment by ajitnila...@gmail.com on 25 Mar 2010 at 3:22

@GoogleCodeExporter
Copy link
Author

Hi all

i have just install javaMelody (the last version) with sun jdk on debian OS and 
i
encountered the same issue each time.

Jonathan


Original comment by ponroy...@gmail.com on 26 Mar 2010 at 3:47

@GoogleCodeExporter
Copy link
Author

If I understand, it is an issue of the current tomcat package on ubuntu and 
debian
when using jsvc:
http://issues.apache.org/jira/browse/DAEMON-120
http://blogs.mulesoft.org/a-better-tomcat-for-ubuntu-and-debian/

However due the number of users which will possibly use this package, I have 
made a
workaround: file descriptors count will not be displayed in this case. The fix 
is
available in the trunk of svn and ready for next release (1.14).
Note that I am not able to test it on ubuntu or debian with jsvc.

Original comment by evernat@free.fr on 27 Mar 2010 at 10:59

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 17 has been merged into this issue.

Original comment by evernat@free.fr on 30 Mar 2010 at 7:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant