Java-Monitor Forum > Forum > JBoss Administration » error on /proc/self/fd
Thread Tools Search this Thread Display Modes
Old 10-06-2010, 02:16
purpleheart purpleheart is offline
Junior Member
Join Date: Jun 2010
Posts: 1
Default error on /proc/self/fd

Any ideas on this? This is on a FreeBSD system so no proc at all, would be /dev/fd/X (0-2). But I'm having a hard time figuring out why it would fail on or need fd at all?

21:02:36,809 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 16s:843ms
21:02:37,284 ERROR [STDERR] Jun 9, 2010 9:02:37 PM com.javamonitor.JavaMonitorCollector$CollectorDriv er run
SEVERE: This probe was hit by an unexpected exception: errno: 2 error: Unable to open directory /proc/self/fd

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

at DescriptorCount(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
at java.lang.reflect.Method.invoke(
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWit hOpenReturn(
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM 2(
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM 2(
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(
at com.sun.jmx.mbeanserver.PerInterface.getAttribute(
at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(
at (
at com.javamonitor.JmxHelper.query( )
at com.javamonitor.Collector.queryItems(Collector.jav a:205)
at com.javamonitor.Collector.push(
at com.javamonitor.JavaMonitorCollector$CollectorDriv
Reply With Quote
Old 10-06-2010, 12:57
kjkoster kjkoster is offline
Forum Operator
Join Date: Jul 2008
Posts: 1,195

Dear purpleheart,

Ah, a fellow FreeBSD user. :-)

JMX has a field named OpenFileDescriptorCount on the mbean named java.lang:type=OperatingSystem. Java-monitor queries that field because it is one of the typical things you run out of on a busy UNIX machine.

On FreeBSD, the JVM counts the open file descriptors simply by opening the list if file descriptors and counting how many entries there are. However, last time I looked, it used /dev/fd and not /proc. I just checked on FreeBSD 7.3 and that is the case.

You can try to remedy this by using these lines in your /etc/fstab:
proc                    /proc           procfs  rw              0       0
fdescfs                 /dev/fd         fdescfs rw              0       0
After that, mount them using "mount /proc; mount /dev/fd". Let me know if that fixes this, please.

What version of FreeBSD are you using and what version of Java, please?

Your problem also exposed a small bug in the Java-monitor probe. It should have caught this error and not dump it into your log file as it did. I have updated the probe to deal with this situation properly.

Can you please download the Java-monitor probe again? That should give you the fixed version and it should allow you to monitor your machine whether or not the file descriptor handling works or not.

Kees Jan
Reply With Quote
Old 30-12-2011, 21:51
martinezwanda66 martinezwanda66 is offline
Junior Member
Join Date: Dec 2011
Posts: 1
Default error on /proc/self/fd

Perhaps the issue occurs because Java is started as one user then drops privileges and then later an attempt is made to access /proc/self/fd where self refers to root but as the lower privilege user it cannot read this path?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump