me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Unable to open directory /proc/self/fd #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I just followed the User Guide, copied the 2 jar files to an app, modified
web.xml, and went to http://<host>/<context>/monitoring and received the
following error.

----
HTTP Status 500 -

type Exception report

message

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

exception

javax.servlet.ServletException: Filter execution threw an exception
    com.motally.tracker.util.CharacterEncodingFilter.doFilter(Unknown Source)

root cause

java.lang.InternalError: errno: 13 error: Unable to open directory
/proc/self/fd

    com.sun.management.UnixOperatingSystem.getOpenFileDescriptorCount(Native
Method)
    net.bull.javamelody.JavaInformations.<init>(JavaInformations.java:152)
    net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:436)
    net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:294)
    com.motally.tracker.util.CharacterEncodingFilter.doFilter(Unknown Source)

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

JDK info:
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

OS: Ubuntu 9.4 amd_64

I believe it is because I am running Tomcat using jsvc as an unprivileged
user, and the permissions on /proc/8514/fd are:

dr-x------   2 root    root    0 2010-03-29 16:23 fd

...so only the 'root' user can read this.

Original issue reported on code.google.com by pas...@gmail.com on 29 Mar 2010 at 11:38

GoogleCodeExporter commented 9 years ago
You are right, it is an InternalError of the JVM (HotSpot and IcedTea) when the
tomcat package with jsvc is used on Ubuntu or Debian (duplicate of issue 16).
There is already a fix/workaround committed in trunk of javamelody and ready 
for next
release (v1.14).

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